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

Unified Diff: media/cast/video_receiver/video_receiver.h

Issue 192843002: Cast:Adding signaling and infrastructure for adjustable delay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nit Created 6 years, 9 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 | « media/cast/transport/rtcp/rtcp_builder.h ('k') | media/cast/video_receiver/video_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/video_receiver/video_receiver.h
diff --git a/media/cast/video_receiver/video_receiver.h b/media/cast/video_receiver/video_receiver.h
index 3c9d1f84b4ce96786bf7380e388e2683ad7f7f14..ce9f9eb7efa94a2cfd2ab133544f762e08479052 100644
--- a/media/cast/video_receiver/video_receiver.h
+++ b/media/cast/video_receiver/video_receiver.h
@@ -33,13 +33,18 @@ class Rtcp;
class RtpReceiverStatistics;
class VideoDecoder;
+// Callback used by the video receiver to inform the audio receiver of the new
+// delay used to compute the playout and render times.
+typedef base::Callback<void(base::TimeDelta)> SetTargetDelayCallback;
+
// Should only be called from the Main cast thread.
class VideoReceiver : public base::NonThreadSafe,
public base::SupportsWeakPtr<VideoReceiver> {
public:
VideoReceiver(scoped_refptr<CastEnvironment> cast_environment,
const VideoReceiverConfig& video_config,
- transport::PacedPacketSender* const packet_sender);
+ transport::PacedPacketSender* const packet_sender,
+ const SetTargetDelayCallback& target_delay_cb);
virtual ~VideoReceiver();
@@ -98,6 +103,10 @@ class VideoReceiver : public base::NonThreadSafe,
// Actually send the next RTCP report.
void SendNextRtcpReport();
+ // Update the target delay based on past information. Will also update the
+ // rtcp module and the audio receiver.
+ void UpdateTargetDelay();
+
scoped_ptr<VideoDecoder> video_decoder_;
scoped_refptr<CastEnvironment> cast_environment_;
@@ -122,6 +131,7 @@ class VideoReceiver : public base::NonThreadSafe,
base::TimeTicks time_incoming_packet_;
uint32 incoming_rtp_timestamp_;
base::TimeTicks last_render_time_;
+ SetTargetDelayCallback target_delay_cb_;
// This mapping allows us to log kVideoAckSent as a frame event. In addition
// it allows the event to be transmitted via RTCP.
« no previous file with comments | « media/cast/transport/rtcp/rtcp_builder.h ('k') | media/cast/video_receiver/video_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698