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_RTCP_RTCP_DEFINES_H_ | 5 #ifndef MEDIA_CAST_RTCP_RTCP_DEFINES_H_ |
6 #define MEDIA_CAST_RTCP_RTCP_DEFINES_H_ | 6 #define MEDIA_CAST_RTCP_RTCP_DEFINES_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 | 11 |
12 #include "media/cast/cast_config.h" | 12 #include "media/cast/cast_config.h" |
13 #include "media/cast/cast_defines.h" | 13 #include "media/cast/cast_defines.h" |
14 #include "media/cast/logging/logging_defines.h" | |
14 | 15 |
15 namespace media { | 16 namespace media { |
16 namespace cast { | 17 namespace cast { |
17 | 18 |
19 // Handle the per frame ACK and NACK messages. | |
18 class RtcpCastMessage { | 20 class RtcpCastMessage { |
19 public: | 21 public: |
20 explicit RtcpCastMessage(uint32 media_ssrc); | 22 explicit RtcpCastMessage(uint32 media_ssrc); |
21 ~RtcpCastMessage(); | 23 ~RtcpCastMessage(); |
22 | 24 |
23 uint32 media_ssrc_; | 25 uint32 media_ssrc_; |
24 uint8 ack_frame_id_; | 26 uint8 ack_frame_id_; |
25 MissingFramesAndPacketsMap missing_frames_and_packets_; | 27 MissingFramesAndPacketsMap missing_frames_and_packets_; |
26 }; | 28 }; |
27 | 29 |
30 // Log messages form sender to receiver. | |
31 enum RtcpSenderFrameStatus { | |
32 kRtcpSenderFrameStatusUnknown = 0, | |
33 kRtcpSenderFrameStatusDroppedByEncoder = 1, | |
34 kRtcpSenderFrameStatusDroppedByFlowControl = 2, | |
35 kRtcpSenderFrameStatusSentToNetwork = 3, | |
36 }; | |
37 | |
38 struct RtcpSenderFrameLogMessage { | |
39 RtcpSenderFrameStatus frame_status_; | |
Alpha Left Google
2013/11/13 23:58:40
If this is a struct then just |frame_status| and |
pwestin
2013/11/15 00:20:32
Done.
| |
40 uint32 rtp_timestamp_; | |
41 }; | |
42 | |
43 class RtcpSenderLogMessage { | |
Alpha Left Google
2013/11/13 23:58:40
This class is not really necessary. Just use a typ
pwestin
2013/11/15 00:20:32
Done.
| |
44 public: | |
45 std::list<RtcpSenderFrameLogMessage> frame_log_messages_; | |
46 }; | |
47 | |
48 // Log messages from receiver to sender. | |
49 struct RtcpReceiverEventLogMessage { | |
50 CastLoggingEvent type_; | |
Alpha Left Google
2013/11/13 23:58:40
This should be |type| |event_timestamp| |delay_del
pwestin
2013/11/15 00:20:32
Done.
| |
51 base::TimeTicks event_timestamp_; | |
52 base::TimeDelta delay_delta_; | |
53 uint16 packet_id_; | |
54 }; | |
55 | |
56 class RtcpReceiverFrameLogMessage { | |
57 public: | |
58 uint32 rtp_timestamp_; | |
Alpha Left Google
2013/11/13 23:58:40
|rtp_timestamp| and |event_log_messages|
pwestin
2013/11/15 00:20:32
Done.
| |
59 std::list<RtcpReceiverEventLogMessage> event_log_messages_; | |
60 }; | |
61 | |
62 class RtcpReceiverLogMessage { | |
Alpha Left Google
2013/11/13 23:58:40
This is not necessary. Just do a typedef.
pwestin
2013/11/15 00:20:32
Done.
| |
63 public: | |
64 std::list<RtcpReceiverFrameLogMessage> frame_log_messages_; | |
65 }; | |
66 | |
28 struct RtcpSenderInfo { | 67 struct RtcpSenderInfo { |
29 // First three members are used for lipsync. | 68 // First three members are used for lipsync. |
30 // First two members are used for rtt. | 69 // First two members are used for rtt. |
31 uint32 ntp_seconds; | 70 uint32 ntp_seconds; |
32 uint32 ntp_fraction; | 71 uint32 ntp_fraction; |
33 uint32 rtp_timestamp; | 72 uint32 rtp_timestamp; |
34 uint32 send_packet_count; | 73 uint32 send_packet_count; |
35 size_t send_octet_count; | 74 size_t send_octet_count; |
36 }; | 75 }; |
37 | 76 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
104 RtcpReceiverReferenceTimeReport rhs) { | 143 RtcpReceiverReferenceTimeReport rhs) { |
105 return lhs.remote_ssrc == rhs.remote_ssrc && | 144 return lhs.remote_ssrc == rhs.remote_ssrc && |
106 lhs.ntp_seconds == rhs.ntp_seconds && | 145 lhs.ntp_seconds == rhs.ntp_seconds && |
107 lhs.ntp_fraction == rhs.ntp_fraction; | 146 lhs.ntp_fraction == rhs.ntp_fraction; |
108 } | 147 } |
109 | 148 |
110 } // namespace cast | 149 } // namespace cast |
111 } // namespace media | 150 } // namespace media |
112 | 151 |
113 #endif // MEDIA_CAST_RTCP_RTCP_DEFINES_H_ | 152 #endif // MEDIA_CAST_RTCP_RTCP_DEFINES_H_ |
OLD | NEW |