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

Side by Side Diff: webrtc/api/video/video_frame_buffer.h

Issue 2517173004: Move VideoFrame and related declarations to webrtc/api/video. (Closed)
Patch Set: Make rotation check clearer. Created 3 years, 11 months 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 unified diff | Download patch
« no previous file with comments | « webrtc/api/video/video_frame.cc ('k') | webrtc/common_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_API_VIDEO_VIDEO_FRAME_BUFFER_H_
12 #define WEBRTC_API_VIDEO_VIDEO_FRAME_BUFFER_H_
13
14 #include <stdint.h>
15
16 #include "webrtc/base/refcount.h"
17 #include "webrtc/base/scoped_ref_ptr.h"
18
19 namespace webrtc {
20
21 // Interface of a simple frame buffer containing pixel data. This interface does
22 // not contain any frame metadata such as rotation, timestamp, pixel_width, etc.
23 class VideoFrameBuffer : public rtc::RefCountInterface {
24 public:
25 // The resolution of the frame in pixels. For formats where some planes are
26 // subsampled, this is the highest-resolution plane.
27 virtual int width() const = 0;
28 virtual int height() const = 0;
29
30 // Returns pointer to the pixel data for a given plane. The memory is owned by
31 // the VideoFrameBuffer object and must not be freed by the caller.
32 virtual const uint8_t* DataY() const = 0;
33 virtual const uint8_t* DataU() const = 0;
34 virtual const uint8_t* DataV() const = 0;
35
36 // Returns the number of bytes between successive rows for a given plane.
37 virtual int StrideY() const = 0;
38 virtual int StrideU() const = 0;
39 virtual int StrideV() const = 0;
40
41 // Return the handle of the underlying video frame. This is used when the
42 // frame is backed by a texture.
43 virtual void* native_handle() const = 0;
44
45 // Returns a new memory-backed frame buffer converted from this buffer's
46 // native handle.
47 virtual rtc::scoped_refptr<VideoFrameBuffer> NativeToI420Buffer() = 0;
48
49 protected:
50 ~VideoFrameBuffer() override {}
51 };
52
53 } // namespace webrtc
54
55 #endif // WEBRTC_API_VIDEO_VIDEO_FRAME_BUFFER_H_
OLDNEW
« no previous file with comments | « webrtc/api/video/video_frame.cc ('k') | webrtc/common_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698