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

Side by Side Diff: media/cast/net/rtcp/rtcp_defines.h

Issue 1709863002: Add Cast PLI support on sender side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address dcheng's comments. Created 4 years, 9 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
« no previous file with comments | « media/cast/net/rtcp/rtcp_builder_unittest.cc ('k') | media/cast/net/rtcp/rtcp_defines.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_RTCP_RTCP_DEFINES_H_ 5 #ifndef MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_
6 #define MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ 6 #define MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 30 matching lines...) Expand all
41 kPacketTypeXr = 207, 41 kPacketTypeXr = 207,
42 kPacketTypeHigh = 210, // Port Mapping. 42 kPacketTypeHigh = 210, // Port Mapping.
43 }; 43 };
44 44
45 // Handle the per frame ACK and NACK messages. 45 // Handle the per frame ACK and NACK messages.
46 struct RtcpCastMessage { 46 struct RtcpCastMessage {
47 explicit RtcpCastMessage(uint32_t ssrc); 47 explicit RtcpCastMessage(uint32_t ssrc);
48 RtcpCastMessage(); 48 RtcpCastMessage();
49 ~RtcpCastMessage(); 49 ~RtcpCastMessage();
50 50
51 uint32_t media_ssrc; 51 uint32_t remote_ssrc;
52 uint32_t ack_frame_id; 52 uint32_t ack_frame_id;
53 uint16_t target_delay_ms; 53 uint16_t target_delay_ms;
54 MissingFramesAndPacketsMap missing_frames_and_packets; 54 MissingFramesAndPacketsMap missing_frames_and_packets;
55 // This wrap-around counter is incremented by one for each ACK/NACK Cast 55 // This wrap-around counter is incremented by one for each ACK/NACK Cast
56 // packet sent. 56 // packet sent.
57 uint8_t feedback_count; 57 uint8_t feedback_count;
58 // The set of received frames that have frame IDs strictly equal to or larger 58 // The set of received frames that have frame IDs strictly equal to or larger
59 // than |ack_frame_id + 2|. 59 // than |ack_frame_id + 2|.
60 std::vector<uint32_t> received_later_frames; 60 std::vector<uint32_t> received_later_frames;
61 }; 61 };
62 62
63 struct RtcpPliMessage {
64 explicit RtcpPliMessage(uint32_t ssrc);
65 RtcpPliMessage();
66
67 uint32_t remote_ssrc;
68 };
69
63 // Log messages from receiver to sender. 70 // Log messages from receiver to sender.
64 struct RtcpReceiverEventLogMessage { 71 struct RtcpReceiverEventLogMessage {
65 RtcpReceiverEventLogMessage(); 72 RtcpReceiverEventLogMessage();
66 ~RtcpReceiverEventLogMessage(); 73 ~RtcpReceiverEventLogMessage();
67 74
68 CastLoggingEvent type; 75 CastLoggingEvent type;
69 base::TimeTicks event_timestamp; 76 base::TimeTicks event_timestamp;
70 base::TimeDelta delay_delta; 77 base::TimeDelta delay_delta;
71 uint16_t packet_id; 78 uint16_t packet_id;
72 }; 79 };
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 base::TimeDelta delay_delta; 123 base::TimeDelta delay_delta;
117 124
118 // Only set for packet events. 125 // Only set for packet events.
119 uint16_t packet_id; 126 uint16_t packet_id;
120 }; 127 };
121 128
122 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback; 129 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback;
123 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback; 130 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback;
124 typedef 131 typedef
125 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback; 132 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback;
133 typedef base::Callback<void()> RtcpPliCallback;
126 134
127 // TODO(hubbe): Document members of this struct. 135 // TODO(hubbe): Document members of this struct.
128 struct RtpReceiverStatistics { 136 struct RtpReceiverStatistics {
129 RtpReceiverStatistics(); 137 RtpReceiverStatistics();
130 uint8_t fraction_lost; 138 uint8_t fraction_lost;
131 uint32_t cumulative_lost; // 24 bits valid. 139 uint32_t cumulative_lost; // 24 bits valid.
132 uint32_t extended_high_sequence_number; 140 uint32_t extended_high_sequence_number;
133 uint32_t jitter; 141 uint32_t jitter;
134 }; 142 };
135 143
136 // Created on a RTP receiver to be passed over IPC. 144 // Created on a RTP receiver to be passed over IPC.
137 struct RtcpTimeData { 145 struct RtcpTimeData {
138 uint32_t ntp_seconds; 146 uint32_t ntp_seconds;
139 uint32_t ntp_fraction; 147 uint32_t ntp_fraction;
140 base::TimeTicks timestamp; 148 base::TimeTicks timestamp;
141 }; 149 };
142 150
143 // This struct is used to encapsulate all the parameters of the 151 // This struct is used to encapsulate all the parameters of the
144 // SendRtcpFromRtpReceiver for IPC transportation. 152 // SendRtcpFromRtpReceiver for IPC transportation.
145 struct SendRtcpFromRtpReceiver_Params { 153 struct SendRtcpFromRtpReceiver_Params {
146 SendRtcpFromRtpReceiver_Params(); 154 SendRtcpFromRtpReceiver_Params();
147 ~SendRtcpFromRtpReceiver_Params(); 155 ~SendRtcpFromRtpReceiver_Params();
148 uint32_t ssrc; 156 uint32_t ssrc;
149 uint32_t sender_ssrc; 157 uint32_t sender_ssrc;
150 RtcpTimeData time_data; 158 RtcpTimeData time_data;
151 scoped_ptr<RtcpCastMessage> cast_message; 159 scoped_ptr<RtcpCastMessage> cast_message;
160 scoped_ptr<RtcpPliMessage> pli_message;
152 base::TimeDelta target_delay; 161 base::TimeDelta target_delay;
153 scoped_ptr<std::vector<std::pair<RtpTimeTicks, RtcpEvent>>> rtcp_events; 162 scoped_ptr<std::vector<std::pair<RtpTimeTicks, RtcpEvent>>> rtcp_events;
154 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics; 163 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics;
155 }; 164 };
156 165
157 166
158 } // namespace cast 167 } // namespace cast
159 } // namespace media 168 } // namespace media
160 169
161 #endif // MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ 170 #endif // MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_
OLDNEW
« no previous file with comments | « media/cast/net/rtcp/rtcp_builder_unittest.cc ('k') | media/cast/net/rtcp/rtcp_defines.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698