| Index: webrtc/video_frame.h
|
| diff --git a/webrtc/video_frame.h b/webrtc/video_frame.h
|
| index 5fd62a6bbb08e30f41d229468adfaf5e0e3cd97b..a834f83ddf1333c74e3f3f70779e905248aceec2 100644
|
| --- a/webrtc/video_frame.h
|
| +++ b/webrtc/video_frame.h
|
| @@ -22,6 +22,10 @@
|
|
|
| class VideoFrame {
|
| public:
|
| + // TODO(nisse): Deprecated. Using the default constructor violates the
|
| + // reasonable assumption that video_frame_buffer() returns a valid buffer.
|
| + VideoFrame();
|
| +
|
| // TODO(nisse): This constructor is consistent with
|
| // cricket::WebRtcVideoFrame. After the class
|
| // cricket::WebRtcVideoFrame and its baseclass cricket::VideoFrame
|
| @@ -102,6 +106,15 @@
|
| return timestamp_us() / rtc::kNumMicrosecsPerMillisec;
|
| }
|
|
|
| + // Return true if and only if video_frame_buffer() is null. Which is possible
|
| + // only if the object was default-constructed.
|
| + // TODO(nisse): Deprecated. Should be deleted in the cricket::VideoFrame and
|
| + // webrtc::VideoFrame merge. The intention is that video_frame_buffer() never
|
| + // should return nullptr. To handle potentially uninitialized or non-existent
|
| + // frames, consider using rtc::Optional. Otherwise, IsZeroSize() can be
|
| + // replaced by video_frame_buffer() == nullptr.
|
| + bool IsZeroSize() const;
|
| +
|
| // Return the underlying buffer. Never nullptr for a properly
|
| // initialized VideoFrame.
|
| rtc::scoped_refptr<webrtc::VideoFrameBuffer> video_frame_buffer() const;
|
|
|