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

Side by Side Diff: media/cast/transport/cast_transport_defines.h

Issue 138753004: Cast: IPC glue between cast library transport and encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sorted deps Created 6 years, 10 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 unified diff | Download patch
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_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ 5 #ifndef MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_
6 #define MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ 6 #define MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_
7 7
8 #include <list>
9 #include <map> 8 #include <map>
10 #include <set> 9 #include <set>
11 #include <string> 10 #include <string>
12 11
13 #include "base/basictypes.h" 12 #include "base/basictypes.h"
14 #include "base/time/time.h" 13 #include "base/time/time.h"
15 14
16 namespace media { 15 namespace media {
17 namespace cast { 16 namespace cast {
18 namespace transport { 17 namespace transport {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 kPacketTypePayloadSpecific = 206, 64 kPacketTypePayloadSpecific = 206,
66 kPacketTypeXr = 207, 65 kPacketTypeXr = 207,
67 kPacketTypeHigh = 210, // Port Mapping. 66 kPacketTypeHigh = 210, // Port Mapping.
68 }; 67 };
69 68
70 // Each uint16 represents one packet id within a cast frame. 69 // Each uint16 represents one packet id within a cast frame.
71 typedef std::set<uint16> PacketIdSet; 70 typedef std::set<uint16> PacketIdSet;
72 // Each uint8 represents one cast frame. 71 // Each uint8 represents one cast frame.
73 typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap; 72 typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap;
74 73
75
76 class FrameIdWrapHelper { 74 class FrameIdWrapHelper {
77 public: 75 public:
78 FrameIdWrapHelper() 76 FrameIdWrapHelper()
79 : first_(true), 77 : first_(true),
80 frame_id_wrap_count_(0), 78 frame_id_wrap_count_(0),
81 range_(kLowRange) {} 79 range_(kLowRange) {}
82 80
83 uint32 MapTo32bitsFrameId(const uint8 over_the_wire_frame_id) { 81 uint32 MapTo32bitsFrameId(const uint8 over_the_wire_frame_id) {
84 if (first_) { 82 if (first_) {
85 first_ = false; 83 first_ = false;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 base::TimeDelta recorded_delta = time_ticks - zero_time; 140 base::TimeDelta recorded_delta = time_ticks - zero_time;
143 // Timestamp is in 90 KHz for video. 141 // Timestamp is in 90 KHz for video.
144 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); 142 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90);
145 } 143 }
146 144
147 } // namespace transport 145 } // namespace transport
148 } // namespace cast 146 } // namespace cast
149 } // namespace media 147 } // namespace media
150 148
151 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ 149 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698