Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: webrtc/sdk/android/src/jni/androidmediaencoder_jni.cc

Issue 2984633002: Add a field trial to produce VideoFrames in camera capturers. (Closed)
Patch Set: Fix error. Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 } 1472 }
1473 1473
1474 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder( 1474 void MediaCodecVideoEncoderFactory::DestroyVideoEncoder(
1475 webrtc::VideoEncoder* encoder) { 1475 webrtc::VideoEncoder* encoder) {
1476 ALOGD << "Destroy video encoder."; 1476 ALOGD << "Destroy video encoder.";
1477 delete encoder; 1477 delete encoder;
1478 } 1478 }
1479 1479
1480 JOW(void, MediaCodecVideoEncoder_nativeFillBuffer) 1480 JOW(void, MediaCodecVideoEncoder_nativeFillBuffer)
1481 (JNIEnv* jni, 1481 (JNIEnv* jni,
1482 jclass,
1482 jlong native_encoder, 1483 jlong native_encoder,
1483 jint input_buffer, 1484 jint input_buffer,
1484 jobject j_buffer_y, 1485 jobject j_buffer_y,
1485 jint stride_y, 1486 jint stride_y,
1486 jobject j_buffer_u, 1487 jobject j_buffer_u,
1487 jint stride_u, 1488 jint stride_u,
1488 jobject j_buffer_v, 1489 jobject j_buffer_v,
1489 jint stride_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
OLDNEW
« no previous file with comments | « webrtc/sdk/android/src/java/org/webrtc/NV21Buffer.java ('k') | webrtc/sdk/android/src/jni/nv21buffer_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698