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

Unified 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: Fix int vs size_t comparison. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/media/base/videoframe.h
diff --git a/webrtc/media/base/videoframe.h b/webrtc/media/base/videoframe.h
index 0206ab8252022acaa1916b421742e81474d7989b..5f2b6eaee45f9b609225c87ed1fc9ec1acfa68f9 100644
--- a/webrtc/media/base/videoframe.h
+++ b/webrtc/media/base/videoframe.h
@@ -45,12 +45,13 @@ class VideoFrame {
// Basic accessors.
// Note this is the width and height without rotation applied.
- virtual size_t GetWidth() const = 0;
- virtual size_t GetHeight() const = 0;
+ virtual int width() const = 0;
+ virtual int height() const = 0;
+
+ // 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
+ virtual size_t GetWidth() const final { return width(); }
+ virtual size_t GetHeight() const final { return height(); }
- size_t GetChromaWidth() const { return (GetWidth() + 1) / 2; }
- size_t GetChromaHeight() const { return (GetHeight() + 1) / 2; }
- size_t GetChromaSize() const { return GetUPitch() * GetChromaHeight(); }
// These can return NULL if the object is not backed by a buffer.
virtual const uint8_t* GetYPlane() const = 0;
virtual const uint8_t* GetUPlane() const = 0;

Powered by Google App Engine
This is Rietveld 408576698