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

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: Separate Pli message from Cast message. 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
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 media_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 }; 55 };
56 56
57 struct RtcpPliMessage {
58 explicit RtcpPliMessage(uint32_t ssrc);
59 RtcpPliMessage();
60 ~RtcpPliMessage();
61
62 uint32_t sender_ssrc;
63 };
64
57 // Log messages from receiver to sender. 65 // Log messages from receiver to sender.
58 struct RtcpReceiverEventLogMessage { 66 struct RtcpReceiverEventLogMessage {
59 RtcpReceiverEventLogMessage(); 67 RtcpReceiverEventLogMessage();
60 ~RtcpReceiverEventLogMessage(); 68 ~RtcpReceiverEventLogMessage();
61 69
62 CastLoggingEvent type; 70 CastLoggingEvent type;
63 base::TimeTicks event_timestamp; 71 base::TimeTicks event_timestamp;
64 base::TimeDelta delay_delta; 72 base::TimeDelta delay_delta;
65 uint16_t packet_id; 73 uint16_t packet_id;
66 }; 74 };
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 base::TimeDelta delay_delta; 117 base::TimeDelta delay_delta;
110 118
111 // Only set for packet events. 119 // Only set for packet events.
112 uint16_t packet_id; 120 uint16_t packet_id;
113 }; 121 };
114 122
115 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback; 123 typedef base::Callback<void(const RtcpCastMessage&)> RtcpCastMessageCallback;
116 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback; 124 typedef base::Callback<void(base::TimeDelta)> RtcpRttCallback;
117 typedef 125 typedef
118 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback; 126 base::Callback<void(const RtcpReceiverLogMessage&)> RtcpLogMessageCallback;
127 typedef base::Callback<void()> RtcpPliCallback;
119 128
120 // TODO(hubbe): Document members of this struct. 129 // TODO(hubbe): Document members of this struct.
121 struct RtpReceiverStatistics { 130 struct RtpReceiverStatistics {
122 RtpReceiverStatistics(); 131 RtpReceiverStatistics();
123 uint8_t fraction_lost; 132 uint8_t fraction_lost;
124 uint32_t cumulative_lost; // 24 bits valid. 133 uint32_t cumulative_lost; // 24 bits valid.
125 uint32_t extended_high_sequence_number; 134 uint32_t extended_high_sequence_number;
126 uint32_t jitter; 135 uint32_t jitter;
127 }; 136 };
128 137
129 // Created on a RTP receiver to be passed over IPC. 138 // Created on a RTP receiver to be passed over IPC.
130 struct RtcpTimeData { 139 struct RtcpTimeData {
131 uint32_t ntp_seconds; 140 uint32_t ntp_seconds;
132 uint32_t ntp_fraction; 141 uint32_t ntp_fraction;
133 base::TimeTicks timestamp; 142 base::TimeTicks timestamp;
134 }; 143 };
135 144
136 // This struct is used to encapsulate all the parameters of the 145 // This struct is used to encapsulate all the parameters of the
137 // SendRtcpFromRtpReceiver for IPC transportation. 146 // SendRtcpFromRtpReceiver for IPC transportation.
138 struct SendRtcpFromRtpReceiver_Params { 147 struct SendRtcpFromRtpReceiver_Params {
139 SendRtcpFromRtpReceiver_Params(); 148 SendRtcpFromRtpReceiver_Params();
140 ~SendRtcpFromRtpReceiver_Params(); 149 ~SendRtcpFromRtpReceiver_Params();
141 uint32_t ssrc; 150 uint32_t ssrc;
142 uint32_t sender_ssrc; 151 uint32_t sender_ssrc;
143 RtcpTimeData time_data; 152 RtcpTimeData time_data;
144 scoped_ptr<RtcpCastMessage> cast_message; 153 scoped_ptr<RtcpCastMessage> cast_message;
154 scoped_ptr<RtcpPliMessage> pli_message;
145 base::TimeDelta target_delay; 155 base::TimeDelta target_delay;
146 scoped_ptr<std::vector<std::pair<RtpTimeTicks, RtcpEvent>>> rtcp_events; 156 scoped_ptr<std::vector<std::pair<RtpTimeTicks, RtcpEvent>>> rtcp_events;
147 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics; 157 scoped_ptr<RtpReceiverStatistics> rtp_receiver_statistics;
148 }; 158 };
149 159
150 160
151 } // namespace cast 161 } // namespace cast
152 } // namespace media 162 } // namespace media
153 163
154 #endif // MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_ 164 #endif // MEDIA_CAST_NET_RTCP_RTCP_DEFINES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698