summaryrefslogtreecommitdiffstats
path: root/media/cast/cast_defines.h
diff options
context:
space:
mode:
authormikhal@google.com <mikhal@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 03:24:01 +0000
committermikhal@google.com <mikhal@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-20 03:24:01 +0000
commit7df9716b1c460092a3caca82dddfe78739940aa9 (patch)
treea57328270dafca2b95affd5bc47e546f255ea66e /media/cast/cast_defines.h
parent7cc7a2e71c9b9dc1fe1d2cf67839ed8f00169bb1 (diff)
downloadchromium_src-7df9716b1c460092a3caca82dddfe78739940aa9.zip
chromium_src-7df9716b1c460092a3caca82dddfe78739940aa9.tar.gz
chromium_src-7df9716b1c460092a3caca82dddfe78739940aa9.tar.bz2
Incorporating logging into Cast:
1. Adding logging to CastEnvironment. 2. Actually triggering logging within the cast library. 3. Adding thread checks. 4. Removing trace calls outside of the logging class. Open issues: 1.Use of rtp_timestamp and frame id is not consistent. In addition, the AudioBus does not include these values. 2. There is a pending cl to switch frame_id to int. This cl does not include that. 3. There are a few more places to add logging. As this cl is already big enough, all of the above will come in a follow-up cl. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=236034 Review URL: https://codereview.chromium.org/69603002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/cast/cast_defines.h')
-rw-r--r--media/cast/cast_defines.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/media/cast/cast_defines.h b/media/cast/cast_defines.h
index a49ce20..5eff0d7 100644
--- a/media/cast/cast_defines.h
+++ b/media/cast/cast_defines.h
@@ -186,6 +186,13 @@ inline std::string GetAesNonce(uint32 frame_id, const std::string& iv_mask) {
return aes_nonce;
}
+inline uint32 GetVideoRtpTimestamp(const base::TimeTicks& time_ticks) {
+ base::TimeTicks zero_time;
+ base::TimeDelta recorded_delta = time_ticks - zero_time;
+ // Timestamp is in 90 KHz for video.
+ return static_cast<uint32>(recorded_delta.InMilliseconds() * 90);
+}
+
} // namespace cast
} // namespace media