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

Unified Diff: talk/app/webrtc/java/jni/androidvideocapturer_jni.cc

Issue 1394103005: Revert "Android MediaCodecVideoDecoder: Manage lifetime of texture frames" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fork NativeHandleImpl and disable texture capture, plus some revert rebase nits Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « talk/app/webrtc/java/jni/androidvideocapturer_jni.h ('k') | talk/app/webrtc/java/jni/native_handle_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
diff --git a/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc b/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
index 6d4891ee596672bd50e37c4f87148a9169a7e995..3275cc180af8197aee5eb9a71fc6c08f23a1e2a0 100644
--- a/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
+++ b/talk/app/webrtc/java/jni/androidvideocapturer_jni.cc
@@ -180,18 +180,23 @@ void AndroidVideoCapturerJni::OnMemoryBufferFrame(void* video_frame,
buffer, rotation, timestamp_ns);
}
-void AndroidVideoCapturerJni::OnTextureFrame(int width,
- int height,
- int64_t timestamp_ns,
- const NativeHandleImpl& handle) {
- rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
- new rtc::RefCountedObject<AndroidTextureBuffer>(
- width, height, handle,
- rtc::Bind(&AndroidVideoCapturerJni::ReturnBuffer, this,
- timestamp_ns)));
- AsyncCapturerInvoke("OnIncomingFrame",
- &webrtc::AndroidVideoCapturer::OnIncomingFrame,
- buffer, 0, timestamp_ns);
+void AndroidVideoCapturerJni::OnTextureFrame(
+ int width,
+ int height,
+ int64_t timestamp_ns,
+ const NativeTextureHandleImpl& handle) {
+ RTC_NOTREACHED()
+ << "The rest of the stack for Android expects the native "
+ "handle to be a NativeHandleImpl with a SurfaceTexture, not a "
+ "NativeTextureHandleImpl";
+ // rtc::scoped_refptr<webrtc::VideoFrameBuffer> buffer(
perkj_webrtc 2015/10/15 11:31:11 Keep the code. Add Todo and add the bug number we
+ // new rtc::RefCountedObject<AndroidTextureBuffer>(
+ // width, height, handle,
+ // rtc::Bind(&AndroidVideoCapturerJni::ReturnBuffer, this,
+ // timestamp_ns)));
+ // AsyncCapturerInvoke("OnIncomingFrame",
+ // &webrtc::AndroidVideoCapturer::OnIncomingFrame,
+ // buffer, 0, timestamp_ns);
}
void AndroidVideoCapturerJni::OnOutputFormatRequest(int width,
@@ -228,8 +233,8 @@ JOW(void, VideoCapturerAndroid_00024NativeObserver_nativeOnTextureFrameCaptured)
jlong j_timestamp) {
reinterpret_cast<AndroidVideoCapturerJni*>(j_capturer)
->OnTextureFrame(j_width, j_height, j_timestamp,
- NativeHandleImpl(jni, j_oes_texture_id,
- j_transform_matrix));
+ NativeTextureHandleImpl(jni, j_oes_texture_id,
+ j_transform_matrix));
}
JOW(void, VideoCapturerAndroid_00024NativeObserver_nativeCapturerStarted)
« no previous file with comments | « talk/app/webrtc/java/jni/androidvideocapturer_jni.h ('k') | talk/app/webrtc/java/jni/native_handle_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698