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

Unified Diff: media/cast/rtp_timestamp_helper.cc

Issue 295603004: [Cast] Aggressively send sender reports until first receiver report is received. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « media/cast/rtcp/rtcp.h ('k') | media/cast/video_sender/video_sender.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/rtp_timestamp_helper.cc
diff --git a/media/cast/rtp_timestamp_helper.cc b/media/cast/rtp_timestamp_helper.cc
index a0c56c09eabdde82e7c6d4e1208813c672fb64ce..3349e7b33fd4adf9d8a176c05984c69801950879 100644
--- a/media/cast/rtp_timestamp_helper.cc
+++ b/media/cast/rtp_timestamp_helper.cc
@@ -19,9 +19,10 @@ bool RtpTimestampHelper::GetCurrentTimeAsRtpTimestamp(
const base::TimeTicks& now, uint32* rtp_timestamp) const {
if (last_capture_time_.is_null())
return false;
- base::TimeDelta elapsed_time = now - last_capture_time_;
- *rtp_timestamp = last_rtp_timestamp_ + elapsed_time.InMilliseconds() *
miu 2014/05/23 22:41:28 Not sure whether this was hurting anything, but th
- frequency_ / base::Time::kMillisecondsPerSecond;
+ const base::TimeDelta elapsed_time = now - last_capture_time_;
+ const int64 rtp_delta =
+ elapsed_time * frequency_ / base::TimeDelta::FromSeconds(1);
hubbe 2014/05/23 22:47:34 I think this will wrap around actually...
+ *rtp_timestamp = last_rtp_timestamp_ + static_cast<uint32>(rtp_delta);
return true;
}
« no previous file with comments | « media/cast/rtcp/rtcp.h ('k') | media/cast/video_sender/video_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698