| 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 17 matching lines...) Expand all Loading... |
| 28 // Note this is the width and height without rotation applied. | 28 // Note this is the width and height without rotation applied. |
| 29 virtual int width() const = 0; | 29 virtual int width() const = 0; |
| 30 virtual int height() const = 0; | 30 virtual int height() const = 0; |
| 31 | 31 |
| 32 // Deprecated methods, for backwards compatibility. | 32 // Deprecated methods, for backwards compatibility. |
| 33 // TODO(nisse): Delete when usage in Chrome and other applications | 33 // TODO(nisse): Delete when usage in Chrome and other applications |
| 34 // have been replaced by width() and height(). | 34 // have been replaced by width() and height(). |
| 35 virtual size_t GetWidth() const final { return width(); } | 35 virtual size_t GetWidth() const final { return width(); } |
| 36 virtual size_t GetHeight() const final { return height(); } | 36 virtual size_t GetHeight() const final { return height(); } |
| 37 | 37 |
| 38 // These can return NULL if the object is not backed by a buffer. |
| 39 virtual const uint8_t* GetYPlane() const = 0; |
| 40 virtual const uint8_t* GetUPlane() const = 0; |
| 41 virtual const uint8_t* GetVPlane() const = 0; |
| 42 virtual uint8_t* GetYPlane() = 0; |
| 43 virtual uint8_t* GetUPlane() = 0; |
| 44 virtual uint8_t* GetVPlane() = 0; |
| 45 |
| 46 virtual int32_t GetYPitch() const = 0; |
| 47 virtual int32_t GetUPitch() const = 0; |
| 48 virtual int32_t GetVPitch() const = 0; |
| 49 |
| 38 // 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 |
| 39 // 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 |
| 40 // longer in use, so the underlying resource can be freed. | 52 // longer in use, so the underlying resource can be freed. |
| 41 virtual void* GetNativeHandle() const = 0; | 53 virtual void* GetNativeHandle() const = 0; |
| 42 | 54 |
| 43 // 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 |
| 44 // 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. |
| 45 virtual const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& | 57 virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() |
| 46 video_frame_buffer() const = 0; | 58 const = 0; |
| 47 | 59 |
| 48 // System monotonic clock, same timebase as rtc::TimeMicros(). | 60 // System monotonic clock, same timebase as rtc::TimeMicros(). |
| 49 virtual int64_t timestamp_us() const = 0; | 61 virtual int64_t timestamp_us() const = 0; |
| 50 virtual void set_timestamp_us(int64_t time_us) = 0; | 62 virtual void set_timestamp_us(int64_t time_us) = 0; |
| 51 | 63 |
| 52 // Deprecated methods, for backwards compatibility. | 64 // Deprecated methods, for backwards compatibility. |
| 53 // TODO(nisse): Delete when usage in Chrome and other applications | 65 // TODO(nisse): Delete when usage in Chrome and other applications |
| 54 // have been replaced. | 66 // have been replaced. |
| 55 virtual int64_t GetTimeStamp() const { | 67 virtual int64_t GetTimeStamp() const { |
| 56 return rtc::kNumNanosecsPerMicrosec * timestamp_us(); | 68 return rtc::kNumNanosecsPerMicrosec * timestamp_us(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // Creates an empty frame. | 150 // Creates an empty frame. |
| 139 virtual VideoFrame* CreateEmptyFrame(int w, | 151 virtual VideoFrame* CreateEmptyFrame(int w, |
| 140 int h, | 152 int h, |
| 141 int64_t timestamp_us) const = 0; | 153 int64_t timestamp_us) const = 0; |
| 142 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; | 154 virtual void set_rotation(webrtc::VideoRotation rotation) = 0; |
| 143 }; | 155 }; |
| 144 | 156 |
| 145 } // namespace cricket | 157 } // namespace cricket |
| 146 | 158 |
| 147 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 159 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
| OLD | NEW |