OLD | NEW |
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_NET_CAST_NET_DEFINES_H_ | 5 #ifndef MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ |
6 #define MEDIA_CAST_NET_CAST_NET_DEFINES_H_ | 6 #define MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
11 namespace media { | 11 namespace media { |
12 namespace cast { | 12 namespace cast { |
| 13 namespace transport { |
13 | 14 |
14 // Rtcp defines. | 15 // Rtcp defines. |
15 | 16 |
16 // Log messages form sender to receiver. | 17 // Log messages form sender to receiver. |
17 enum RtcpSenderFrameStatus { | 18 enum RtcpSenderFrameStatus { |
18 kRtcpSenderFrameStatusUnknown = 0, | 19 kRtcpSenderFrameStatusUnknown = 0, |
19 kRtcpSenderFrameStatusDroppedByEncoder = 1, | 20 kRtcpSenderFrameStatusDroppedByEncoder = 1, |
20 kRtcpSenderFrameStatusDroppedByFlowControl = 2, | 21 kRtcpSenderFrameStatusDroppedByFlowControl = 2, |
21 kRtcpSenderFrameStatusSentToNetwork = 3, | 22 kRtcpSenderFrameStatusSentToNetwork = 3, |
22 }; | 23 }; |
(...skipping 22 matching lines...) Expand all Loading... |
45 uint32 jitter; | 46 uint32 jitter; |
46 uint32 last_sr; | 47 uint32 last_sr; |
47 uint32 delay_since_last_sr; | 48 uint32 delay_since_last_sr; |
48 }; | 49 }; |
49 | 50 |
50 struct RtcpDlrrReportBlock { | 51 struct RtcpDlrrReportBlock { |
51 uint32 last_rr; | 52 uint32 last_rr; |
52 uint32 delay_since_last_rr; | 53 uint32 delay_since_last_rr; |
53 }; | 54 }; |
54 | 55 |
| 56 inline bool operator==(RtcpSenderInfo lhs, RtcpSenderInfo rhs) { |
| 57 return lhs.ntp_seconds == rhs.ntp_seconds && |
| 58 lhs.ntp_fraction == rhs.ntp_fraction && |
| 59 lhs.rtp_timestamp == rhs.rtp_timestamp && |
| 60 lhs.send_packet_count == rhs.send_packet_count && |
| 61 lhs.send_octet_count == rhs.send_octet_count; |
| 62 } |
| 63 |
55 typedef std::list<RtcpSenderFrameLogMessage> RtcpSenderLogMessage; | 64 typedef std::list<RtcpSenderFrameLogMessage> RtcpSenderLogMessage; |
56 | 65 |
57 class FrameIdWrapHelper { | 66 class FrameIdWrapHelper { |
58 public: | 67 public: |
59 FrameIdWrapHelper() | 68 FrameIdWrapHelper() |
60 : first_(true), | 69 : first_(true), |
61 frame_id_wrap_count_(0), | 70 frame_id_wrap_count_(0), |
62 range_(kLowRange) {} | 71 range_(kLowRange) {} |
63 | 72 |
64 uint32 MapTo32bitsFrameId(const uint8 over_the_wire_frame_id) { | 73 uint32 MapTo32bitsFrameId(const uint8 over_the_wire_frame_id) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 | 120 |
112 static const uint8 kLowRangeThreshold = 0x0f; | 121 static const uint8 kLowRangeThreshold = 0x0f; |
113 static const uint8 kHighRangeThreshold = 0xf0; | 122 static const uint8 kHighRangeThreshold = 0xf0; |
114 static const uint32 kStartFrameId = GG_UINT32_C(0xffffffff); | 123 static const uint32 kStartFrameId = GG_UINT32_C(0xffffffff); |
115 | 124 |
116 bool first_; | 125 bool first_; |
117 uint32 frame_id_wrap_count_; | 126 uint32 frame_id_wrap_count_; |
118 Range range_; | 127 Range range_; |
119 }; | 128 }; |
120 | 129 |
| 130 } // namespace transport |
121 } // namespace cast | 131 } // namespace cast |
122 } // namespace media | 132 } // namespace media |
123 | 133 |
124 #endif // MEDIA_CAST_NET_CAST_NET_DEFINES_H_ | 134 #endif // MEDIA_CAST_TRANSPORT_CAST_TRANSPORT_DEFINES_H_ |
OLD | NEW |