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

Unified Diff: media/cast/cast_defines.h

Issue 502333002: [Cast] In Audio/VideoSender, drop frames when too-long a duration is in-flight. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 | « no previous file | media/cast/sender/audio_sender.h » ('j') | media/cast/sender/frame_sender.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/cast_defines.h
diff --git a/media/cast/cast_defines.h b/media/cast/cast_defines.h
index faafddb8850e309b403b25530a58fa44164da2ba..c1fcea13a089c229ea97a4426948d8cc628ed2ef 100644
--- a/media/cast/cast_defines.h
+++ b/media/cast/cast_defines.h
@@ -195,6 +195,11 @@ inline base::TimeDelta RtpDeltaToTimeDelta(int64 rtp_delta, int rtp_timebase) {
return rtp_delta * base::TimeDelta::FromSeconds(1) / rtp_timebase;
}
+inline int64 TimeDeltaToRtpDelta(base::TimeDelta delta, int rtp_timebase) {
+ DCHECK_GT(rtp_timebase, 0);
+ return delta * rtp_timebase / base::TimeDelta::FromSeconds(1);
+}
+
} // namespace cast
} // namespace media
« no previous file with comments | « no previous file | media/cast/sender/audio_sender.h » ('j') | media/cast/sender/frame_sender.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698