| 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 27 matching lines...) Expand all Loading... |
| 38 int dw, | 38 int dw, |
| 39 int dh, | 39 int dh, |
| 40 uint8_t* sample, | 40 uint8_t* sample, |
| 41 size_t sample_size, | 41 size_t sample_size, |
| 42 int64_t time_stamp, | 42 int64_t time_stamp, |
| 43 webrtc::VideoRotation rotation, | 43 webrtc::VideoRotation rotation, |
| 44 bool apply_rotation) = 0; | 44 bool apply_rotation) = 0; |
| 45 | 45 |
| 46 // Basic accessors. | 46 // Basic accessors. |
| 47 // Note this is the width and height without rotation applied. | 47 // Note this is the width and height without rotation applied. |
| 48 virtual size_t GetWidth() const = 0; | 48 virtual int width() const = 0; |
| 49 virtual size_t GetHeight() const = 0; | 49 virtual int height() const = 0; |
| 50 | 50 |
| 51 size_t GetChromaWidth() const { return (GetWidth() + 1) / 2; } | 51 // Deprecated methods, for backwards compatibility. |
| 52 size_t GetChromaHeight() const { return (GetHeight() + 1) / 2; } | 52 // TODO(nisse): Delete when usage in Chrome and other applications |
| 53 size_t GetChromaSize() const { return GetUPitch() * GetChromaHeight(); } | 53 // have been replaced by width() and height(). |
| 54 virtual size_t GetWidth() const final { return width(); } |
| 55 virtual size_t GetHeight() const final { return height(); } |
| 56 |
| 54 // These can return NULL if the object is not backed by a buffer. | 57 // These can return NULL if the object is not backed by a buffer. |
| 55 virtual const uint8_t* GetYPlane() const = 0; | 58 virtual const uint8_t* GetYPlane() const = 0; |
| 56 virtual const uint8_t* GetUPlane() const = 0; | 59 virtual const uint8_t* GetUPlane() const = 0; |
| 57 virtual const uint8_t* GetVPlane() const = 0; | 60 virtual const uint8_t* GetVPlane() const = 0; |
| 58 virtual uint8_t* GetYPlane() = 0; | 61 virtual uint8_t* GetYPlane() = 0; |
| 59 virtual uint8_t* GetUPlane() = 0; | 62 virtual uint8_t* GetUPlane() = 0; |
| 60 virtual uint8_t* GetVPlane() = 0; | 63 virtual uint8_t* GetVPlane() = 0; |
| 61 | 64 |
| 62 virtual int32_t GetYPitch() const = 0; | 65 virtual int32_t GetYPitch() const = 0; |
| 63 virtual int32_t GetUPitch() const = 0; | 66 virtual int32_t GetUPitch() const = 0; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 | 166 |
| 164 // Creates an empty frame. | 167 // Creates an empty frame. |
| 165 virtual VideoFrame *CreateEmptyFrame(int w, int h, | 168 virtual VideoFrame *CreateEmptyFrame(int w, int h, |
| 166 int64_t time_stamp) const = 0; | 169 int64_t time_stamp) const = 0; |
| 167 virtual void SetRotation(webrtc::VideoRotation rotation) = 0; | 170 virtual void SetRotation(webrtc::VideoRotation rotation) = 0; |
| 168 }; | 171 }; |
| 169 | 172 |
| 170 } // namespace cricket | 173 } // namespace cricket |
| 171 | 174 |
| 172 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 175 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
| OLD | NEW |