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)); | |
640 } | 642 } |
perkj_webrtc
2015/12/07 12:53:50
revert change
nisse-webrtc
2015/12/08 11:44:51
Done.
| |
641 } else { | 643 } else { |
642 // Extract data from Java ByteBuffer and create output yuv420 frame - | 644 // Extract data from Java ByteBuffer and create output yuv420 frame - |
643 // for non surface decoding only. | 645 // for non surface decoding only. |
644 const int output_buffer_index = | 646 const int output_buffer_index = |
645 GetIntField(jni, j_decoder_output_buffer, j_info_index_field_); | 647 GetIntField(jni, j_decoder_output_buffer, j_info_index_field_); |
646 const int output_buffer_offset = | 648 const int output_buffer_offset = |
647 GetIntField(jni, j_decoder_output_buffer, j_info_offset_field_); | 649 GetIntField(jni, j_decoder_output_buffer, j_info_offset_field_); |
648 const int output_buffer_size = | 650 const int output_buffer_size = |
649 GetIntField(jni, j_decoder_output_buffer, j_info_size_field_); | 651 GetIntField(jni, j_decoder_output_buffer, j_info_size_field_); |
650 output_timestamps_ms = GetLongField(jni, j_decoder_output_buffer, | 652 output_timestamps_ms = GetLongField(jni, j_decoder_output_buffer, |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
888 return NULL; | 890 return NULL; |
889 } | 891 } |
890 | 892 |
891 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( | 893 void MediaCodecVideoDecoderFactory::DestroyVideoDecoder( |
892 webrtc::VideoDecoder* decoder) { | 894 webrtc::VideoDecoder* decoder) { |
893 ALOGD << "Destroy video decoder."; | 895 ALOGD << "Destroy video decoder."; |
894 delete decoder; | 896 delete decoder; |
895 } | 897 } |
896 | 898 |
897 } // namespace webrtc_jni | 899 } // namespace webrtc_jni |
898 | |
OLD | NEW |