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

Unified Diff: talk/media/base/videoframe.h

Issue 1583223002: Revert of Delete remnants of non-square pixel support from cricket::VideoFrame. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « talk/app/webrtc/videotrack_unittest.cc ('k') | talk/media/base/videoframe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/media/base/videoframe.h
diff --git a/talk/media/base/videoframe.h b/talk/media/base/videoframe.h
index 85d6ba8be2d4c12d32ea90525d2b9a65c917a039..f81c678d610bf00ce8cf6c744d2ad5442445e0b8 100644
--- a/talk/media/base/videoframe.h
+++ b/talk/media/base/videoframe.h
@@ -41,7 +41,8 @@
VideoFrame() {}
virtual ~VideoFrame() {}
- virtual bool InitToBlack(int w, int h, int64_t time_stamp) = 0;
+ virtual bool InitToBlack(int w, int h, size_t pixel_width,
+ size_t pixel_height, int64_t time_stamp) = 0;
// Creates a frame from a raw sample with FourCC |format| and size |w| x |h|.
// |h| can be negative indicating a vertically flipped image.
// |dw| is destination width; can be less than |w| if cropping is desired.
@@ -55,6 +56,8 @@
int dh,
uint8_t* sample,
size_t sample_size,
+ size_t pixel_width,
+ size_t pixel_height,
int64_t time_stamp,
webrtc::VideoRotation rotation,
bool apply_rotation) = 0;
@@ -88,6 +91,11 @@
// multiple times, but the returned object will refer to the same memory.
virtual rtc::scoped_refptr<webrtc::VideoFrameBuffer> GetVideoFrameBuffer()
const = 0;
+
+ // For retrieving the aspect ratio of each pixel. Usually this is 1x1, but
+ // the aspect_ratio_idc parameter of H.264 can specify non-square pixels.
+ virtual size_t GetPixelWidth() const = 0;
+ virtual size_t GetPixelHeight() const = 0;
virtual int64_t GetTimeStamp() const = 0;
virtual void SetTimeStamp(int64_t time_stamp) = 0;
@@ -201,7 +209,8 @@
protected:
// Creates an empty frame.
- virtual VideoFrame *CreateEmptyFrame(int w, int h,
+ virtual VideoFrame *CreateEmptyFrame(int w, int h, size_t pixel_width,
+ size_t pixel_height,
int64_t time_stamp) const = 0;
virtual void SetRotation(webrtc::VideoRotation rotation) = 0;
};
« no previous file with comments | « talk/app/webrtc/videotrack_unittest.cc ('k') | talk/media/base/videoframe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698