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

Side by Side Diff: webrtc/media/base/videoframe.h

Issue 1838353004: cricket::VideoFrame cleanup. New width() and height(). Deleted GetChroma* methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Use objc dot syntax. Delete chromaSize property. Created 4 years, 8 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
OLDNEW
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
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 to remove them pref. (and when they're
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698