Hookup VideoSendStreamImpl::OnVideoLayersAllocationUpdate to RtpVideoSender.
Bug: webrtc:12000 Change-Id: Ieddbad8e6f4e7456441153d432f4dfb32e16d255 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/188627 Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Per Kjellander <perkj@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32439}
This commit is contained in:
parent
0b03c238bf
commit
af70418357
@ -160,6 +160,7 @@ rtc_library("rtp_sender") {
|
||||
"../api/units:time_delta",
|
||||
"../api/units:timestamp",
|
||||
"../api/video:video_frame",
|
||||
"../api/video:video_layers_allocation",
|
||||
"../api/video:video_rtp_headers",
|
||||
"../api/video_codecs:video_codecs_api",
|
||||
"../logging:rtc_event_bwe",
|
||||
|
||||
@ -592,6 +592,18 @@ void RtpVideoSender::OnBitrateAllocationUpdated(
|
||||
}
|
||||
}
|
||||
}
|
||||
void RtpVideoSender::OnVideoLayersAllocationUpdated(
|
||||
const VideoLayersAllocation& allocation) {
|
||||
MutexLock lock(&mutex_);
|
||||
if (IsActiveLocked()) {
|
||||
for (size_t i = 0; i < rtp_streams_.size(); ++i) {
|
||||
VideoLayersAllocation stream_allocation = allocation;
|
||||
stream_allocation.rtp_stream_index = i;
|
||||
rtp_streams_[i].sender_video->SetVideoLayersAllocation(
|
||||
std::move(stream_allocation));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool RtpVideoSender::NackEnabled() const {
|
||||
const bool nack_enabled = rtp_config_.nack.rtp_history_ms > 0;
|
||||
|
||||
@ -138,7 +138,8 @@ class RtpVideoSender : public RtpVideoSenderInterface,
|
||||
|
||||
void OnBitrateAllocationUpdated(const VideoBitrateAllocation& bitrate)
|
||||
RTC_LOCKS_EXCLUDED(mutex_) override;
|
||||
|
||||
void OnVideoLayersAllocationUpdated(
|
||||
const VideoLayersAllocation& layers) override;
|
||||
void OnTransportOverheadChanged(size_t transport_overhead_bytes_per_packet)
|
||||
RTC_LOCKS_EXCLUDED(mutex_) override;
|
||||
void OnBitrateUpdated(BitrateAllocationUpdate update, int framerate)
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
#include "api/array_view.h"
|
||||
#include "api/call/bitrate_allocation.h"
|
||||
#include "api/fec_controller_override.h"
|
||||
#include "api/video/video_layers_allocation.h"
|
||||
#include "call/rtp_config.h"
|
||||
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
|
||||
#include "modules/rtp_rtcp/source/rtp_sequence_number_map.h"
|
||||
@ -50,6 +51,8 @@ class RtpVideoSenderInterface : public EncodedImageCallback,
|
||||
|
||||
virtual void OnBitrateAllocationUpdated(
|
||||
const VideoBitrateAllocation& bitrate) = 0;
|
||||
virtual void OnVideoLayersAllocationUpdated(
|
||||
const VideoLayersAllocation& allocation) = 0;
|
||||
virtual void OnBitrateUpdated(BitrateAllocationUpdate update,
|
||||
int framerate) = 0;
|
||||
virtual void OnTransportOverheadChanged(
|
||||
|
||||
@ -483,7 +483,7 @@ void VideoSendStreamImpl::OnVideoLayersAllocationUpdated(
|
||||
});
|
||||
return;
|
||||
}
|
||||
// TODO(bugs.webrtc.org/12000): Implement
|
||||
rtp_video_sender_->OnVideoLayersAllocationUpdated(allocation);
|
||||
}
|
||||
|
||||
void VideoSendStreamImpl::SignalEncoderActive() {
|
||||
|
||||
@ -80,6 +80,10 @@ class MockRtpVideoSender : public RtpVideoSenderInterface {
|
||||
OnBitrateAllocationUpdated,
|
||||
(const VideoBitrateAllocation&),
|
||||
(override));
|
||||
MOCK_METHOD(void,
|
||||
OnVideoLayersAllocationUpdated,
|
||||
(const VideoLayersAllocation&),
|
||||
(override));
|
||||
MOCK_METHOD(EncodedImageCallback::Result,
|
||||
OnEncodedImage,
|
||||
(const EncodedImage&, const CodecSpecificInfo*),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user