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

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

Issue 2076113002: Revert of Delete unused and almost unused frame-related methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 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.cc
diff --git a/webrtc/media/engine/webrtcvideoframe.cc b/webrtc/media/engine/webrtcvideoframe.cc
index 4f89c8b85d100562d14cb891c6b11e8f67f247d1..f77ca70fa3d7537c24e76045c43ee121df4b5d44 100644
--- a/webrtc/media/engine/webrtcvideoframe.cc
+++ b/webrtc/media/engine/webrtcvideoframe.cc
@@ -63,6 +63,20 @@
static_cast<uint8_t*>(frame->data), frame->data_size,
frame->time_stamp / rtc::kNumNanosecsPerMicrosec,
frame->rotation, apply_rotation);
+}
+
+// TODO(nisse): Deprecated, delete as soon as Chrome is updated.
+bool WebRtcVideoFrame::InitToBlack(int w, int h,
+ int64_t time_stamp_ns) {
+ rtc::scoped_refptr<webrtc::I420Buffer> buffer(
+ new rtc::RefCountedObject<webrtc::I420Buffer>(w, h));
+ buffer->SetToBlack();
+
+ video_frame_buffer_ = new rtc::RefCountedObject<webrtc::I420Buffer>(w, h);
+ SetTimeStamp(time_stamp_ns);
+ rotation_ = webrtc::kVideoRotation_0;
+
+ return true;
}
int WebRtcVideoFrame::width() const {
« no previous file with comments | « webrtc/media/engine/webrtcvideoframe.h ('k') | webrtc/modules/video_coding/codecs/h264/h264_decoder_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698