Extract send-side ViEReceiver calls.
Removes ViEChannel hop for DeliverRtcp and GetRemoteSsrc calls. BUG=webrtc:5494 R=stefan@webrtc.org Review URL: https://codereview.webrtc.org/1687333002 . Cr-Commit-Position: refs/heads/master@{#11576}
This commit is contained in:
parent
68da769ab9
commit
1f7d77f60c
@ -168,6 +168,7 @@ VideoSendStream::VideoSendStream(
|
||||
congestion_controller_->packet_router(),
|
||||
config_.rtp.ssrcs.size(),
|
||||
true),
|
||||
vie_receiver_(vie_channel_.vie_receiver()),
|
||||
input_(&vie_encoder_,
|
||||
config_.local_renderer,
|
||||
&stats_proxy_,
|
||||
@ -285,9 +286,8 @@ VideoSendStream::~VideoSendStream() {
|
||||
// done before deleting the channel.
|
||||
encoder_feedback_.RemoveEncoder(&vie_encoder_);
|
||||
|
||||
uint32_t remote_ssrc = vie_channel_.GetRemoteSSRC();
|
||||
congestion_controller_->GetRemoteBitrateEstimator(false)->RemoveStream(
|
||||
remote_ssrc);
|
||||
vie_receiver_->GetRemoteSsrc());
|
||||
}
|
||||
|
||||
VideoCaptureInput* VideoSendStream::Input() {
|
||||
@ -465,7 +465,7 @@ bool VideoSendStream::ReconfigureVideoEncoder(
|
||||
}
|
||||
|
||||
bool VideoSendStream::DeliverRtcp(const uint8_t* packet, size_t length) {
|
||||
return vie_channel_.ReceivedRTCPPacket(packet, length) == 0;
|
||||
return vie_receiver_->DeliverRtcp(packet, length);
|
||||
}
|
||||
|
||||
VideoSendStream::Stats VideoSendStream::GetStats() {
|
||||
|
||||
@ -98,6 +98,7 @@ class VideoSendStream : public webrtc::VideoSendStream,
|
||||
VideoCodingModule* const vcm_;
|
||||
EncoderStateFeedback encoder_feedback_;
|
||||
ViEChannel vie_channel_;
|
||||
ViEReceiver* const vie_receiver_;
|
||||
VideoCaptureInput input_;
|
||||
};
|
||||
} // namespace internal
|
||||
|
||||
@ -610,13 +610,9 @@ int32_t ViEChannel::GetLocalSSRC(uint8_t idx, unsigned int* ssrc) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t ViEChannel::GetRemoteSSRC() {
|
||||
RTC_DCHECK(sender_);
|
||||
return vie_receiver_.GetRemoteSsrc();
|
||||
}
|
||||
|
||||
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);
|
||||
@ -837,15 +833,6 @@ void ViEChannel::StopReceive() {
|
||||
StopDecodeThread();
|
||||
}
|
||||
|
||||
int32_t ViEChannel::ReceivedRTCPPacket(const void* rtcp_packet,
|
||||
size_t rtcp_packet_length) {
|
||||
RTC_DCHECK(sender_);
|
||||
return vie_receiver_.DeliverRtcp(
|
||||
reinterpret_cast<const uint8_t*>(rtcp_packet), rtcp_packet_length)
|
||||
? 0
|
||||
: -1;
|
||||
}
|
||||
|
||||
int32_t ViEChannel::SetMTU(uint16_t mtu) {
|
||||
RTC_DCHECK(sender_);
|
||||
for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_)
|
||||
|
||||
@ -106,9 +106,6 @@ class ViEChannel : public VCMFrameTypeCallback,
|
||||
// Gets SSRC for outgoing stream number |idx|.
|
||||
int32_t GetLocalSSRC(uint8_t idx, unsigned int* ssrc);
|
||||
|
||||
// Gets SSRC for the incoming stream.
|
||||
uint32_t GetRemoteSSRC();
|
||||
|
||||
int SetRtxSendPayloadType(int payload_type, int associated_payload_type);
|
||||
|
||||
void SetRtpStateForSsrc(uint32_t ssrc, const RtpState& rtp_state);
|
||||
@ -170,12 +167,6 @@ class ViEChannel : public VCMFrameTypeCallback,
|
||||
void StartReceive();
|
||||
void StopReceive();
|
||||
|
||||
int32_t ReceivedRTPPacket(const void* rtp_packet,
|
||||
const size_t rtp_packet_length,
|
||||
const PacketTime& packet_time);
|
||||
int32_t ReceivedRTCPPacket(const void* rtcp_packet,
|
||||
const size_t rtcp_packet_length);
|
||||
|
||||
// Sets the maximum transfer unit size for the network link, i.e. including
|
||||
// IP, UDP and RTP headers.
|
||||
int32_t SetMTU(uint16_t mtu);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user