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

Side by Side Diff: webrtc/video_receive_stream.h

Issue 2654163006: Reland of Make RTX pt/apt reconfigurable by calling WebRtcVideoChannel2::SetRecvParameters. (Closed)
Patch Set: Update transition code. Created 3 years, 10 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 | « webrtc/video/video_receive_stream.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 // Decoders for every payload that we can receive. 111 // Decoders for every payload that we can receive.
112 std::vector<Decoder> decoders; 112 std::vector<Decoder> decoders;
113 113
114 // Receive-stream specific RTP settings. 114 // Receive-stream specific RTP settings.
115 struct Rtp { 115 struct Rtp {
116 std::string ToString() const; 116 std::string ToString() const;
117 117
118 // Synchronization source (stream identifier) to be received. 118 // Synchronization source (stream identifier) to be received.
119 uint32_t remote_ssrc = 0; 119 uint32_t remote_ssrc = 0;
120
120 // Sender SSRC used for sending RTCP (such as receiver reports). 121 // Sender SSRC used for sending RTCP (such as receiver reports).
121 uint32_t local_ssrc = 0; 122 uint32_t local_ssrc = 0;
122 123
123 // See RtcpMode for description. 124 // See RtcpMode for description.
124 RtcpMode rtcp_mode = RtcpMode::kCompound; 125 RtcpMode rtcp_mode = RtcpMode::kCompound;
125 126
126 // Extended RTCP settings. 127 // Extended RTCP settings.
127 struct RtcpXr { 128 struct RtcpXr {
128 // True if RTCP Receiver Reference Time Report Block extension 129 // True if RTCP Receiver Reference Time Report Block extension
129 // (RFC 3611) should be enabled. 130 // (RFC 3611) should be enabled.
130 bool receiver_reference_time_report = false; 131 bool receiver_reference_time_report = false;
131 } rtcp_xr; 132 } rtcp_xr;
132 133
133 // See draft-alvestrand-rmcat-remb for information. 134 // See draft-alvestrand-rmcat-remb for information.
134 bool remb = false; 135 bool remb = false;
135 136
136 // See draft-holmer-rmcat-transport-wide-cc-extensions for details. 137 // See draft-holmer-rmcat-transport-wide-cc-extensions for details.
137 bool transport_cc = false; 138 bool transport_cc = false;
138 139
139 // See NackConfig for description. 140 // See NackConfig for description.
140 NackConfig nack; 141 NackConfig nack;
141 142
142 // See UlpfecConfig for description. 143 // See UlpfecConfig for description.
143 UlpfecConfig ulpfec; 144 UlpfecConfig ulpfec;
144 145
145 // RTX settings for incoming video payloads that may be received. RTX is 146 // SSRC for retransmissions.
146 // disabled if there's no config present. 147 uint32_t rtx_ssrc = 0;
147 struct Rtx {
148 // SSRCs to use for the RTX streams.
149 uint32_t ssrc = 0;
150 148
151 // Payload type to use for the RTX stream. 149 // Map from video payload type (apt) -> RTX payload type (pt).
152 int payload_type = 0; 150 // For RTX to be enabled, both an SSRC and this mapping are needed.
153 }; 151 std::map<int, int> rtx_payload_types;
154
155 // Map from video RTP payload type -> RTX config.
156 typedef std::map<int, Rtx> RtxMap;
157 RtxMap rtx;
158 152
159 // TODO(brandtr): Remove this member function when internal project has 153 // TODO(brandtr): Remove this member function when internal project has
160 // been updated. 154 // been updated.
161 void AddRtxInfo(int media_pt, int rtx_pt, uint32_t rtx_ssrc) { 155 void AddRtxInfo(int media_pt, int rtx_pt, uint32_t new_rtx_ssrc) {
162 Rtx r; 156 rtx_ssrc = new_rtx_ssrc;
163 r.ssrc = rtx_ssrc; 157 rtx_payload_types[media_pt] = rtx_pt;
164 r.payload_type = rtx_pt;
165 rtx[media_pt] = r;
166 } 158 }
167 159
168 // RTP header extensions used for the received stream. 160 // RTP header extensions used for the received stream.
169 std::vector<RtpExtension> extensions; 161 std::vector<RtpExtension> extensions;
170 } rtp; 162 } rtp;
171 163
172 // Transport for outgoing packets (RTCP). 164 // Transport for outgoing packets (RTCP).
173 Transport* rtcp_send_transport = nullptr; 165 Transport* rtcp_send_transport = nullptr;
174 166
175 // Must not be 'nullptr' when the stream is started. 167 // Must not be 'nullptr' when the stream is started.
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 EnableEncodedFrameRecording(rtc::kInvalidPlatformFileValue, 0); 220 EnableEncodedFrameRecording(rtc::kInvalidPlatformFileValue, 0);
229 } 221 }
230 222
231 protected: 223 protected:
232 virtual ~VideoReceiveStream() {} 224 virtual ~VideoReceiveStream() {}
233 }; 225 };
234 226
235 } // namespace webrtc 227 } // namespace webrtc
236 228
237 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_ 229 #endif // WEBRTC_VIDEO_RECEIVE_STREAM_H_
OLDNEW
« no previous file with comments | « webrtc/video/video_receive_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698