OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_NET_CAST_TRANSPORT_DEFINES_H_ | 5 #ifndef MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ |
6 #define MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ | 6 #define MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 29 matching lines...) Expand all Loading... |
40 kPacketTypeLow = 194, // SMPTE time-code mapping. | 40 kPacketTypeLow = 194, // SMPTE time-code mapping. |
41 kPacketTypeSenderReport = 200, | 41 kPacketTypeSenderReport = 200, |
42 kPacketTypeReceiverReport = 201, | 42 kPacketTypeReceiverReport = 201, |
43 kPacketTypeApplicationDefined = 204, | 43 kPacketTypeApplicationDefined = 204, |
44 kPacketTypeGenericRtpFeedback = 205, | 44 kPacketTypeGenericRtpFeedback = 205, |
45 kPacketTypePayloadSpecific = 206, | 45 kPacketTypePayloadSpecific = 206, |
46 kPacketTypeXr = 207, | 46 kPacketTypeXr = 207, |
47 kPacketTypeHigh = 210, // Port Mapping. | 47 kPacketTypeHigh = 210, // Port Mapping. |
48 }; | 48 }; |
49 | 49 |
50 enum RtcpPacketField { | |
51 kRtcpSr = 0x0002, | |
52 kRtcpRr = 0x0004, | |
53 kRtcpDlrr = 0x0400, | |
54 kRtcpRrtr = 0x0800, | |
55 kRtcpCast = 0x20000, | |
56 kRtcpReceiverLog = 0x80000, | |
57 }; | |
58 | |
59 // Each uint16 represents one packet id within a cast frame. | 50 // Each uint16 represents one packet id within a cast frame. |
60 typedef std::set<uint16> PacketIdSet; | 51 typedef std::set<uint16> PacketIdSet; |
61 // Each uint8 represents one cast frame. | 52 // Each uint8 represents one cast frame. |
62 typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap; | 53 typedef std::map<uint8, PacketIdSet> MissingFramesAndPacketsMap; |
63 | 54 |
64 class FrameIdWrapHelperTest; | 55 class FrameIdWrapHelperTest; |
65 | 56 |
66 // TODO(miu): UGLY IN-LINE DEFINITION IN HEADER FILE! Move to appropriate | 57 // TODO(miu): UGLY IN-LINE DEFINITION IN HEADER FILE! Move to appropriate |
67 // location, separated into .h and .cc files. | 58 // location, separated into .h and .cc files. |
68 class FrameIdWrapHelper { | 59 class FrameIdWrapHelper { |
(...skipping 28 matching lines...) Expand all Loading... |
97 base::TimeTicks zero_time; | 88 base::TimeTicks zero_time; |
98 base::TimeDelta recorded_delta = time_ticks - zero_time; | 89 base::TimeDelta recorded_delta = time_ticks - zero_time; |
99 // Timestamp is in 90 KHz for video. | 90 // Timestamp is in 90 KHz for video. |
100 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); | 91 return static_cast<uint32>(recorded_delta.InMilliseconds() * 90); |
101 } | 92 } |
102 | 93 |
103 } // namespace cast | 94 } // namespace cast |
104 } // namespace media | 95 } // namespace media |
105 | 96 |
106 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ | 97 #endif // MEDIA_CAST_NET_CAST_TRANSPORT_DEFINES_H_ |
OLD | NEW |