
* 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
37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
/*
|
|
* 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_
|