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

Unified Diff: webrtc/video/vie_channel.cc

Issue 1693553002: Move simple RtpRtcp calls to VideoSendStream. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: feedback 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/video/vie_channel.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/vie_channel.cc
diff --git a/webrtc/video/vie_channel.cc b/webrtc/video/vie_channel.cc
index 19132b85d1d1c7862927c28f9d33f639bf7942c6..5d4b1005c583ade5836b58dbe98b95b0d30c049f 100644
--- a/webrtc/video/vie_channel.cc
+++ b/webrtc/video/vie_channel.cc
@@ -378,12 +378,6 @@ int32_t ViEChannel::SetSendCodec(const VideoCodec& video_codec,
return 0;
}
-void ViEChannel::SetRTCPMode(const RtcpMode rtcp_mode) {
- RTC_DCHECK(sender_);
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
- rtp_rtcp->SetRTCPStatus(rtcp_mode);
-}
-
void ViEChannel::SetProtectionMode(bool enable_nack,
bool enable_fec,
int payload_type_red,
@@ -453,19 +447,6 @@ void ViEChannel::ProcessNACKRequest(const bool enable) {
}
}
-bool ViEChannel::IsSendingFecEnabled() {
- bool fec_enabled = false;
- uint8_t pltype_red = 0;
- uint8_t pltype_fec = 0;
-
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
- rtp_rtcp->GenericFECStatus(&fec_enabled, &pltype_red, &pltype_fec);
- if (fec_enabled)
- return true;
- }
- return false;
-}
-
int ViEChannel::GetRequiredNackListSize(int target_delay_ms) {
// The max size of the nack list should be large enough to accommodate the
// the number of packets (frames) resulting from the increased delay.
@@ -538,49 +519,6 @@ int ViEChannel::SetSendTransportSequenceNumber(bool enable, int id) {
return error;
}
-int32_t ViEChannel::SetSSRC(const uint32_t SSRC,
- const StreamType usage,
- const uint8_t simulcast_idx) {
- RTC_DCHECK(sender_);
- RtpRtcp* rtp_rtcp = rtp_rtcp_modules_[simulcast_idx];
- if (usage == kViEStreamTypeRtx) {
- rtp_rtcp->SetRtxSsrc(SSRC);
- } else {
- rtp_rtcp->SetSSRC(SSRC);
- }
- return 0;
-}
-
-int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) {
- RTC_DCHECK_LE(idx, rtp_rtcp_modules_.size());
- *ssrc = rtp_rtcp_modules_[idx]->SSRC();
- return 0;
-}
-
-int ViEChannel::SetRtxSendPayloadType(int payload_type,
- int associated_payload_type) {
- RTC_DCHECK(sender_);
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
- rtp_rtcp->SetRtxSendPayloadType(payload_type, associated_payload_type);
- SetRtxSendStatus(true);
- return 0;
-}
-
-void ViEChannel::SetRtxSendStatus(bool enable) {
- int rtx_settings =
- enable ? kRtxRetransmitted | kRtxRedundantPayloads : kRtxOff;
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
- rtp_rtcp->SetRtxSendStatus(rtx_settings);
-}
-
-void ViEChannel::SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state) {
- RTC_DCHECK(!rtp_rtcp_modules_[0]->Sending());
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
- if (rtp_rtcp->SetRtpStateForSsrc(ssrc, rtp_state))
- return;
- }
-}
-
RtpState ViEChannel::GetRtpStateForSsrc(uint32_t ssrc) const {
RTC_DCHECK(!rtp_rtcp_modules_[0]->Sending());
RtpState rtp_state;
@@ -592,23 +530,6 @@ RtpState ViEChannel::GetRtpStateForSsrc(uint32_t ssrc) const {
return rtp_state;
}
-// TODO(pbos): Set CNAME on all modules.
-int32_t ViEChannel::SetRTCPCName(const char* rtcp_cname) {
- RTC_DCHECK(!rtp_rtcp_modules_[0]->Sending());
- return rtp_rtcp_modules_[0]->SetCNAME(rtcp_cname);
-}
-
-int32_t ViEChannel::GetRemoteRTCPCName(char rtcp_cname[]) {
- uint32_t remoteSSRC = vie_receiver_.GetRemoteSsrc();
- return rtp_rtcp_modules_[0]->RemoteCNAME(remoteSSRC, rtcp_cname);
-}
-
-void ViEChannel::RegisterSendChannelRtcpStatisticsCallback(
- RtcpStatisticsCallback* callback) {
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
- rtp_rtcp->RegisterRtcpStatisticsCallback(callback);
-}
-
void ViEChannel::RegisterRtcpPacketTypeCounterObserver(
RtcpPacketTypeCounterObserver* observer) {
rtcp_packet_type_counter_observer_.Set(observer);
@@ -646,12 +567,6 @@ void ViEChannel::GetReceiveStreamDataCounters(
}
}
-void ViEChannel::RegisterSendChannelRtpStatisticsCallback(
- StreamDataCountersCallback* callback) {
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
- rtp_rtcp->RegisterSendChannelRtpStatisticsCallback(callback);
-}
-
void ViEChannel::GetSendRtcpPacketTypeCounter(
RtcpPacketTypeCounter* packet_counter) const {
std::map<uint32_t, RtcpPacketTypeCounter> counter_map =
@@ -717,15 +632,8 @@ int32_t ViEChannel::StopSend() {
return 0;
}
-int32_t ViEChannel::SetMTU(uint16_t mtu) {
- RTC_DCHECK(sender_);
- for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
- rtp_rtcp->SetMaxTransferUnit(mtu);
- return 0;
-}
-
-RtpRtcp* ViEChannel::rtp_rtcp() {
- return rtp_rtcp_modules_[0];
+const std::vector<RtpRtcp*>& ViEChannel::rtp_rtcp() const {
+ return rtp_rtcp_modules_;
}
ViEReceiver* ViEChannel::vie_receiver() {
« 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