Remove usage of webrtc::NativeHandle since is just adds an extra level of indirection.
BUG=1128
R=magjed@webrtc.org, pbos@webrtc.org
TBR=mflodman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/43999004
Cr-Commit-Position: refs/heads/master@{#8932}
diff --git a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc b/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
index da6921f..2c2c12d 100644
--- a/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
+++ b/talk/app/webrtc/java/jni/androidmediadecoder_jni.cc
@@ -654,8 +654,9 @@
int32_t callback_status = WEBRTC_VIDEO_CODEC_OK;
if (use_surface_) {
native_handle_.SetTextureObject(surface_texture_, texture_id);
- I420VideoFrame texture_image(
- &native_handle_, width, height, output_timestamp_, 0);
+ I420VideoFrame 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 7de29d1..a10a4f3 100644
--- a/talk/app/webrtc/java/jni/native_handle_impl.h
+++ b/talk/app/webrtc/java/jni/native_handle_impl.h
@@ -33,19 +33,12 @@
namespace webrtc_jni {
-// Wrapper for texture object in TextureBuffer.
-class NativeHandleImpl : public webrtc::NativeHandle {
+// Wrapper for texture object.
+class NativeHandleImpl {
public:
- NativeHandleImpl() :
- ref_count_(0), texture_object_(NULL), texture_id_(-1) {}
- virtual ~NativeHandleImpl() {}
- virtual int32_t AddRef() {
- return ++ref_count_;
- }
- virtual int32_t Release() {
- return --ref_count_;
- }
- virtual void* GetHandle() {
+ NativeHandleImpl() : texture_object_(NULL), texture_id_(-1) {}
+
+ void* GetHandle() {
return texture_object_;
}
int GetTextureId() {
@@ -55,12 +48,8 @@
texture_object_ = reinterpret_cast<jobject>(texture_object);
texture_id_ = texture_id;
}
- int32_t ref_count() {
- return ref_count_;
- }
private:
- int32_t ref_count_;
jobject texture_object_;
int32_t texture_id_;
};