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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
421 } | 421 } |
422 return nullptr; | 422 return nullptr; |
423 } | 423 } |
424 | 424 |
425 DefaultUnsignalledSsrcHandler::DefaultUnsignalledSsrcHandler() | 425 DefaultUnsignalledSsrcHandler::DefaultUnsignalledSsrcHandler() |
426 : default_recv_ssrc_(0), default_sink_(NULL) {} | 426 : default_recv_ssrc_(0), default_sink_(NULL) {} |
427 | 427 |
428 UnsignalledSsrcHandler::Action DefaultUnsignalledSsrcHandler::OnUnsignalledSsrc( | 428 UnsignalledSsrcHandler::Action DefaultUnsignalledSsrcHandler::OnUnsignalledSsrc( |
429 WebRtcVideoChannel2* channel, | 429 WebRtcVideoChannel2* channel, |
430 uint32_t ssrc) { | 430 uint32_t ssrc) { |
431 if (default_recv_ssrc_ != 0) { // Already one default stream. | 431 if (default_recv_ssrc_ != 0) { // Already one default stream, so replace it. |
432 LOG(LS_WARNING) << "Unknown SSRC, but default receive stream already set."; | 432 channel->RemoveRecvStream(default_recv_ssrc_); |
pthatcher1
2017/02/17 18:10:37
I know default_recv_ssrc_ is set down below, but i
mo.zanaty
2017/02/17 18:29:05
Agreed. Done.
| |
433 return kDropPacket; | |
434 } | 433 } |
435 | 434 |
436 StreamParams sp; | 435 StreamParams sp; |
437 sp.ssrcs.push_back(ssrc); | 436 sp.ssrcs.push_back(ssrc); |
438 LOG(LS_INFO) << "Creating default receive stream for SSRC=" << ssrc << "."; | 437 LOG(LS_INFO) << "Creating default receive stream for SSRC=" << ssrc << "."; |
439 if (!channel->AddRecvStream(sp, true)) { | 438 if (!channel->AddRecvStream(sp, true)) { |
440 LOG(LS_WARNING) << "Could not create default receive stream."; | 439 LOG(LS_WARNING) << "Could not create default receive stream."; |
441 } | 440 } |
442 | 441 |
443 channel->SetSink(ssrc, default_sink_); | 442 channel->SetSink(ssrc, default_sink_); |
(...skipping 2083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2527 rtx_mapping[video_codecs[i].codec.id] != | 2526 rtx_mapping[video_codecs[i].codec.id] != |
2528 ulpfec_config.red_payload_type) { | 2527 ulpfec_config.red_payload_type) { |
2529 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2528 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
2530 } | 2529 } |
2531 } | 2530 } |
2532 | 2531 |
2533 return video_codecs; | 2532 return video_codecs; |
2534 } | 2533 } |
2535 | 2534 |
2536 } // namespace cricket | 2535 } // namespace cricket |
OLD | NEW |