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

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

Issue 2357113002: Revert of Delete VideoFrameFactory, CapturedFrame, and related code. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 3 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/engine/webrtcvideoframe.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.cc
diff --git a/webrtc/media/engine/webrtcvideoframe.cc b/webrtc/media/engine/webrtcvideoframe.cc
index dfe012b05221353904510a482c2784ce06fb32a6..f35a45ac6c3a767f2d8b7a0c3c6cbeda5dfcdad5 100644
--- a/webrtc/media/engine/webrtcvideoframe.cc
+++ b/webrtc/media/engine/webrtcvideoframe.cc
@@ -64,6 +64,14 @@
return Reset(format, w, h, dw, dh, sample, sample_size,
time_stamp_ns / rtc::kNumNanosecsPerMicrosec, rotation,
true /*apply_rotation*/);
+}
+
+bool WebRtcVideoFrame::Init(const CapturedFrame* frame, int dw, int dh,
+ bool apply_rotation) {
+ return Reset(frame->fourcc, frame->width, frame->height, dw, dh,
+ static_cast<uint8_t*>(frame->data), frame->data_size,
+ frame->time_stamp / rtc::kNumNanosecsPerMicrosec,
+ frame->rotation, apply_rotation);
}
int WebRtcVideoFrame::width() const {
« no previous file with comments | « webrtc/media/engine/webrtcvideoframe.h ('k') | webrtc/media/engine/webrtcvideoframe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698