Revert "Convert native handles to buffers before encoding."
This reverts commit a831dc3a7d10a1fbaa258ee6b1ca6cfc7e91c5ca to unblock
rolling into Chromium.
BUG=4081
TBR=magjed@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/55549004
Cr-Commit-Position: refs/heads/master@{#9354}
diff --git a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc b/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
index 9952e26..b92b2de 100644
--- a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
+++ b/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
@@ -654,9 +654,9 @@
int32_t callback_status = WEBRTC_VIDEO_CODEC_OK;
if (use_surface_) {
native_handle_.SetTextureObject(surface_texture_, texture_id);
- VideoFrame texture_image(new rtc::RefCountedObject<JniNativeHandleBuffer>(
- &native_handle_, width, height),
- output_timestamp_, 0, webrtc::kVideoRotation_0);
+ VideoFrame texture_image(&native_handle_, width, height, output_timestamp_,
+ 0, webrtc::kVideoRotation_0,
+ rtc::Callback0<void>());
texture_image.set_ntp_time_ms(output_ntp_time_ms_);
callback_status = callback_->Decoded(texture_image);
} else {
diff --git a/talk/app/webrtc/java/jni/native_handle_impl.h b/talk/app/webrtc/java/jni/native_handle_impl.h
index cdb72ff..8c87696 100644
--- a/talk/app/webrtc/java/jni/native_handle_impl.h
+++ b/talk/app/webrtc/java/jni/native_handle_impl.h
@@ -29,9 +29,6 @@
#ifndef TALK_APP_WEBRTC_JAVA_JNI_NATIVE_HANDLE_IMPL_H_
#define TALK_APP_WEBRTC_JAVA_JNI_NATIVE_HANDLE_IMPL_H_
-#include "webrtc/base/checks.h"
-#include "webrtc/common_video/interface/video_frame_buffer.h"
-
namespace webrtc_jni {
// Wrapper for texture object.
@@ -55,23 +52,6 @@
int32_t texture_id_;
};
-class JniNativeHandleBuffer : public webrtc::NativeHandleBuffer {
- public:
- JniNativeHandleBuffer(void* native_handle, int width, int height)
- : NativeHandleBuffer(native_handle, width, height) {}
-
- // TODO(pbos): Override destructor to release native handle, at the moment the
- // native handle is not released based on refcount.
-
- private:
- rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() override {
- // TODO(pbos): Implement before using this in the encoder pipeline (or
- // remove the CHECK() in VideoCapture).
- RTC_NOTREACHED();
- return nullptr;
- }
-};
-
} // namespace webrtc_jni
#endif // TALK_APP_WEBRTC_JAVA_JNI_NATIVE_HANDLE_IMPL_H_