From 123ee9be8fcf17dbfccbf37c81f16b7aec236cfa Mon Sep 17 00:00:00 2001 From: Elad Alon Date: Wed, 17 Apr 2019 12:48:06 +0200 Subject: [PATCH] OnLossNotification() receives references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A typo in a previous CL made OnLossNotification() accept its single argument as a const-value, rather than a const-reference. Bug: webrtc:10501 Change-Id: I5e6f9c79f15205b75ec90a53d3fccf3dd9927e33 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133343 Reviewed-by: Erik Språng Commit-Queue: Elad Alon Cr-Commit-Position: refs/heads/master@{#27659} --- api/video_codecs/vp8_frame_buffer_controller.h | 2 +- api/video_codecs/vp8_temporal_layers.cc | 2 +- api/video_codecs/vp8_temporal_layers.h | 2 +- modules/video_coding/codecs/vp8/default_temporal_layers.cc | 2 +- modules/video_coding/codecs/vp8/default_temporal_layers.h | 2 +- modules/video_coding/codecs/vp8/screenshare_layers.cc | 2 +- modules/video_coding/codecs/vp8/screenshare_layers.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/video_codecs/vp8_frame_buffer_controller.h b/api/video_codecs/vp8_frame_buffer_controller.h index c506fa4ca5..f3d2b1a6ce 100644 --- a/api/video_codecs/vp8_frame_buffer_controller.h +++ b/api/video_codecs/vp8_frame_buffer_controller.h @@ -140,7 +140,7 @@ class Vp8FrameBufferController { // Called when a loss notification is received. virtual void OnLossNotification( - const VideoEncoder::LossNotification loss_notification) = 0; + const VideoEncoder::LossNotification& loss_notification) = 0; }; // Interface for a factory of Vp8FrameBufferController instances. diff --git a/api/video_codecs/vp8_temporal_layers.cc b/api/video_codecs/vp8_temporal_layers.cc index 004b10fb84..7a9cf37b6c 100644 --- a/api/video_codecs/vp8_temporal_layers.cc +++ b/api/video_codecs/vp8_temporal_layers.cc @@ -89,7 +89,7 @@ void Vp8TemporalLayers::OnRttUpdate(int64_t rtt_ms) { } void Vp8TemporalLayers::OnLossNotification( - const VideoEncoder::LossNotification loss_notification) { + const VideoEncoder::LossNotification& loss_notification) { for (auto& controller : controllers_) { controller->OnLossNotification(loss_notification); } diff --git a/api/video_codecs/vp8_temporal_layers.h b/api/video_codecs/vp8_temporal_layers.h index dcf04c618b..f02d288f1c 100644 --- a/api/video_codecs/vp8_temporal_layers.h +++ b/api/video_codecs/vp8_temporal_layers.h @@ -62,7 +62,7 @@ class Vp8TemporalLayers final : public Vp8FrameBufferController { void OnRttUpdate(int64_t rtt_ms) override; void OnLossNotification( - const VideoEncoder::LossNotification loss_notification) override; + const VideoEncoder::LossNotification& loss_notification) override; private: std::vector> controllers_; diff --git a/modules/video_coding/codecs/vp8/default_temporal_layers.cc b/modules/video_coding/codecs/vp8/default_temporal_layers.cc index 22b3718794..31298fe7af 100644 --- a/modules/video_coding/codecs/vp8/default_temporal_layers.cc +++ b/modules/video_coding/codecs/vp8/default_temporal_layers.cc @@ -552,7 +552,7 @@ void DefaultTemporalLayers::OnPacketLossRateUpdate(float packet_loss_rate) {} void DefaultTemporalLayers::OnRttUpdate(int64_t rtt_ms) {} void DefaultTemporalLayers::OnLossNotification( - const VideoEncoder::LossNotification loss_notification) {} + const VideoEncoder::LossNotification& loss_notification) {} TemplateStructure DefaultTemporalLayers::GetTemplateStructure( int num_layers) const { diff --git a/modules/video_coding/codecs/vp8/default_temporal_layers.h b/modules/video_coding/codecs/vp8/default_temporal_layers.h index 67839f6c94..7a47650921 100644 --- a/modules/video_coding/codecs/vp8/default_temporal_layers.h +++ b/modules/video_coding/codecs/vp8/default_temporal_layers.h @@ -64,7 +64,7 @@ class DefaultTemporalLayers final : public Vp8FrameBufferController { void OnRttUpdate(int64_t rtt_ms) override; void OnLossNotification( - const VideoEncoder::LossNotification loss_notification) override; + const VideoEncoder::LossNotification& loss_notification) override; private: struct DependencyInfo { diff --git a/modules/video_coding/codecs/vp8/screenshare_layers.cc b/modules/video_coding/codecs/vp8/screenshare_layers.cc index 65a445e50b..85fb6d7264 100644 --- a/modules/video_coding/codecs/vp8/screenshare_layers.cc +++ b/modules/video_coding/codecs/vp8/screenshare_layers.cc @@ -394,7 +394,7 @@ void ScreenshareLayers::OnPacketLossRateUpdate(float packet_loss_rate) {} void ScreenshareLayers::OnRttUpdate(int64_t rtt_ms) {} void ScreenshareLayers::OnLossNotification( - const VideoEncoder::LossNotification loss_notification) {} + const VideoEncoder::LossNotification& loss_notification) {} TemplateStructure ScreenshareLayers::GetTemplateStructure( int num_layers) const { diff --git a/modules/video_coding/codecs/vp8/screenshare_layers.h b/modules/video_coding/codecs/vp8/screenshare_layers.h index 69a1737e47..c7bc5f46f8 100644 --- a/modules/video_coding/codecs/vp8/screenshare_layers.h +++ b/modules/video_coding/codecs/vp8/screenshare_layers.h @@ -68,7 +68,7 @@ class ScreenshareLayers final : public Vp8FrameBufferController { void OnRttUpdate(int64_t rtt_ms) override; void OnLossNotification( - const VideoEncoder::LossNotification loss_notification) override; + const VideoEncoder::LossNotification& loss_notification) override; private: enum class TemporalLayerState : int { kDrop, kTl0, kTl1, kTl1Sync };