| 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_); |
| 433 return kDropPacket; | 433 default_recv_ssrc_ = 0; |
| 434 } | 434 } |
| 435 | 435 |
| 436 StreamParams sp; | 436 StreamParams sp; |
| 437 sp.ssrcs.push_back(ssrc); | 437 sp.ssrcs.push_back(ssrc); |
| 438 LOG(LS_INFO) << "Creating default receive stream for SSRC=" << ssrc << "."; | 438 LOG(LS_INFO) << "Creating default receive stream for SSRC=" << ssrc << "."; |
| 439 if (!channel->AddRecvStream(sp, true)) { | 439 if (!channel->AddRecvStream(sp, true)) { |
| 440 LOG(LS_WARNING) << "Could not create default receive stream."; | 440 LOG(LS_WARNING) << "Could not create default receive stream."; |
| 441 } | 441 } |
| 442 | 442 |
| 443 channel->SetSink(ssrc, default_sink_); | 443 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] != | 2527 rtx_mapping[video_codecs[i].codec.id] != |
| 2528 ulpfec_config.red_payload_type) { | 2528 ulpfec_config.red_payload_type) { |
| 2529 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; | 2529 video_codecs[i].rtx_payload_type = rtx_mapping[video_codecs[i].codec.id]; |
| 2530 } | 2530 } |
| 2531 } | 2531 } |
| 2532 | 2532 |
| 2533 return video_codecs; | 2533 return video_codecs; |
| 2534 } | 2534 } |
| 2535 | 2535 |
| 2536 } // namespace cricket | 2536 } // namespace cricket |
| OLD | NEW |