OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
629 output_ntp_timestamps_ms = | 629 output_ntp_timestamps_ms = |
630 GetLongField(jni, j_decoder_output_buffer, | 630 GetLongField(jni, j_decoder_output_buffer, |
631 j_texture_ntp_timestamp_ms_field_); | 631 j_texture_ntp_timestamp_ms_field_); |
632 decode_time_ms = GetLongField(jni, j_decoder_output_buffer, | 632 decode_time_ms = GetLongField(jni, j_decoder_output_buffer, |
633 j_texture_decode_time_ms_field_); | 633 j_texture_decode_time_ms_field_); |
634 frame_delayed_ms = GetLongField(jni, j_decoder_output_buffer, | 634 frame_delayed_ms = GetLongField(jni, j_decoder_output_buffer, |
635 j_texture_frame_delay_ms_field_); | 635 j_texture_frame_delay_ms_field_); |
636 | 636 |
637 // Create webrtc::VideoFrameBuffer with native texture handle. | 637 // Create webrtc::VideoFrameBuffer with native texture handle. |
638 frame_buffer = surface_texture_helper_->CreateTextureFrame( | 638 frame_buffer = surface_texture_helper_->CreateTextureFrame( |
639 width, height, NativeHandleImpl(jni, texture_id, j_transform_matrix)); | 639 width, height, NativeHandleImpl( |
| 640 jni, |
| 641 texture_id, j_transform_matrix, |
| 642 surface_texture_helper_->GetJavaSurfaceTextureHelper())); |
640 } | 643 } |
641 } else { | 644 } else { |
642 // Extract data from Java ByteBuffer and create output yuv420 frame - | 645 // Extract data from Java ByteBuffer and create output yuv420 frame - |
643 // for non surface decoding only. | 646 // for non surface decoding only. |
644 const int output_buffer_index = | 647 const int output_buffer_index = |
645 GetIntField(jni, j_decoder_output_buffer, j_info_index_field_); | 648 GetIntField(jni, j_decoder_output_buffer, j_info_index_field_); |
646 const int output_buffer_offset = | 649 const int output_buffer_offset = |
647 GetIntField(jni, j_decoder_output_buffer, j_info_offset_field_); | 650 GetIntField(jni, j_decoder_output_buffer, j_info_offset_field_); |
648 const int output_buffer_size = | 651 const int output_buffer_size = |
649 GetIntField(jni, j_decoder_output_buffer, j_info_size_field_); | 652 GetIntField(jni, j_decoder_output_buffer, j_info_size_field_); |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 return NULL; | 891 return NULL; |
889 } | 892 } |
890 | 893 |
891 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 894 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
892 webrtc::VideoDecoder* decoder) { | 895 webrtc::VideoDecoder* decoder) { |
893 ALOGD << "Destroy video decoder."; | 896 ALOGD << "Destroy video decoder."; |
894 delete decoder; | 897 delete decoder; |
895 } | 898 } |
896 | 899 |
897 } // namespace webrtc_jni | 900 } // namespace webrtc_jni |
898 | |
OLD | NEW |