Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 912 LOG(LS_WARNING) << "Attempting to get RTP receive parameters for stream " | 912 LOG(LS_WARNING) << "Attempting to get RTP receive parameters for stream " |
| 913 << "with ssrc " << ssrc << " which doesn't exist."; | 913 << "with ssrc " << ssrc << " which doesn't exist."; |
| 914 return webrtc::RtpParameters(); | 914 return webrtc::RtpParameters(); |
| 915 } | 915 } |
| 916 | 916 |
| 917 // TODO(deadbeef): Return stream-specific parameters. | 917 // TODO(deadbeef): Return stream-specific parameters. |
| 918 webrtc::RtpParameters rtp_params = CreateRtpParametersWithOneEncoding(); | 918 webrtc::RtpParameters rtp_params = CreateRtpParametersWithOneEncoding(); |
| 919 for (const VideoCodec& codec : recv_params_.codecs) { | 919 for (const VideoCodec& codec : recv_params_.codecs) { |
| 920 rtp_params.codecs.push_back(codec.ToCodecParameters()); | 920 rtp_params.codecs.push_back(codec.ToCodecParameters()); |
| 921 } | 921 } |
| 922 rtp_params.ssrcs = it->second->GetSsrcs(); | |
|
pthatcher1
2016/06/15 19:40:00
This should be:
if (!it->second-GetSsrcs().empty(
perkj_webrtc
2016/06/15 20:25:52
Why is this change needed at all ?
pthatcher1
2016/06/15 21:08:17
Now that you mention it, this part of the change i
| |
| 922 return rtp_params; | 923 return rtp_params; |
| 923 } | 924 } |
| 924 | 925 |
| 925 bool WebRtcVideoChannel2::SetRtpReceiveParameters( | 926 bool WebRtcVideoChannel2::SetRtpReceiveParameters( |
| 926 uint32_t ssrc, | 927 uint32_t ssrc, |
| 927 const webrtc::RtpParameters& parameters) { | 928 const webrtc::RtpParameters& parameters) { |
| 928 TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetRtpReceiveParameters"); | 929 TRACE_EVENT0("webrtc", "WebRtcVideoChannel2::SetRtpReceiveParameters"); |
| 929 rtc::CritScope stream_lock(&stream_crit_); | 930 rtc::CritScope stream_lock(&stream_crit_); |
| 930 auto it = receive_streams_.find(ssrc); | 931 auto it = receive_streams_.find(ssrc); |
| 931 if (it == receive_streams_.end()) { | 932 if (it == receive_streams_.end()) { |
| (...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2199 | 2200 |
| 2200 WebRtcVideoChannel2::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream( | 2201 WebRtcVideoChannel2::WebRtcVideoReceiveStream::WebRtcVideoReceiveStream( |
| 2201 webrtc::Call* call, | 2202 webrtc::Call* call, |
| 2202 const StreamParams& sp, | 2203 const StreamParams& sp, |
| 2203 webrtc::VideoReceiveStream::Config config, | 2204 webrtc::VideoReceiveStream::Config config, |
| 2204 WebRtcVideoDecoderFactory* external_decoder_factory, | 2205 WebRtcVideoDecoderFactory* external_decoder_factory, |
| 2205 bool default_stream, | 2206 bool default_stream, |
| 2206 const std::vector<VideoCodecSettings>& recv_codecs, | 2207 const std::vector<VideoCodecSettings>& recv_codecs, |
| 2207 bool red_disabled_by_remote_side) | 2208 bool red_disabled_by_remote_side) |
| 2208 : call_(call), | 2209 : call_(call), |
| 2210 receive_stream_id_(sp.id), | |
|
pthatcher1
2016/06/15 19:40:00
Interesting. That's now what I had in mind origi
| |
| 2209 ssrcs_(sp.ssrcs), | 2211 ssrcs_(sp.ssrcs), |
| 2210 ssrc_groups_(sp.ssrc_groups), | 2212 ssrc_groups_(sp.ssrc_groups), |
| 2211 stream_(NULL), | 2213 stream_(NULL), |
| 2212 default_stream_(default_stream), | 2214 default_stream_(default_stream), |
| 2213 config_(std::move(config)), | 2215 config_(std::move(config)), |
| 2214 red_disabled_by_remote_side_(red_disabled_by_remote_side), | 2216 red_disabled_by_remote_side_(red_disabled_by_remote_side), |
| 2215 external_decoder_factory_(external_decoder_factory), | 2217 external_decoder_factory_(external_decoder_factory), |
| 2216 sink_(NULL), | 2218 sink_(NULL), |
| 2217 last_width_(-1), | 2219 last_width_(-1), |
| 2218 last_height_(-1), | 2220 last_height_(-1), |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2260 if ((*old_decoders)[i].type == type) { | 2262 if ((*old_decoders)[i].type == type) { |
| 2261 AllocatedDecoder decoder = (*old_decoders)[i]; | 2263 AllocatedDecoder decoder = (*old_decoders)[i]; |
| 2262 (*old_decoders)[i] = old_decoders->back(); | 2264 (*old_decoders)[i] = old_decoders->back(); |
| 2263 old_decoders->pop_back(); | 2265 old_decoders->pop_back(); |
| 2264 return decoder; | 2266 return decoder; |
| 2265 } | 2267 } |
| 2266 } | 2268 } |
| 2267 | 2269 |
| 2268 if (external_decoder_factory_ != NULL) { | 2270 if (external_decoder_factory_ != NULL) { |
| 2269 webrtc::VideoDecoder* decoder = | 2271 webrtc::VideoDecoder* decoder = |
| 2270 external_decoder_factory_->CreateVideoDecoder(type); | 2272 external_decoder_factory_->CreateVideoDecoder(type, |
| 2273 { receive_stream_id_ }); | |
| 2271 if (decoder != NULL) { | 2274 if (decoder != NULL) { |
| 2272 return AllocatedDecoder(decoder, type, true); | 2275 return AllocatedDecoder(decoder, type, true); |
| 2273 } | 2276 } |
| 2274 } | 2277 } |
| 2275 | 2278 |
| 2276 if (type == webrtc::kVideoCodecVP8) { | 2279 if (type == webrtc::kVideoCodecVP8) { |
| 2277 return AllocatedDecoder( | 2280 return AllocatedDecoder( |
| 2278 webrtc::VideoDecoder::Create(webrtc::VideoDecoder::kVp8), type, false); | 2281 webrtc::VideoDecoder::Create(webrtc::VideoDecoder::kVp8), type, false); |
| 2279 } | 2282 } |
| 2280 | 2283 |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2613 rtx_mapping[video_codecs[i].codec.id] != | 2616 rtx_mapping[video_codecs[i].codec.id] != |
| 2614 fec_settings.red_payload_type) { | 2617 fec_settings.red_payload_type) { |
| 2615 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2618 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2616 } | 2619 } |
| 2617 } | 2620 } |
| 2618 | 2621 |
| 2619 return video_codecs; | 2622 return video_codecs; |
| 2620 } | 2623 } |
| 2621 | 2624 |
| 2622 } // namespace cricket | 2625 } // namespace cricket |
| OLD | NEW |