Per e41d774c4d Revert "Remove usage of webrtc::NativeHandle since is just adds an extra level of indirection."
This reverts commit 75db8612588b4fabdf1b05f4ab145f7737093b45.

Revert "Fix build breakage in WrappedI420Buffer::native_handle()"

This reverts commit 3211934ebf7cac3e6df2cb4aacb6e47cc1cffe2b.

Reason for revert: Breaks chrome build and tests on clank, See https://codereview.chromium.org/1067803002/

BUG=1128
TBR=magjed@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43079004

Cr-Commit-Position: refs/heads/master@{#8940}
2015-04-07 15:20:56 +00:00

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
// TextureBuffer. 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_