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

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

Issue 2088193002: Add TODO comments on deprecated VideoFrame methods. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Provide per-method advice for deprecated methods. 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
« no previous file with comments | « webrtc/media/base/videoframe.h ('k') | webrtc/video_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoframe.h
diff --git a/webrtc/media/engine/webrtcvideoframe.h b/webrtc/media/engine/webrtcvideoframe.h
index 487e32ef9af23630f749f65dca93558d80555eef..29bdb32f2b2a9314412a026bee74ace330843e09 100644
--- a/webrtc/media/engine/webrtcvideoframe.h
+++ b/webrtc/media/engine/webrtcvideoframe.h
@@ -24,16 +24,24 @@ namespace cricket {
struct CapturedFrame;
+// TODO(nisse): This class will be deleted when the cricket::VideoFrame and
+// webrtc::VideoFrame classes are merged. See
+// https://bugs.chromium.org/p/webrtc/issues/detail?id=5682. Try to use only the
+// preferred constructor, and the non-deprecated methods of the VideoFrame base
+// class.
class WebRtcVideoFrame : public VideoFrame {
public:
+ // TODO(nisse): Deprecated. Using the default constructor violates the
+ // reasonable assumption that video_frame_buffer() returns a valid buffer.
WebRtcVideoFrame();
- // Preferred construction, with microsecond timestamp.
+ // Preferred constructor.
WebRtcVideoFrame(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer,
webrtc::VideoRotation rotation,
int64_t timestamp_us);
- // TODO(nisse): Deprecate/delete.
+ // TODO(nisse): Deprecated, delete as soon as all callers have switched to the
+ // above constructor with microsecond timestamp.
WebRtcVideoFrame(const rtc::scoped_refptr<webrtc::VideoFrameBuffer>& buffer,
int64_t time_stamp_ns,
webrtc::VideoRotation rotation);
@@ -54,10 +62,13 @@ class WebRtcVideoFrame : public VideoFrame {
int64_t time_stamp_ns,
webrtc::VideoRotation rotation);
- // The timestamp of the captured frame is expected to use the same
- // timescale and epoch as rtc::Time.
- // TODO(nisse): Consider adding a warning message, or even an RTC_DCHECK, if
- // the time is too far off.
+ // TODO(nisse): We're moving to have all timestamps use the same
+ // time scale as rtc::TimeMicros. However, this method is used by
+ // WebRtcVideoFrameFactory::CreateAliasedFrame this code path
+ // currently does not conform to the new timestamp conventions and
+ // may use the camera's own clock instead. It's unclear if this
+ // should be fixed, or if instead all of the VideoFrameFactory
+ // abstraction should be eliminated.
bool Init(const CapturedFrame* frame, int dw, int dh, bool apply_rotation);
void InitToEmptyBuffer(int w, int h);
« no previous file with comments | « webrtc/media/base/videoframe.h ('k') | webrtc/video_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698