diff --git a/modules/video_coding/video_coding_impl.h b/modules/video_coding/video_coding_impl.h index d51fa8a7ac..1f3a59c62c 100644 --- a/modules/video_coding/video_coding_impl.h +++ b/modules/video_coding/video_coding_impl.h @@ -132,7 +132,6 @@ class VideoReceiver : public Module { // These callbacks are set on the construction thread before being attached // to the module thread or decoding started, so a lock is not required. VCMFrameTypeCallback* _frameTypeCallback; - VCMReceiveStatisticsCallback* _receiveStatsCallback; VCMPacketRequestCallback* _packetRequestCallback; // Used on both the module and decoder thread. diff --git a/modules/video_coding/video_receiver.cc b/modules/video_coding/video_receiver.cc index 1f3fac3e70..544b660555 100644 --- a/modules/video_coding/video_receiver.cc +++ b/modules/video_coding/video_receiver.cc @@ -54,7 +54,6 @@ VideoReceiver::VideoReceiver(Clock* clock, keyframe_request_sender), _decodedFrameCallback(_timing, clock_), _frameTypeCallback(nullptr), - _receiveStatsCallback(nullptr), _packetRequestCallback(nullptr), _scheduleKeyRequest(false), drop_frames_until_keyframe_(false), @@ -197,9 +196,8 @@ int32_t VideoReceiver::RegisterReceiveStatisticsCallback( // |_receiver| is used on both the decoder and module threads. // However, since we make sure that we never do anything on the module thread // when the decoder thread is not running, we don't need a lock for the - // |_receiver| or |_receiveStatsCallback| here. + // |_receiver| here. _receiver.RegisterStatsCallback(receiveStats); - _receiveStatsCallback = receiveStats; return VCM_OK; } diff --git a/video/rtp_video_stream_receiver.cc b/video/rtp_video_stream_receiver.cc index 30aad54236..39c547811e 100644 --- a/video/rtp_video_stream_receiver.cc +++ b/video/rtp_video_stream_receiver.cc @@ -368,8 +368,8 @@ void RtpVideoStreamReceiver::OnRtpPacket(const RtpPacketReceived& packet) { } } -int32_t RtpVideoStreamReceiver::RequestKeyFrame() { - return rtp_rtcp_->RequestKeyFrame(); +void RtpVideoStreamReceiver::RequestKeyFrame() { + rtp_rtcp_->RequestKeyFrame(); } void RtpVideoStreamReceiver::SendLossNotification( diff --git a/video/rtp_video_stream_receiver.h b/video/rtp_video_stream_receiver.h index cd25f85030..3391cf351e 100644 --- a/video/rtp_video_stream_receiver.h +++ b/video/rtp_video_stream_receiver.h @@ -59,7 +59,6 @@ class UlpfecReceiver; class RtpVideoStreamReceiver : public LossNotificationSender, public RecoveredPacketReceiver, public RtpPacketSinkInterface, - public VCMFrameTypeCallback, public VCMPacketRequestCallback, public video_coding::OnAssembledFrameCallback, public video_coding::OnCompleteFrameCallback, @@ -118,8 +117,8 @@ class RtpVideoStreamReceiver : public LossNotificationSender, // Implements RecoveredPacketReceiver. void OnRecoveredPacket(const uint8_t* packet, size_t packet_length) override; - // Implements VCMFrameTypeCallback. - int32_t RequestKeyFrame() override; + // Send an RTCP keyframe request. + void RequestKeyFrame(); // Implements LossNotificationSender. void SendLossNotification(uint16_t last_decoded_seq_num, diff --git a/video/video_receive_stream.cc b/video/video_receive_stream.cc index bea06c0853..f6f601e762 100644 --- a/video/video_receive_stream.cc +++ b/video/video_receive_stream.cc @@ -377,7 +377,6 @@ void VideoReceiveStream::Start() { RTC_DCHECK(renderer != nullptr); video_stream_decoder_.reset(new VideoStreamDecoder( &video_receiver_, &rtp_video_stream_receiver_, - &rtp_video_stream_receiver_, rtp_video_stream_receiver_.IsRetransmissionsEnabled(), protected_by_fec, &stats_proxy_, renderer)); diff --git a/video/video_stream_decoder.cc b/video/video_stream_decoder.cc index 69c10ed84c..dd65a295b7 100644 --- a/video/video_stream_decoder.cc +++ b/video/video_stream_decoder.cc @@ -19,7 +19,6 @@ namespace webrtc { VideoStreamDecoder::VideoStreamDecoder( vcm::VideoReceiver* video_receiver, - VCMFrameTypeCallback* vcm_frame_type_callback, VCMPacketRequestCallback* vcm_packet_request_callback, bool enable_nack, bool enable_fec, @@ -34,8 +33,6 @@ VideoStreamDecoder::VideoStreamDecoder( static const int kMaxNackListSize = 250; video_receiver_->SetNackSettings(kMaxNackListSize, kMaxPacketAgeToNack, 0); video_receiver_->RegisterReceiveCallback(this); - video_receiver_->RegisterFrameTypeCallback(vcm_frame_type_callback); - video_receiver_->RegisterReceiveStatisticsCallback(this); VCMVideoProtection video_protection = enable_nack ? (enable_fec ? kProtectionNackFEC : kProtectionNack) @@ -54,8 +51,6 @@ VideoStreamDecoder::~VideoStreamDecoder() { // Unset all the callback pointers that we set in the ctor. video_receiver_->RegisterPacketRequestCallback(nullptr); - video_receiver_->RegisterReceiveStatisticsCallback(nullptr); - video_receiver_->RegisterFrameTypeCallback(nullptr); video_receiver_->RegisterReceiveCallback(nullptr); } @@ -86,27 +81,4 @@ void VideoStreamDecoder::OnDecoderImplementationName( receive_stats_callback_->OnDecoderImplementationName(implementation_name); } -void VideoStreamDecoder::OnDiscardedPacketsUpdated(int discarded_packets) { - receive_stats_callback_->OnDiscardedPacketsUpdated(discarded_packets); -} - -void VideoStreamDecoder::OnFrameCountsUpdated(const FrameCounts& frame_counts) { - receive_stats_callback_->OnFrameCountsUpdated(frame_counts); -} - -void VideoStreamDecoder::OnFrameBufferTimingsUpdated(int decode_ms, - int max_decode_ms, - int current_delay_ms, - int target_delay_ms, - int jitter_buffer_ms, - int min_playout_delay_ms, - int render_delay_ms) {} - -void VideoStreamDecoder::OnTimingFrameInfoUpdated(const TimingFrameInfo& info) { -} - -void VideoStreamDecoder::OnCompleteFrame(bool is_keyframe, - size_t size_bytes, - VideoContentType content_type) {} - } // namespace webrtc diff --git a/video/video_stream_decoder.h b/video/video_stream_decoder.h index efaa8cc95c..c8ef92c7a3 100644 --- a/video/video_stream_decoder.h +++ b/video/video_stream_decoder.h @@ -31,12 +31,10 @@ namespace vcm { class VideoReceiver; } // namespace vcm -class VideoStreamDecoder : public VCMReceiveCallback, - public VCMReceiveStatisticsCallback { +class VideoStreamDecoder : public VCMReceiveCallback { public: VideoStreamDecoder( vcm::VideoReceiver* video_receiver, - VCMFrameTypeCallback* vcm_frame_type_callback, VCMPacketRequestCallback* vcm_packet_request_callback, bool enable_nack, bool enable_fec, @@ -52,22 +50,6 @@ class VideoStreamDecoder : public VCMReceiveCallback, void OnIncomingPayloadType(int payload_type) override; void OnDecoderImplementationName(const char* implementation_name) override; - // Implements VCMReceiveStatisticsCallback. - void OnDiscardedPacketsUpdated(int discarded_packets) override; - void OnFrameCountsUpdated(const FrameCounts& frame_counts) override; - void OnCompleteFrame(bool is_keyframe, - size_t size_bytes, - VideoContentType content_type) override; - void OnFrameBufferTimingsUpdated(int decode_ms, - int max_decode_ms, - int current_delay_ms, - int target_delay_ms, - int jitter_buffer_ms, - int min_playout_delay_ms, - int render_delay_ms) override; - - void OnTimingFrameInfoUpdated(const TimingFrameInfo& info) override; - void RegisterReceiveStatisticsProxy( ReceiveStatisticsProxy* receive_statistics_proxy);