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

Unified Diff: webrtc/media/engine/webrtcvideoframe.h

Issue 1831523004: Move InitToBlack and Reset methods from cricket::VideoFrame to its subclass cricket::WebRtcVideoFra… (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/base/videoframe_unittest.h ('k') | webrtc/media/engine/webrtcvideoframe_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoframe.h
diff --git a/webrtc/media/engine/webrtcvideoframe.h b/webrtc/media/engine/webrtcvideoframe.h
index 3af5fae48c4c1b9b2a9fdecfa56eb93a8484c126..cb280b5e153beb20b69adb9565073d64681dce08 100644
--- a/webrtc/media/engine/webrtcvideoframe.h
+++ b/webrtc/media/engine/webrtcvideoframe.h
@@ -51,19 +51,7 @@ class WebRtcVideoFrame : public VideoFrame {
void InitToEmptyBuffer(int w, int h, int64_t time_stamp_ns);
- bool InitToBlack(int w, int h, int64_t time_stamp_ns) override;
-
- // From base class VideoFrame.
- bool Reset(uint32_t format,
- int w,
- int h,
- int dw,
- int dh,
- uint8_t* sample,
- size_t sample_size,
- int64_t time_stamp_ns,
- webrtc::VideoRotation rotation,
- bool apply_rotation) override;
+ bool InitToBlack(int w, int h, int64_t time_stamp_ns);
int width() const override;
int height() const override;
@@ -103,6 +91,21 @@ class WebRtcVideoFrame : public VideoFrame {
void SetRotation(webrtc::VideoRotation rotation) override {
rotation_ = rotation;
}
+ // 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.
+ // |dh| is destination height, like |dw|, but must be a positive number.
+ // Returns whether the function succeeded or failed.
+ bool Reset(uint32_t format,
+ int w,
+ int h,
+ int dw,
+ int dh,
+ uint8_t* sample,
+ size_t sample_size,
+ int64_t time_stamp_ns,
+ webrtc::VideoRotation rotation,
+ bool apply_rotation);
private:
VideoFrame* CreateEmptyFrame(int w, int h,
« no previous file with comments | « webrtc/media/base/videoframe_unittest.h ('k') | webrtc/media/engine/webrtcvideoframe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698