Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(903)

Unified Diff: webrtc/common_video/include/video_frame_buffer.h

Issue 2517173004: Move VideoFrame and related declarations to webrtc/api/video. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/common_video/include/video_frame_buffer.h
diff --git a/webrtc/common_video/include/video_frame_buffer.h b/webrtc/common_video/include/video_frame_buffer.h
index 287624e59ec5076f72ad0d87a856a6fe8e0ba8b0..4cf9528df95bb76bad24ed93a5a319c066d31325 100644
--- a/webrtc/common_video/include/video_frame_buffer.h
+++ b/webrtc/common_video/include/video_frame_buffer.h
@@ -11,50 +11,16 @@
#ifndef WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
the sun 2016/11/24 10:36:59 Change name of this file to i420_buffer.h ?
nisse-webrtc 2016/11/25 08:58:02 Since this cl is already pretty large, I'd prefer
#define WEBRTC_COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
-#include <stdint.h>
-
#include <memory>
+#include "webrtc/api/video/rotation.h"
+#include "webrtc/api/video/video_frame_buffer.h"
#include "webrtc/base/callback.h"
-#include "webrtc/base/refcount.h"
#include "webrtc/base/scoped_ref_ptr.h"
-#include "webrtc/common_video/rotation.h"
#include "webrtc/system_wrappers/include/aligned_malloc.h"
namespace webrtc {
-// Interface of a simple frame buffer containing pixel data. This interface does
-// not contain any frame metadata such as rotation, timestamp, pixel_width, etc.
-class VideoFrameBuffer : public rtc::RefCountInterface {
- public:
- // The resolution of the frame in pixels. For formats where some planes are
- // subsampled, this is the highest-resolution plane.
- virtual int width() const = 0;
- virtual int height() const = 0;
-
- // Returns pointer to the pixel data for a given plane. The memory is owned by
- // the VideoFrameBuffer object and must not be freed by the caller.
- virtual const uint8_t* DataY() const = 0;
- virtual const uint8_t* DataU() const = 0;
- virtual const uint8_t* DataV() const = 0;
-
- // Returns the number of bytes between successive rows for a given plane.
- virtual int StrideY() const = 0;
- virtual int StrideU() const = 0;
- virtual int StrideV() const = 0;
-
- // Return the handle of the underlying video frame. This is used when the
- // frame is backed by a texture.
- virtual void* native_handle() const = 0;
-
- // Returns a new memory-backed frame buffer converted from this buffer's
- // native handle.
- virtual rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() = 0;
-
- protected:
- virtual ~VideoFrameBuffer();
-};
-
// Plain I420 buffer in standard memory.
class I420Buffer : public VideoFrameBuffer {
public:

Powered by Google App Engine
This is Rietveld 408576698