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

Unified Diff: webrtc/common_video/video_frame.cc

Issue 2574123002: Revert of Delete VideoFrame default constructor, and IsZeroSize method. (Closed)
Patch Set: Created 4 years 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/common_video/libyuv/webrtc_libyuv.cc ('k') | webrtc/media/base/videobroadcaster_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/video_frame.cc
diff --git a/webrtc/common_video/video_frame.cc b/webrtc/common_video/video_frame.cc
index d9c5c2f783cf6dcf7c0014112541017e5b04fb54..ab1a6bef408fdddce69fca01e510942fa645ca0d 100644
--- a/webrtc/common_video/video_frame.cc
+++ b/webrtc/common_video/video_frame.cc
@@ -22,6 +22,13 @@
// FFmpeg's decoder, used by H264DecoderImpl, requires up to 8 bytes padding due
// to optimized bitstream readers. See avcodec_decode_video2.
const size_t EncodedImage::kBufferPaddingBytesH264 = 8;
+
+VideoFrame::VideoFrame()
+ : video_frame_buffer_(nullptr),
+ timestamp_rtp_(0),
+ ntp_time_ms_(0),
+ timestamp_us_(0),
+ rotation_(kVideoRotation_0) {}
VideoFrame::VideoFrame(const rtc::scoped_refptr<VideoFrameBuffer>& buffer,
webrtc::VideoRotation rotation,
@@ -52,6 +59,10 @@
return video_frame_buffer_ ? video_frame_buffer_->height() : 0;
}
+bool VideoFrame::IsZeroSize() const {
+ return !video_frame_buffer_;
+}
+
rtc::scoped_refptr<VideoFrameBuffer> VideoFrame::video_frame_buffer() const {
return video_frame_buffer_;
}
« no previous file with comments | « webrtc/common_video/libyuv/webrtc_libyuv.cc ('k') | webrtc/media/base/videobroadcaster_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698