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. |
pbos-webrtc
2016/03/31 14:49:09
Put a TODO with you as owner to remove them. And t
| |
52 size_t GetChromaHeight() const { return (GetHeight() + 1) / 2; } | 52 virtual size_t GetWidth() const final { return width(); } |
53 size_t GetChromaSize() const { return GetUPitch() * GetChromaHeight(); } | 53 virtual size_t GetHeight() const final { return height(); } |
54 | |
54 // These can return NULL if the object is not backed by a buffer. | 55 // These can return NULL if the object is not backed by a buffer. |
55 virtual const uint8_t* GetYPlane() const = 0; | 56 virtual const uint8_t* GetYPlane() const = 0; |
56 virtual const uint8_t* GetUPlane() const = 0; | 57 virtual const uint8_t* GetUPlane() const = 0; |
57 virtual const uint8_t* GetVPlane() const = 0; | 58 virtual const uint8_t* GetVPlane() const = 0; |
58 virtual uint8_t* GetYPlane() = 0; | 59 virtual uint8_t* GetYPlane() = 0; |
59 virtual uint8_t* GetUPlane() = 0; | 60 virtual uint8_t* GetUPlane() = 0; |
60 virtual uint8_t* GetVPlane() = 0; | 61 virtual uint8_t* GetVPlane() = 0; |
61 | 62 |
62 virtual int32_t GetYPitch() const = 0; | 63 virtual int32_t GetYPitch() const = 0; |
63 virtual int32_t GetUPitch() const = 0; | 64 virtual int32_t GetUPitch() const = 0; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 | 164 |
164 // Creates an empty frame. | 165 // Creates an empty frame. |
165 virtual VideoFrame *CreateEmptyFrame(int w, int h, | 166 virtual VideoFrame *CreateEmptyFrame(int w, int h, |
166 int64_t time_stamp) const = 0; | 167 int64_t time_stamp) const = 0; |
167 virtual void SetRotation(webrtc::VideoRotation rotation) = 0; | 168 virtual void SetRotation(webrtc::VideoRotation rotation) = 0; |
168 }; | 169 }; |
169 | 170 |
170 } // namespace cricket | 171 } // namespace cricket |
171 | 172 |
172 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ | 173 #endif // WEBRTC_MEDIA_BASE_VIDEOFRAME_H_ |
OLD | NEW |