OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 codec_thread_->SetName("MediaCodecVideoEncoder", NULL); | 303 codec_thread_->SetName("MediaCodecVideoEncoder", NULL); |
304 RTC_CHECK(codec_thread_->Start()) << "Failed to start MediaCodecVideoEncoder"; | 304 RTC_CHECK(codec_thread_->Start()) << "Failed to start MediaCodecVideoEncoder"; |
305 codec_thread_checker_.DetachFromThread(); | 305 codec_thread_checker_.DetachFromThread(); |
306 jclass j_output_buffer_info_class = | 306 jclass j_output_buffer_info_class = |
307 FindClass(jni, "org/webrtc/MediaCodecVideoEncoder$OutputBufferInfo"); | 307 FindClass(jni, "org/webrtc/MediaCodecVideoEncoder$OutputBufferInfo"); |
308 j_init_encode_method_ = GetMethodID( | 308 j_init_encode_method_ = GetMethodID( |
309 jni, | 309 jni, |
310 *j_media_codec_video_encoder_class_, | 310 *j_media_codec_video_encoder_class_, |
311 "initEncode", | 311 "initEncode", |
312 "(Lorg/webrtc/MediaCodecVideoEncoder$VideoCodecType;" | 312 "(Lorg/webrtc/MediaCodecVideoEncoder$VideoCodecType;" |
313 "IIIILorg/webrtc/EglBase14$Context;)Z"); | 313 "IIIILorg/webrtc/EglBase$Context;)Z"); |
314 j_get_input_buffers_method_ = GetMethodID( | 314 j_get_input_buffers_method_ = GetMethodID( |
315 jni, | 315 jni, |
316 *j_media_codec_video_encoder_class_, | 316 *j_media_codec_video_encoder_class_, |
317 "getInputBuffers", | 317 "getInputBuffers", |
318 "()[Ljava/nio/ByteBuffer;"); | 318 "()[Ljava/nio/ByteBuffer;"); |
319 j_dequeue_input_buffer_method_ = GetMethodID( | 319 j_dequeue_input_buffer_method_ = GetMethodID( |
320 jni, *j_media_codec_video_encoder_class_, "dequeueInputBuffer", "()I"); | 320 jni, *j_media_codec_video_encoder_class_, "dequeueInputBuffer", "()I"); |
321 j_encode_buffer_method_ = GetMethodID( | 321 j_encode_buffer_method_ = GetMethodID( |
322 jni, *j_media_codec_video_encoder_class_, "encodeBuffer", "(ZIIJ)Z"); | 322 jni, *j_media_codec_video_encoder_class_, "encodeBuffer", "(ZIIJ)Z"); |
323 j_encode_texture_method_ = GetMethodID( | 323 j_encode_texture_method_ = GetMethodID( |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 } | 1259 } |
1260 | 1260 |
1261 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 1261 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( |
1262 webrtc::VideoEncoder* encoder) { | 1262 webrtc::VideoEncoder* encoder) { |
1263 ALOGD << "Destroy video encoder."; | 1263 ALOGD << "Destroy video encoder."; |
1264 delete encoder; | 1264 delete encoder; |
1265 } | 1265 } |
1266 | 1266 |
1267 } // namespace webrtc_jni | 1267 } // namespace webrtc_jni |
1268 | 1268 |
OLD | NEW |