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

Unified Diff: media/cast/sender/frame_sender.cc

Issue 1484403002: cast: Support for low-latency interactive mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: media/cast/sender/frame_sender.cc
diff --git a/media/cast/sender/frame_sender.cc b/media/cast/sender/frame_sender.cc
index 44f505e8c26c03e3d9d6864fd5fa2fcc11296c45..98386fa93aed658d917b109376500a2f3304983a 100644
--- a/media/cast/sender/frame_sender.cc
+++ b/media/cast/sender/frame_sender.cc
@@ -4,6 +4,9 @@
#include "media/cast/sender/frame_sender.h"
+#include <algorithm>
+#include <vector>
+
#include "base/trace_event/trace_event.h"
#include "media/cast/cast_defines.h"
#include "media/cast/constants.h"
@@ -33,13 +36,18 @@ FrameSender::FrameSender(scoped_refptr<CastEnvironment> cast_environment,
double max_frame_rate,
base::TimeDelta min_playout_delay,
base::TimeDelta max_playout_delay,
+ base::TimeDelta animated_playout_delay,
CongestionControl* congestion_control)
: cast_environment_(cast_environment),
transport_sender_(transport_sender),
ssrc_(ssrc),
- min_playout_delay_(min_playout_delay == base::TimeDelta() ?
- max_playout_delay : min_playout_delay),
+ min_playout_delay_(min_playout_delay == base::TimeDelta()
+ ? max_playout_delay
+ : min_playout_delay),
max_playout_delay_(max_playout_delay),
+ animated_playout_delay_(animated_playout_delay == base::TimeDelta()
+ ? max_playout_delay
+ : animated_playout_delay),
send_target_playout_delay_(false),
max_frame_rate_(max_frame_rate),
num_aggressive_rtcp_reports_sent_(0),
@@ -53,7 +61,12 @@ FrameSender::FrameSender(scoped_refptr<CastEnvironment> cast_environment,
DCHECK(transport_sender_);
DCHECK_GT(rtp_timebase_, 0);
DCHECK(congestion_control_);
- SetTargetPlayoutDelay(min_playout_delay_);
+ // We assume animated content to begin with since that is the common use
+ // case today.
+ VLOG(1) << "min latency " << min_playout_delay_.InMilliseconds()
miu 2015/12/03 21:26:23 nit: VLOG(1) << SENDER_SSRC << ...and the rest...
Irfan 2015/12/04 22:45:37 Done.
+ << "max latency " << max_playout_delay.InMilliseconds()
+ << "animated latency " << animated_playout_delay.InMilliseconds();
+ SetTargetPlayoutDelay(animated_playout_delay_);
send_target_playout_delay_ = false;
memset(frame_rtp_timestamps_, 0, sizeof(frame_rtp_timestamps_));
}

Powered by Google App Engine
This is Rietveld 408576698