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

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: remote address not needed in new message Created 6 years, 11 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>
10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 14
15 namespace media { 15 namespace media {
16 namespace cast { 16 namespace cast {
17 namespace transport { 17 namespace transport {
18 18
19 // TODO(mikhal): Implement and add more types. 19 // TODO(mikhal): Implement and add more types.
20 enum CastTransportStatus { 20 enum CastTransportStatus {
(...skipping 23 matching lines...) Expand all
44 kPacketTypePayloadSpecific = 206, 44 kPacketTypePayloadSpecific = 206,
45 kPacketTypeXr = 207, 45 kPacketTypeXr = 207,
46 kPacketTypeHigh = 210, // Port Mapping. 46 kPacketTypeHigh = 210, // Port Mapping.
47 }; 47 };
48 48
49 // Each uint16 represents one packet id within a cast frame. 49 // Each uint16 represents one packet id within a cast frame.
50 typedef std::set<uint16> PacketIdSet; 50 typedef std::set<uint16> PacketIdSet;
51 // Each uint8 represents one cast frame. 51 // Each uint8 represents one cast frame.
52 typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap; 52 typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap;
53 53
54
55 class FrameIdWrapHelper { 54 class FrameIdWrapHelper {
56 public: 55 public:
57 FrameIdWrapHelper() 56 FrameIdWrapHelper()
58 : first_(true), 57 : first_(true),
59 frame_id_wrap_count_(0), 58 frame_id_wrap_count_(0),
60 range_(kLowRange) {} 59 range_(kLowRange) {}
61 60
62 uint32 MapTo32bitsFrameId(const uint8 over_the_wire_frame_id) { 61 uint32 MapTo32bitsFrameId(const uint8 over_the_wire_frame_id) {
63 if (first_) { 62 if (first_) {
64 first_ = false; 63 first_ = false;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 base::TimeDelta recorded_delta = time_ticks - zero_time; 120 base::TimeDelta recorded_delta = time_ticks - zero_time;
122 // Timestamp is in 90 KHz for video. 121 // Timestamp is in 90 KHz for video.
123 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); 122 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90);
124 } 123 }
125 124
126 } // namespace transport 125 } // namespace transport
127 } // namespace cast 126 } // namespace cast
128 } // namespace media 127 } // namespace media
129 128
130 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ 129 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698