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

Side by Side Diff: webrtc/video/vie_channel.cc

Issue 1687333002: Extract send-side ViEReceiver calls. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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/vie_channel.h ('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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 592 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 } 603 }
604 return 0; 604 return 0;
605 } 605 }
606 606
607 int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) { 607 int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) {
608 RTC_DCHECK_LE(idx, rtp_rtcp_modules_.size()); 608 RTC_DCHECK_LE(idx, rtp_rtcp_modules_.size());
609 *ssrc = rtp_rtcp_modules_[idx]->SSRC(); 609 *ssrc = rtp_rtcp_modules_[idx]->SSRC();
610 return 0; 610 return 0;
611 } 611 }
612 612
613 uint32_t ViEChannel::GetRemoteSSRC() {
614 RTC_DCHECK(sender_);
615 return vie_receiver_.GetRemoteSsrc();
616 }
617
618 int ViEChannel::SetRtxSendPayloadType(int payload_type, 613 int ViEChannel::SetRtxSendPayloadType(int payload_type,
619 int associated_payload_type) { 614 int associated_payload_type) {
615 RTC_DCHECK(sender_);
620 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 616 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
621 rtp_rtcp->SetRtxSendPayloadType(payload_type, associated_payload_type); 617 rtp_rtcp->SetRtxSendPayloadType(payload_type, associated_payload_type);
622 SetRtxSendStatus(true); 618 SetRtxSendStatus(true);
623 return 0; 619 return 0;
624 } 620 }
625 621
626 void ViEChannel::SetRtxSendStatus(bool enable) { 622 void ViEChannel::SetRtxSendStatus(bool enable) {
627 int rtx_settings = 623 int rtx_settings =
628 enable ? kRtxRetransmitted | kRtxRedundantPayloads : kRtxOff; 624 enable ? kRtxRetransmitted | kRtxRedundantPayloads : kRtxOff;
629 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 625 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 StartDecodeThread(); 826 StartDecodeThread();
831 vie_receiver_.StartReceive(); 827 vie_receiver_.StartReceive();
832 } 828 }
833 829
834 void ViEChannel::StopReceive() { 830 void ViEChannel::StopReceive() {
835 vie_receiver_.StopReceive(); 831 vie_receiver_.StopReceive();
836 if (!sender_) 832 if (!sender_)
837 StopDecodeThread(); 833 StopDecodeThread();
838 } 834 }
839 835
840 int32_t ViEChannel::ReceivedRTCPPacket(const void* rtcp_packet,
841 size_t rtcp_packet_length) {
842 RTC_DCHECK(sender_);
843 return vie_receiver_.DeliverRtcp(
844 reinterpret_cast<const uint8_t*>(rtcp_packet), rtcp_packet_length)
845 ? 0
846 : -1;
847 }
848
849 int32_t ViEChannel::SetMTU(uint16_t mtu) { 836 int32_t ViEChannel::SetMTU(uint16_t mtu) {
850 RTC_DCHECK(sender_); 837 RTC_DCHECK(sender_);
851 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) 838 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
852 rtp_rtcp->SetMaxTransferUnit(mtu); 839 rtp_rtcp->SetMaxTransferUnit(mtu);
853 return 0; 840 return 0;
854 } 841 }
855 842
856 RtpRtcp* ViEChannel::rtp_rtcp() { 843 RtpRtcp* ViEChannel::rtp_rtcp() {
857 return rtp_rtcp_modules_[0]; 844 return rtp_rtcp_modules_[0];
858 } 845 }
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 rtc::CritScope lock(&crit_); 1097 rtc::CritScope lock(&crit_);
1111 receive_stats_callback_ = receive_statistics_proxy; 1098 receive_stats_callback_ = receive_statistics_proxy;
1112 } 1099 }
1113 1100
1114 void ViEChannel::SetIncomingVideoStream( 1101 void ViEChannel::SetIncomingVideoStream(
1115 IncomingVideoStream* incoming_video_stream) { 1102 IncomingVideoStream* incoming_video_stream) {
1116 rtc::CritScope lock(&crit_); 1103 rtc::CritScope lock(&crit_);
1117 incoming_video_stream_ = incoming_video_stream; 1104 incoming_video_stream_ = incoming_video_stream;
1118 } 1105 }
1119 } // namespace webrtc 1106 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/vie_channel.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698