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

Side by Side Diff: media/cast/cast_defines.h

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr include Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/cast_environment.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_CAST_CAST_DEFINES_H_ 5 #ifndef MEDIA_CAST_CAST_DEFINES_H_
6 #define MEDIA_CAST_CAST_DEFINES_H_ 6 #define MEDIA_CAST_CAST_DEFINES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 aes_nonce[10] = (frame_id >> 8) & 0xff; 179 aes_nonce[10] = (frame_id >> 8) & 0xff;
180 aes_nonce[9] = (frame_id >> 16) & 0xff; 180 aes_nonce[9] = (frame_id >> 16) & 0xff;
181 aes_nonce[8] = (frame_id >> 24) & 0xff; 181 aes_nonce[8] = (frame_id >> 24) & 0xff;
182 182
183 for (size_t i = 0; i < kAesBlockSize; ++i) { 183 for (size_t i = 0; i < kAesBlockSize; ++i) {
184 aes_nonce[i] ^= iv_mask[i]; 184 aes_nonce[i] ^= iv_mask[i];
185 } 185 }
186 return aes_nonce; 186 return aes_nonce;
187 } 187 }
188 188
189 inline uint32 GetVideoRtpTimestamp(const base::TimeTicks& time_ticks) {
190 base::TimeTicks zero_time;
191 base::TimeDelta recorded_delta = time_ticks - zero_time;
192 // Timestamp is in 90 KHz for video.
193 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90);
194 }
195
189 } // namespace cast 196 } // namespace cast
190 } // namespace media 197 } // namespace media
191 198
192 #endif // MEDIA_CAST_CAST_DEFINES_H_ 199 #endif // MEDIA_CAST_CAST_DEFINES_H_
OLDNEW
« no previous file with comments | « media/cast/cast.gyp ('k') | media/cast/cast_environment.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698