OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 virtual int32_t GetUPitch() const = 0; | 47 virtual int32_t GetUPitch() const = 0; |
48 virtual int32_t GetVPitch() const = 0; | 48 virtual int32_t GetVPitch() const = 0; |
49 | 49 |
50 // Returns the handle of the underlying video frame. This is used when the | 50 // Returns the handle of the underlying video frame. This is used when the |
51 // frame is backed by a texture. The object should be destroyed when it is no | 51 // frame is backed by a texture. The object should be destroyed when it is no |
52 // longer in use, so the underlying resource can be freed. | 52 // longer in use, so the underlying resource can be freed. |
53 virtual void* GetNativeHandle() const = 0; | 53 virtual void* GetNativeHandle() const = 0; |
54 | 54 |
55 // Returns the underlying video frame buffer. This function is ok to call | 55 // Returns the underlying video frame buffer. This function is ok to call |
56 // multiple times, but the returned object will refer to the same memory. | 56 // multiple times, but the returned object will refer to the same memory. |
57 // TODO(nisse): Change to return a const ref to a scoped_refptr, for | |
58 // consistency with webrtc::VideoFrame. | |
59 virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() | 57 virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() |
60 const = 0; | 58 const = 0; |
61 | 59 |
62 // System monotonic clock, same timebase as rtc::TimeMicros(). | 60 // System monotonic clock, same timebase as rtc::TimeMicros(). |
63 virtual int64_t timestamp_us() const = 0; | 61 virtual int64_t timestamp_us() const = 0; |
64 virtual void set_timestamp_us(int64_t time_us) = 0; | 62 virtual void set_timestamp_us(int64_t time_us) = 0; |
65 | 63 |
66 // Deprecated methods, for backwards compatibility. | 64 // Deprecated methods, for backwards compatibility. |
67 // TODO(nisse): Delete when usage in Chrome and other applications | 65 // TODO(nisse): Delete when usage in Chrome and other applications |
68 // have been replaced. | 66 // have been replaced. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // Creates an empty frame. | 150 // Creates an empty frame. |
153 virtual VideoFrame* CreateEmptyFrame(int w, | 151 virtual VideoFrame* CreateEmptyFrame(int w, |
154 int h, | 152 int h, |
155 int64_t timestamp_us) const = 0; | 153 int64_t timestamp_us) const = 0; |
156 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; | 154 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; |
157 }; | 155 }; |
158 | 156 |
159 } // namespace cricket | 157 } // namespace cricket |
160 | 158 |
161 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 159 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
OLD | NEW |