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

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: 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/engine/webrtcvideoframe.h
diff --git a/webrtc/media/engine/webrtcvideoframe.h b/webrtc/media/engine/webrtcvideoframe.h
index ccdcf76f292b6ce7e9526d823ec3821f930452e2..56c24d1a98e754ca9779ec3cc2003675c2120d95 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);
size_t GetWidth() const override;
size_t GetHeight() 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,

Powered by Google App Engine
This is Rietveld 408576698