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

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2692993009: Allow default video receive channel to receive on any unsignalled SSRC, (Closed)
Patch Set: 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
OLDNEW
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
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;
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698