| 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 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 return supported_codecs_; | 1469 return supported_codecs_; |
| 1470 } | 1470 } |
| 1471 } | 1471 } |
| 1472 | 1472 |
| 1473 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( | 1473 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( |
| 1474 webrtc::VideoEncoder* encoder) { | 1474 webrtc::VideoEncoder* encoder) { |
| 1475 ALOGD << "Destroy video encoder."; | 1475 ALOGD << "Destroy video encoder."; |
| 1476 delete encoder; | 1476 delete encoder; |
| 1477 } | 1477 } |
| 1478 | 1478 |
| 1479 JOW(void, MediaCodecVideoEncoder_nativeFillBuffer) | 1479 JNI_FUNCTION_DECLARATION(void, |
| 1480 (JNIEnv* jni, | 1480 MediaCodecVideoEncoder_nativeFillBuffer, |
| 1481 jclass, | 1481 JNIEnv* jni, |
| 1482 jlong native_encoder, | 1482 jclass, |
| 1483 jint input_buffer, | 1483 jlong native_encoder, |
| 1484 jobject j_buffer_y, | 1484 jint input_buffer, |
| 1485 jint stride_y, | 1485 jobject j_buffer_y, |
| 1486 jobject j_buffer_u, | 1486 jint stride_y, |
| 1487 jint stride_u, | 1487 jobject j_buffer_u, |
| 1488 jobject j_buffer_v, | 1488 jint stride_u, |
| 1489 jint stride_v) { | 1489 jobject j_buffer_v, |
| 1490 jint stride_v) { |
| 1490 uint8_t* buffer_y = | 1491 uint8_t* buffer_y = |
| 1491 static_cast<uint8_t*>(jni->GetDirectBufferAddress(j_buffer_y)); | 1492 static_cast<uint8_t*>(jni->GetDirectBufferAddress(j_buffer_y)); |
| 1492 uint8_t* buffer_u = | 1493 uint8_t* buffer_u = |
| 1493 static_cast<uint8_t*>(jni->GetDirectBufferAddress(j_buffer_u)); | 1494 static_cast<uint8_t*>(jni->GetDirectBufferAddress(j_buffer_u)); |
| 1494 uint8_t* buffer_v = | 1495 uint8_t* buffer_v = |
| 1495 static_cast<uint8_t*>(jni->GetDirectBufferAddress(j_buffer_v)); | 1496 static_cast<uint8_t*>(jni->GetDirectBufferAddress(j_buffer_v)); |
| 1496 | 1497 |
| 1497 reinterpret_cast<MediaCodecVideoEncoder*>(native_encoder) | 1498 reinterpret_cast<MediaCodecVideoEncoder*>(native_encoder) |
| 1498 ->FillInputBuffer(jni, input_buffer, buffer_y, stride_y, buffer_u, | 1499 ->FillInputBuffer(jni, input_buffer, buffer_y, stride_y, buffer_u, |
| 1499 stride_u, buffer_v, stride_v); | 1500 stride_u, buffer_v, stride_v); |
| 1500 } | 1501 } |
| 1501 | 1502 |
| 1502 } // namespace webrtc_jni | 1503 } // namespace webrtc_jni |
| OLD | NEW |