* Update libjingle to 50389769.
* Together with "Add texture support for i420 video frame." from
wuchengli@chromium.org.
https://webrtc-codereview.appspot.com/1413004
RISK=P1
TESTED=try bots
R=fischman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1967004
git-svn-id: http://webrtc.googlecode.com/svn/trunk@4489 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/common_video/interface/native_handle.h b/webrtc/common_video/interface/native_handle.h
new file mode 100644
index 0000000..d078d4c
--- /dev/null
+++ b/webrtc/common_video/interface/native_handle.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef COMMON_VIDEO_INTERFACE_NATIVEHANDLE_H_
+#define COMMON_VIDEO_INTERFACE_NATIVEHANDLE_H_
+
+#include "webrtc/typedefs.h"
+
+namespace webrtc {
+
+// A class to store an opaque handle of the underlying video frame. This is used
+// when the frame is backed by a texture. WebRTC carries the handle in
+// TextureVideoFrame. This object keeps a reference to the handle. The reference
+// is cleared when the object is destroyed. It is important to destroy the
+// object as soon as possible so the texture can be recycled.
+class NativeHandle {
+ public:
+ virtual ~NativeHandle() {}
+ // For scoped_refptr
+ virtual int32_t AddRef() = 0;
+ virtual int32_t Release() = 0;
+
+ // Gets the handle.
+ virtual void* GetHandle() = 0;
+};
+
+} // namespace webrtc
+
+#endif // COMMON_VIDEO_INTERFACE_NATIVEHANDLE_H_