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

Unified Diff: content/public/renderer/media_stream_video_sink.h

Issue 287313002: Pass a TimeTicks along video capture pipeline to represent capture time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged and land Created 6 years, 7 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 | « content/common/media/video_capture.h ('k') | content/public/renderer/media_stream_video_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/renderer/media_stream_video_sink.h
diff --git a/content/public/renderer/media_stream_video_sink.h b/content/public/renderer/media_stream_video_sink.h
index 663f3a86f072d4ca2907877ae60ef9949dda47e6..7aa2a5e8850cf2fa5034345c9b91dbc2de40eb0d 100644
--- a/content/public/renderer/media_stream_video_sink.h
+++ b/content/public/renderer/media_stream_video_sink.h
@@ -8,6 +8,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/time/time.h"
#include "content/common/content_export.h"
#include "content/public/renderer/media_stream_sink.h"
@@ -22,10 +23,22 @@ class WebMediaStreamTrack;
namespace content {
+// This callback is used to deliver video frames.
+// |estimated_capture_time| - An optional field to provide the capture time of
+// the delivered video frame. This field usually means the local time when the
+// video frame was generated. It is possible for this value to be null if this
+// timing information cannot be determined. There is no gurantee that this
+// value is accurate. For example video frames from a remote source can only
+// provide this timing information as an estimate.
+// |video_frame->timestamp()| gives the presentation timestamp of the video
+// frame relative to the first frame generated by the corresponding source.
+// Because a source can start generating frames before a subscriber is added,
+// the first video frame delivered may not have timestamp equal to 0.
typedef base::Callback<
- void(const scoped_refptr<media::VideoFrame>&,
- const media::VideoCaptureFormat&)>
- VideoSinkDeliverFrameCB;
+ void(const scoped_refptr<media::VideoFrame>& video_frame,
+ const media::VideoCaptureFormat& format,
+ const base::TimeTicks& estimated_capture_time)>
+ VideoCaptureDeliverFrameCB;
// MediaStreamVideoSink is an interface used for receiving video frames from a
// Video Stream Track or a Video Source.
@@ -44,7 +57,7 @@ class CONTENT_EXPORT MediaStreamVideoSink : public MediaStreamSink {
// callback immediately because it may happen on another thread.
// The added callback will be reset on the render thread.
static void AddToVideoTrack(MediaStreamVideoSink* sink,
- const VideoSinkDeliverFrameCB& callback,
+ const VideoCaptureDeliverFrameCB& callback,
const blink::WebMediaStreamTrack& track);
static void RemoveFromVideoTrack(MediaStreamVideoSink* sink,
const blink::WebMediaStreamTrack& track);
« no previous file with comments | « content/common/media/video_capture.h ('k') | content/public/renderer/media_stream_video_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698