Comment unused variables in implemented functions 8\n
Bug: webrtc:370878648 Change-Id: If66e079ff5e455b5c3c483c4c42ef7b38bd34307 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366262 Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Dor Hen <dorhen@meta.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43316}
This commit is contained in:
parent
90c67e7729
commit
b52416eccf
@ -1041,15 +1041,17 @@ class RTC_EXPORT PeerConnectionInterface : public webrtc::RefCountInterface {
|
|||||||
// The observer is invoked as soon as the operation completes, which could be
|
// The observer is invoked as soon as the operation completes, which could be
|
||||||
// before or after the SetLocalDescription() method has exited.
|
// before or after the SetLocalDescription() method has exited.
|
||||||
virtual void SetLocalDescription(
|
virtual void SetLocalDescription(
|
||||||
std::unique_ptr<SessionDescriptionInterface> desc,
|
std::unique_ptr<SessionDescriptionInterface> /* desc */,
|
||||||
rtc::scoped_refptr<SetLocalDescriptionObserverInterface> observer) {}
|
rtc::scoped_refptr<SetLocalDescriptionObserverInterface> /* observer */) {
|
||||||
|
}
|
||||||
// Creates an offer or answer (depending on current signaling state) and sets
|
// Creates an offer or answer (depending on current signaling state) and sets
|
||||||
// it as the local session description.
|
// it as the local session description.
|
||||||
//
|
//
|
||||||
// The observer is invoked as soon as the operation completes, which could be
|
// The observer is invoked as soon as the operation completes, which could be
|
||||||
// before or after the SetLocalDescription() method has exited.
|
// before or after the SetLocalDescription() method has exited.
|
||||||
virtual void SetLocalDescription(
|
virtual void SetLocalDescription(
|
||||||
rtc::scoped_refptr<SetLocalDescriptionObserverInterface> observer) {}
|
rtc::scoped_refptr<SetLocalDescriptionObserverInterface> /* observer */) {
|
||||||
|
}
|
||||||
// Like SetLocalDescription() above, but the observer is invoked with a delay
|
// Like SetLocalDescription() above, but the observer is invoked with a delay
|
||||||
// after the operation completes. This helps avoid recursive calls by the
|
// after the operation completes. This helps avoid recursive calls by the
|
||||||
// observer but also makes it possible for states to change in-between the
|
// observer but also makes it possible for states to change in-between the
|
||||||
@ -1059,7 +1061,8 @@ class RTC_EXPORT PeerConnectionInterface : public webrtc::RefCountInterface {
|
|||||||
// ones taking SetLocalDescriptionObserverInterface as argument.
|
// ones taking SetLocalDescriptionObserverInterface as argument.
|
||||||
virtual void SetLocalDescription(SetSessionDescriptionObserver* observer,
|
virtual void SetLocalDescription(SetSessionDescriptionObserver* observer,
|
||||||
SessionDescriptionInterface* desc) = 0;
|
SessionDescriptionInterface* desc) = 0;
|
||||||
virtual void SetLocalDescription(SetSessionDescriptionObserver* observer) {}
|
virtual void SetLocalDescription(
|
||||||
|
SetSessionDescriptionObserver* /* observer */) {}
|
||||||
|
|
||||||
// Sets the remote session description.
|
// Sets the remote session description.
|
||||||
//
|
//
|
||||||
@ -1078,8 +1081,9 @@ class RTC_EXPORT PeerConnectionInterface : public webrtc::RefCountInterface {
|
|||||||
// for synchronizing peer connection states to the application.
|
// for synchronizing peer connection states to the application.
|
||||||
// TODO(https://crbug.com/webrtc/11798): Delete this method in favor of the
|
// TODO(https://crbug.com/webrtc/11798): Delete this method in favor of the
|
||||||
// ones taking SetRemoteDescriptionObserverInterface as argument.
|
// ones taking SetRemoteDescriptionObserverInterface as argument.
|
||||||
virtual void SetRemoteDescription(SetSessionDescriptionObserver* observer,
|
virtual void SetRemoteDescription(
|
||||||
SessionDescriptionInterface* desc) {}
|
SetSessionDescriptionObserver* /* observer */,
|
||||||
|
SessionDescriptionInterface* /* desc */) {}
|
||||||
|
|
||||||
// According to spec, we must only fire "negotiationneeded" if the Operations
|
// According to spec, we must only fire "negotiationneeded" if the Operations
|
||||||
// Chain is empty. This method takes care of validating an event previously
|
// Chain is empty. This method takes care of validating an event previously
|
||||||
@ -1124,8 +1128,9 @@ class RTC_EXPORT PeerConnectionInterface : public webrtc::RefCountInterface {
|
|||||||
virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0;
|
virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0;
|
||||||
// TODO(hbos): Remove default implementation once implemented by downstream
|
// TODO(hbos): Remove default implementation once implemented by downstream
|
||||||
// projects.
|
// projects.
|
||||||
virtual void AddIceCandidate(std::unique_ptr<IceCandidateInterface> candidate,
|
virtual void AddIceCandidate(
|
||||||
std::function<void(RTCError)> callback) {}
|
std::unique_ptr<IceCandidateInterface> /* candidate */,
|
||||||
|
std::function<void(RTCError)> /* callback */) {}
|
||||||
|
|
||||||
// Removes a group of remote candidates from the ICE agent. Needed mainly for
|
// Removes a group of remote candidates from the ICE agent. Needed mainly for
|
||||||
// continual gathering, to avoid an ever-growing list of candidates as
|
// continual gathering, to avoid an ever-growing list of candidates as
|
||||||
|
|||||||
@ -127,45 +127,47 @@ class VideoQualityAnalyzerInterface
|
|||||||
// Will be called when frame will be obtained from PeerConnection stack.
|
// Will be called when frame will be obtained from PeerConnection stack.
|
||||||
// `peer_name` is name of the peer on which side frame was rendered.
|
// `peer_name` is name of the peer on which side frame was rendered.
|
||||||
virtual void OnFrameRendered(absl::string_view /* peer_name */,
|
virtual void OnFrameRendered(absl::string_view /* peer_name */,
|
||||||
const VideoFrame& frame) {}
|
const VideoFrame& /* frame */) {}
|
||||||
// Will be called if encoder return not WEBRTC_VIDEO_CODEC_OK.
|
// Will be called if encoder return not WEBRTC_VIDEO_CODEC_OK.
|
||||||
// All available codes are listed in
|
// All available codes are listed in
|
||||||
// modules/video_coding/include/video_error_codes.h
|
// modules/video_coding/include/video_error_codes.h
|
||||||
// `peer_name` is name of the peer on which side error acquired.
|
// `peer_name` is name of the peer on which side error acquired.
|
||||||
virtual void OnEncoderError(absl::string_view peer_name,
|
virtual void OnEncoderError(absl::string_view /* peer_name */,
|
||||||
const VideoFrame& frame,
|
const VideoFrame& /* frame */,
|
||||||
int32_t error_code) {}
|
int32_t /* error_code */) {}
|
||||||
// Will be called if decoder return not WEBRTC_VIDEO_CODEC_OK.
|
// Will be called if decoder return not WEBRTC_VIDEO_CODEC_OK.
|
||||||
// All available codes are listed in
|
// All available codes are listed in
|
||||||
// modules/video_coding/include/video_error_codes.h
|
// modules/video_coding/include/video_error_codes.h
|
||||||
// `peer_name` is name of the peer on which side error acquired.
|
// `peer_name` is name of the peer on which side error acquired.
|
||||||
virtual void OnDecoderError(absl::string_view peer_name,
|
virtual void OnDecoderError(absl::string_view /* peer_name */,
|
||||||
uint16_t frame_id,
|
uint16_t /* frame_id */,
|
||||||
int32_t error_code,
|
int32_t /* error_code */,
|
||||||
const DecoderStats& stats) {}
|
const DecoderStats& /* stats */) {}
|
||||||
// Will be called every time new stats reports are available for the
|
// Will be called every time new stats reports are available for the
|
||||||
// Peer Connection identified by `pc_label`.
|
// Peer Connection identified by `pc_label`.
|
||||||
void OnStatsReports(
|
void OnStatsReports(
|
||||||
absl::string_view pc_label,
|
absl::string_view /* pc_label */,
|
||||||
const rtc::scoped_refptr<const RTCStatsReport>& report) override {}
|
const rtc::scoped_refptr<const RTCStatsReport>& /* report */) override {}
|
||||||
|
|
||||||
// Will be called before test adds new participant in the middle of a call.
|
// Will be called before test adds new participant in the middle of a call.
|
||||||
virtual void RegisterParticipantInCall(absl::string_view peer_name) {}
|
virtual void RegisterParticipantInCall(absl::string_view /* peer_name */) {}
|
||||||
// Will be called after test removed existing participant in the middle of the
|
// Will be called after test removed existing participant in the middle of the
|
||||||
// call.
|
// call.
|
||||||
virtual void UnregisterParticipantInCall(absl::string_view peer_name) {}
|
virtual void UnregisterParticipantInCall(absl::string_view /* peer_name */) {}
|
||||||
|
|
||||||
// Informs analyzer that peer `receiver_peer_name` should not receive any
|
// Informs analyzer that peer `receiver_peer_name` should not receive any
|
||||||
// stream from sender `sender_peer_name`.
|
// stream from sender `sender_peer_name`.
|
||||||
// This method is a no-op if the sender or the receiver does not exist.
|
// This method is a no-op if the sender or the receiver does not exist.
|
||||||
virtual void OnPauseAllStreamsFrom(absl::string_view sender_peer_name,
|
virtual void OnPauseAllStreamsFrom(
|
||||||
absl::string_view receiver_peer_name) {}
|
absl::string_view /* sender_peer_name */,
|
||||||
|
absl::string_view /* receiver_peer_name */) {}
|
||||||
|
|
||||||
// Informs analyzer that peer `receiver_peer_name` is expected to receive all
|
// Informs analyzer that peer `receiver_peer_name` is expected to receive all
|
||||||
// streams from `sender_peer_name`.
|
// streams from `sender_peer_name`.
|
||||||
// This method is a no-op if the sender or the receiver does not exist.
|
// This method is a no-op if the sender or the receiver does not exist.
|
||||||
virtual void OnResumeAllStreamsFrom(absl::string_view sender_peer_name,
|
virtual void OnResumeAllStreamsFrom(
|
||||||
absl::string_view receiver_peer_name) {}
|
absl::string_view /* sender_peer_name */,
|
||||||
|
absl::string_view /* receiver_peer_name */) {}
|
||||||
|
|
||||||
// Tells analyzer that analysis complete and it should calculate final
|
// Tells analyzer that analysis complete and it should calculate final
|
||||||
// statistics.
|
// statistics.
|
||||||
@ -179,7 +181,7 @@ class VideoQualityAnalyzerInterface
|
|||||||
// Returns the sender peer name of the last stream where this frame was
|
// Returns the sender peer name of the last stream where this frame was
|
||||||
// captured. The sender for this frame id may change when the frame ids wrap
|
// captured. The sender for this frame id may change when the frame ids wrap
|
||||||
// around. Also it will crash, if the specified `frame_id` wasn't captured.
|
// around. Also it will crash, if the specified `frame_id` wasn't captured.
|
||||||
virtual std::string GetSenderPeerName(uint16_t frame_id) const {
|
virtual std::string GetSenderPeerName(uint16_t /* frame_id */) const {
|
||||||
RTC_CHECK(false) << "Not implemented.";
|
RTC_CHECK(false) << "Not implemented.";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -68,7 +68,7 @@ struct BarEncoderTemplateAdapter {
|
|||||||
|
|
||||||
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
||||||
const Environment& /* env */,
|
const Environment& /* env */,
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
return std::make_unique<StrictMock<MockVideoEncoder>>();
|
return std::make_unique<StrictMock<MockVideoEncoder>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -83,8 +83,9 @@ VideoEncoder::EncoderInfo GetEncoderInfoWithHardwareAccelerated(
|
|||||||
|
|
||||||
class FakeEncodedImageCallback : public EncodedImageCallback {
|
class FakeEncodedImageCallback : public EncodedImageCallback {
|
||||||
public:
|
public:
|
||||||
Result OnEncodedImage(const EncodedImage& encoded_image,
|
Result OnEncodedImage(
|
||||||
const CodecSpecificInfo* codec_specific_info) override {
|
const EncodedImage& /* encoded_image */,
|
||||||
|
const CodecSpecificInfo* /* codec_specific_info */) override {
|
||||||
++callback_count_;
|
++callback_count_;
|
||||||
return Result(Result::OK, callback_count_);
|
return Result(Result::OK, callback_count_);
|
||||||
}
|
}
|
||||||
@ -109,18 +110,19 @@ class VideoEncoderSoftwareFallbackWrapperTestBase : public ::testing::Test {
|
|||||||
class CountingFakeEncoder : public VideoEncoder {
|
class CountingFakeEncoder : public VideoEncoder {
|
||||||
public:
|
public:
|
||||||
void SetFecControllerOverride(
|
void SetFecControllerOverride(
|
||||||
FecControllerOverride* fec_controller_override) override {
|
FecControllerOverride* /* fec_controller_override */) override {
|
||||||
// Ignored.
|
// Ignored.
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t InitEncode(const VideoCodec* codec_settings,
|
int32_t InitEncode(const VideoCodec* /* codec_settings */,
|
||||||
const VideoEncoder::Settings& settings) override {
|
const VideoEncoder::Settings& /* settings */) override {
|
||||||
++init_encode_count_;
|
++init_encode_count_;
|
||||||
return init_encode_return_code_;
|
return init_encode_return_code_;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t Encode(const VideoFrame& frame,
|
int32_t Encode(
|
||||||
const std::vector<VideoFrameType>* frame_types) override {
|
const VideoFrame& frame,
|
||||||
|
const std::vector<VideoFrameType>* /* frame_types */) override {
|
||||||
++encode_count_;
|
++encode_count_;
|
||||||
last_video_frame_ = frame;
|
last_video_frame_ = frame;
|
||||||
if (encode_complete_callback_ &&
|
if (encode_complete_callback_ &&
|
||||||
@ -141,7 +143,7 @@ class VideoEncoderSoftwareFallbackWrapperTestBase : public ::testing::Test {
|
|||||||
return WEBRTC_VIDEO_CODEC_OK;
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetRates(const RateControlParameters& parameters) override {}
|
void SetRates(const RateControlParameters& /* parameters */) override {}
|
||||||
|
|
||||||
EncoderInfo GetEncoderInfo() const override {
|
EncoderInfo GetEncoderInfo() const override {
|
||||||
++supports_native_handle_count_;
|
++supports_native_handle_count_;
|
||||||
@ -986,7 +988,7 @@ TEST_F(PreferTemporalLayersFallbackTest, PrimesEncoderOnSwitch) {
|
|||||||
FakeEncodedImageCallback callback1;
|
FakeEncodedImageCallback callback1;
|
||||||
class DummyFecControllerOverride : public FecControllerOverride {
|
class DummyFecControllerOverride : public FecControllerOverride {
|
||||||
public:
|
public:
|
||||||
void SetFecAllowed(bool fec_allowed) override {}
|
void SetFecAllowed(bool /* fec_allowed */) override {}
|
||||||
};
|
};
|
||||||
DummyFecControllerOverride fec_controller_override1;
|
DummyFecControllerOverride fec_controller_override1;
|
||||||
VideoEncoder::RateControlParameters rate_params1;
|
VideoEncoder::RateControlParameters rate_params1;
|
||||||
|
|||||||
@ -25,7 +25,7 @@ struct Dav1dDecoderTemplateAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
return CreateDav1dDecoder();
|
return CreateDav1dDecoder();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -27,7 +27,7 @@ struct LibvpxVp8DecoderTemplateAdapter {
|
|||||||
|
|
||||||
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
||||||
const Environment& env,
|
const Environment& env,
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
return CreateVp8Decoder(env);
|
return CreateVp8Decoder(env);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -25,7 +25,7 @@ struct LibvpxVp9DecoderTemplateAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
return VP9Decoder::Create();
|
return VP9Decoder::Create();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -32,7 +32,7 @@ struct OpenH264DecoderTemplateAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
static std::unique_ptr<VideoDecoder> CreateDecoder(
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
#if defined(WEBRTC_USE_H264)
|
#if defined(WEBRTC_USE_H264)
|
||||||
|
|
||||||
return H264Decoder::Create();
|
return H264Decoder::Create();
|
||||||
|
|||||||
@ -32,7 +32,7 @@ struct LibaomAv1EncoderTemplateAdapter {
|
|||||||
|
|
||||||
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
||||||
const Environment& env,
|
const Environment& env,
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
return CreateLibaomAv1Encoder(env);
|
return CreateLibaomAv1Encoder(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ struct LibvpxVp8EncoderTemplateAdapter {
|
|||||||
|
|
||||||
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
||||||
const Environment& env,
|
const Environment& env,
|
||||||
const SdpVideoFormat& format) {
|
const SdpVideoFormat& /* format */) {
|
||||||
return CreateVp8Encoder(env);
|
return CreateVp8Encoder(env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -33,8 +33,8 @@ struct OpenH264EncoderTemplateAdapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
static std::unique_ptr<VideoEncoder> CreateEncoder(
|
||||||
const Environment& env,
|
[[maybe_unused]] const Environment& env,
|
||||||
const SdpVideoFormat& format) {
|
[[maybe_unused]] const SdpVideoFormat& format) {
|
||||||
#if defined(WEBRTC_USE_H264)
|
#if defined(WEBRTC_USE_H264)
|
||||||
return CreateH264Encoder(env, H264EncoderSettings::Parse(format));
|
return CreateH264Encoder(env, H264EncoderSettings::Parse(format));
|
||||||
#else
|
#else
|
||||||
@ -42,7 +42,8 @@ struct OpenH264EncoderTemplateAdapter {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool IsScalabilityModeSupported(ScalabilityMode scalability_mode) {
|
static bool IsScalabilityModeSupported(
|
||||||
|
[[maybe_unused]] ScalabilityMode scalability_mode) {
|
||||||
#if defined(WEBRTC_USE_H264)
|
#if defined(WEBRTC_USE_H264)
|
||||||
return H264Encoder::SupportsScalabilityMode(scalability_mode);
|
return H264Encoder::SupportsScalabilityMode(scalability_mode);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -29,7 +29,7 @@ namespace webrtc {
|
|||||||
|
|
||||||
std::unique_ptr<Vp8FrameBufferController> Vp8TemporalLayersFactory::Create(
|
std::unique_ptr<Vp8FrameBufferController> Vp8TemporalLayersFactory::Create(
|
||||||
const VideoCodec& codec,
|
const VideoCodec& codec,
|
||||||
const VideoEncoder::Settings& settings,
|
const VideoEncoder::Settings& /* settings */,
|
||||||
FecControllerOverride* fec_controller_override) {
|
FecControllerOverride* fec_controller_override) {
|
||||||
std::vector<std::unique_ptr<Vp8FrameBufferController>> controllers;
|
std::vector<std::unique_ptr<Vp8FrameBufferController>> controllers;
|
||||||
const int num_streams = SimulcastUtility::NumberOfSimulcastStreams(codec);
|
const int num_streams = SimulcastUtility::NumberOfSimulcastStreams(codec);
|
||||||
|
|||||||
@ -95,7 +95,7 @@ AudioReceiveStreamImpl::AudioReceiveStreamImpl(
|
|||||||
}
|
}
|
||||||
|
|
||||||
AudioReceiveStreamImpl::AudioReceiveStreamImpl(
|
AudioReceiveStreamImpl::AudioReceiveStreamImpl(
|
||||||
const Environment& env,
|
const Environment& /* env */,
|
||||||
PacketRouter* packet_router,
|
PacketRouter* packet_router,
|
||||||
const webrtc::AudioReceiveStreamInterface::Config& config,
|
const webrtc::AudioReceiveStreamInterface::Config& config,
|
||||||
const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
|
const rtc::scoped_refptr<webrtc::AudioState>& audio_state,
|
||||||
|
|||||||
@ -64,7 +64,7 @@ TEST_F(AudioSendStreamCallTest, SupportsCName) {
|
|||||||
|
|
||||||
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
||||||
std::vector<AudioReceiveStreamInterface::Config>*
|
std::vector<AudioReceiveStreamInterface::Config>*
|
||||||
receive_configs) override {
|
/* receive_configs */) override {
|
||||||
send_config->rtp.c_name = kCName;
|
send_config->rtp.c_name = kCName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ TEST_F(AudioSendStreamCallTest, NoExtensionsByDefault) {
|
|||||||
|
|
||||||
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
||||||
std::vector<AudioReceiveStreamInterface::Config>*
|
std::vector<AudioReceiveStreamInterface::Config>*
|
||||||
receive_configs) override {
|
/* receive_configs */) override {
|
||||||
send_config->rtp.extensions.clear();
|
send_config->rtp.extensions.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ TEST_F(AudioSendStreamCallTest, SupportsAudioLevel) {
|
|||||||
|
|
||||||
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
||||||
std::vector<AudioReceiveStreamInterface::Config>*
|
std::vector<AudioReceiveStreamInterface::Config>*
|
||||||
receive_configs) override {
|
/* receive_configs */) override {
|
||||||
send_config->rtp.extensions.clear();
|
send_config->rtp.extensions.clear();
|
||||||
send_config->rtp.extensions.push_back(
|
send_config->rtp.extensions.push_back(
|
||||||
RtpExtension(RtpExtension::kAudioLevelUri, kAudioLevelExtensionId));
|
RtpExtension(RtpExtension::kAudioLevelUri, kAudioLevelExtensionId));
|
||||||
@ -173,7 +173,7 @@ class TransportWideSequenceNumberObserver : public AudioSendTest {
|
|||||||
|
|
||||||
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
void ModifyAudioConfigs(AudioSendStream::Config* send_config,
|
||||||
std::vector<AudioReceiveStreamInterface::Config>*
|
std::vector<AudioReceiveStreamInterface::Config>*
|
||||||
receive_configs) override {
|
/* receive_configs */) override {
|
||||||
send_config->rtp.extensions.clear();
|
send_config->rtp.extensions.clear();
|
||||||
send_config->rtp.extensions.push_back(
|
send_config->rtp.extensions.push_back(
|
||||||
RtpExtension(RtpExtension::kTransportSequenceNumberUri,
|
RtpExtension(RtpExtension::kTransportSequenceNumberUri,
|
||||||
@ -225,7 +225,7 @@ TEST_F(AudioSendStreamCallTest, SendDtmf) {
|
|||||||
|
|
||||||
void OnAudioStreamsCreated(AudioSendStream* send_stream,
|
void OnAudioStreamsCreated(AudioSendStream* send_stream,
|
||||||
const std::vector<AudioReceiveStreamInterface*>&
|
const std::vector<AudioReceiveStreamInterface*>&
|
||||||
receive_streams) override {
|
/* receive_streams */) override {
|
||||||
// Need to start stream here, else DTMF events are dropped.
|
// Need to start stream here, else DTMF events are dropped.
|
||||||
send_stream->Start();
|
send_stream->Start();
|
||||||
for (int event = kDtmfEventFirst; event <= kDtmfEventLast; ++event) {
|
for (int event = kDtmfEventFirst; event <= kDtmfEventLast; ++event) {
|
||||||
|
|||||||
@ -235,7 +235,8 @@ struct ConfigHelper {
|
|||||||
void SetupMockForSetupSendCodec(bool expect_set_encoder_call) {
|
void SetupMockForSetupSendCodec(bool expect_set_encoder_call) {
|
||||||
if (expect_set_encoder_call) {
|
if (expect_set_encoder_call) {
|
||||||
EXPECT_CALL(*channel_send_, SetEncoder)
|
EXPECT_CALL(*channel_send_, SetEncoder)
|
||||||
.WillOnce([this](int payload_type, const SdpAudioFormat& format,
|
.WillOnce([this](int /* payload_type */,
|
||||||
|
const SdpAudioFormat& /* format */,
|
||||||
std::unique_ptr<AudioEncoder> encoder) {
|
std::unique_ptr<AudioEncoder> encoder) {
|
||||||
this->audio_encoder_ = std::move(encoder);
|
this->audio_encoder_ = std::move(encoder);
|
||||||
return true;
|
return true;
|
||||||
@ -581,8 +582,8 @@ TEST(AudioSendStreamTest, SendCodecCanApplyVad) {
|
|||||||
helper.config().send_codec_spec->cng_payload_type = 105;
|
helper.config().send_codec_spec->cng_payload_type = 105;
|
||||||
std::unique_ptr<AudioEncoder> stolen_encoder;
|
std::unique_ptr<AudioEncoder> stolen_encoder;
|
||||||
EXPECT_CALL(*helper.channel_send(), SetEncoder)
|
EXPECT_CALL(*helper.channel_send(), SetEncoder)
|
||||||
.WillOnce([&stolen_encoder](int payload_type,
|
.WillOnce([&stolen_encoder](int /* payload_type */,
|
||||||
const SdpAudioFormat& format,
|
const SdpAudioFormat& /* format */,
|
||||||
std::unique_ptr<AudioEncoder> encoder) {
|
std::unique_ptr<AudioEncoder> encoder) {
|
||||||
stolen_encoder = std::move(encoder);
|
stolen_encoder = std::move(encoder);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -52,8 +52,8 @@ struct FakeAsyncAudioProcessingHelper {
|
|||||||
FakeTaskQueueFactory() = default;
|
FakeTaskQueueFactory() = default;
|
||||||
~FakeTaskQueueFactory() override = default;
|
~FakeTaskQueueFactory() override = default;
|
||||||
std::unique_ptr<TaskQueueBase, TaskQueueDeleter> CreateTaskQueue(
|
std::unique_ptr<TaskQueueBase, TaskQueueDeleter> CreateTaskQueue(
|
||||||
absl::string_view name,
|
absl::string_view /* name */,
|
||||||
Priority priority) const override {
|
Priority /* priority */) const override {
|
||||||
return std::unique_ptr<webrtc::TaskQueueBase, webrtc::TaskQueueDeleter>(
|
return std::unique_ptr<webrtc::TaskQueueBase, webrtc::TaskQueueDeleter>(
|
||||||
new FakeTaskQueue());
|
new FakeTaskQueue());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,7 +128,7 @@ class ChannelReceiveTest : public Test {
|
|||||||
return packet;
|
return packet;
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleGeneratedRtcp(ChannelReceiveInterface& channel,
|
void HandleGeneratedRtcp(ChannelReceiveInterface& /* channel */,
|
||||||
rtc::ArrayView<const uint8_t> packet) {
|
rtc::ArrayView<const uint8_t> packet) {
|
||||||
if (packet[1] == rtcp::ReceiverReport::kPacketType) {
|
if (packet[1] == rtcp::ReceiverReport::kPacketType) {
|
||||||
// Ignore RR, it requires no response
|
// Ignore RR, it requires no response
|
||||||
|
|||||||
@ -188,10 +188,11 @@ TEST(ChannelSendFrameTransformerDelegateTest,
|
|||||||
SendFrame(_, 0, 0, ElementsAreArray(mock_data), _,
|
SendFrame(_, 0, 0, ElementsAreArray(mock_data), _,
|
||||||
ElementsAreArray(csrcs), Optional(audio_level_dbov)));
|
ElementsAreArray(csrcs), Optional(audio_level_dbov)));
|
||||||
ON_CALL(*mock_frame_transformer, Transform)
|
ON_CALL(*mock_frame_transformer, Transform)
|
||||||
.WillByDefault([&](std::unique_ptr<TransformableFrameInterface> frame) {
|
.WillByDefault(
|
||||||
callback->OnTransformedFrame(CreateMockReceiverFrame(
|
[&](std::unique_ptr<TransformableFrameInterface> /* frame */) {
|
||||||
csrcs, std::optional<uint8_t>(audio_level_dbov)));
|
callback->OnTransformedFrame(CreateMockReceiverFrame(
|
||||||
});
|
csrcs, std::optional<uint8_t>(audio_level_dbov)));
|
||||||
|
});
|
||||||
delegate->Transform(AudioFrameType::kEmptyFrame, 0, 0, mock_data,
|
delegate->Transform(AudioFrameType::kEmptyFrame, 0, 0, mock_data,
|
||||||
sizeof(mock_data), 0,
|
sizeof(mock_data), 0,
|
||||||
/*ssrc=*/0, /*mimeType=*/"audio/opus",
|
/*ssrc=*/0, /*mimeType=*/"audio/opus",
|
||||||
|
|||||||
@ -153,7 +153,7 @@ TEST_F(ChannelSendTest, IncreaseRtpTimestampByPauseDuration) {
|
|||||||
uint32_t timestamp;
|
uint32_t timestamp;
|
||||||
int sent_packets = 0;
|
int sent_packets = 0;
|
||||||
auto send_rtp = [&](rtc::ArrayView<const uint8_t> data,
|
auto send_rtp = [&](rtc::ArrayView<const uint8_t> data,
|
||||||
const PacketOptions& options) {
|
const PacketOptions& /* options */) {
|
||||||
++sent_packets;
|
++sent_packets;
|
||||||
RtpPacketReceived packet;
|
RtpPacketReceived packet;
|
||||||
packet.Parse(data);
|
packet.Parse(data);
|
||||||
|
|||||||
@ -55,13 +55,13 @@ AudioEndToEndTest::CreateRenderer() {
|
|||||||
|
|
||||||
void AudioEndToEndTest::OnFakeAudioDevicesCreated(
|
void AudioEndToEndTest::OnFakeAudioDevicesCreated(
|
||||||
AudioDeviceModule* send_audio_device,
|
AudioDeviceModule* send_audio_device,
|
||||||
AudioDeviceModule* recv_audio_device) {
|
AudioDeviceModule* /* recv_audio_device */) {
|
||||||
send_audio_device_ = send_audio_device;
|
send_audio_device_ = send_audio_device;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioEndToEndTest::ModifyAudioConfigs(
|
void AudioEndToEndTest::ModifyAudioConfigs(
|
||||||
AudioSendStream::Config* send_config,
|
AudioSendStream::Config* send_config,
|
||||||
std::vector<AudioReceiveStreamInterface::Config>* receive_configs) {
|
std::vector<AudioReceiveStreamInterface::Config>* /* receive_configs */) {
|
||||||
// Large bitrate by default.
|
// Large bitrate by default.
|
||||||
const webrtc::SdpAudioFormat kDefaultFormat("opus", 48000, 2,
|
const webrtc::SdpAudioFormat kDefaultFormat("opus", 48000, 2,
|
||||||
{{"stereo", "1"}});
|
{{"stereo", "1"}});
|
||||||
|
|||||||
@ -39,8 +39,8 @@ class MockTaskQueueFactory : public TaskQueueFactory {
|
|||||||
: task_queue_(task_queue) {}
|
: task_queue_(task_queue) {}
|
||||||
|
|
||||||
std::unique_ptr<TaskQueueBase, TaskQueueDeleter> CreateTaskQueue(
|
std::unique_ptr<TaskQueueBase, TaskQueueDeleter> CreateTaskQueue(
|
||||||
absl::string_view name,
|
absl::string_view /* name */,
|
||||||
Priority priority) const override {
|
Priority /* priority */) const override {
|
||||||
// Default MockTaskQueue::Delete is no-op, therefore it's safe to pass the
|
// Default MockTaskQueue::Delete is no-op, therefore it's safe to pass the
|
||||||
// raw pointer.
|
// raw pointer.
|
||||||
return std::unique_ptr<TaskQueueBase, TaskQueueDeleter>(task_queue_);
|
return std::unique_ptr<TaskQueueBase, TaskQueueDeleter>(task_queue_);
|
||||||
|
|||||||
@ -357,7 +357,7 @@ void ResourceAdaptationProcessor::UpdateResourceLimitations(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ResourceAdaptationProcessor::OnVideoSourceRestrictionsUpdated(
|
void ResourceAdaptationProcessor::OnVideoSourceRestrictionsUpdated(
|
||||||
VideoSourceRestrictions restrictions,
|
VideoSourceRestrictions /* restrictions */,
|
||||||
const VideoAdaptationCounters& adaptation_counters,
|
const VideoAdaptationCounters& adaptation_counters,
|
||||||
rtc::scoped_refptr<Resource> reason,
|
rtc::scoped_refptr<Resource> reason,
|
||||||
const VideoSourceRestrictions& unfiltered_restrictions) {
|
const VideoSourceRestrictions& unfiltered_restrictions) {
|
||||||
|
|||||||
@ -65,7 +65,7 @@ class VideoSourceRestrictionsListenerForTesting
|
|||||||
VideoSourceRestrictions restrictions,
|
VideoSourceRestrictions restrictions,
|
||||||
const VideoAdaptationCounters& adaptation_counters,
|
const VideoAdaptationCounters& adaptation_counters,
|
||||||
rtc::scoped_refptr<Resource> reason,
|
rtc::scoped_refptr<Resource> reason,
|
||||||
const VideoSourceRestrictions& unfiltered_restrictions) override {
|
const VideoSourceRestrictions& /* unfiltered_restrictions */) override {
|
||||||
RTC_DCHECK_RUN_ON(&sequence_checker_);
|
RTC_DCHECK_RUN_ON(&sequence_checker_);
|
||||||
++restrictions_updated_count_;
|
++restrictions_updated_count_;
|
||||||
restrictions_ = restrictions;
|
restrictions_ = restrictions;
|
||||||
|
|||||||
@ -36,7 +36,7 @@ TEST_F(ResourceTest, RegisteringListenerReceivesCallbacks) {
|
|||||||
fake_resource_->SetResourceListener(&resource_listener);
|
fake_resource_->SetResourceListener(&resource_listener);
|
||||||
EXPECT_CALL(resource_listener, OnResourceUsageStateMeasured(_, _))
|
EXPECT_CALL(resource_listener, OnResourceUsageStateMeasured(_, _))
|
||||||
.Times(1)
|
.Times(1)
|
||||||
.WillOnce([](rtc::scoped_refptr<Resource> resource,
|
.WillOnce([](rtc::scoped_refptr<Resource> /* resource */,
|
||||||
ResourceUsageState usage_state) {
|
ResourceUsageState usage_state) {
|
||||||
EXPECT_EQ(ResourceUsageState::kOveruse, usage_state);
|
EXPECT_EQ(ResourceUsageState::kOveruse, usage_state);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -31,9 +31,9 @@ std::string FakeAdaptationConstraint::Name() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool FakeAdaptationConstraint::IsAdaptationUpAllowed(
|
bool FakeAdaptationConstraint::IsAdaptationUpAllowed(
|
||||||
const VideoStreamInputState& input_state,
|
const VideoStreamInputState& /* input_state */,
|
||||||
const VideoSourceRestrictions& restrictions_before,
|
const VideoSourceRestrictions& /* restrictions_before */,
|
||||||
const VideoSourceRestrictions& restrictions_after) const {
|
const VideoSourceRestrictions& /* restrictions_after */) const {
|
||||||
return is_adaptation_up_allowed_;
|
return is_adaptation_up_allowed_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -686,7 +686,7 @@ Adaptation VideoStreamAdapter::GetAdaptationTo(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void VideoStreamAdapter::BroadcastVideoRestrictionsUpdate(
|
void VideoStreamAdapter::BroadcastVideoRestrictionsUpdate(
|
||||||
const VideoStreamInputState& input_state,
|
const VideoStreamInputState& /* input_state */,
|
||||||
const rtc::scoped_refptr<Resource>& resource) {
|
const rtc::scoped_refptr<Resource>& resource) {
|
||||||
RTC_DCHECK_RUN_ON(&sequence_checker_);
|
RTC_DCHECK_RUN_ON(&sequence_checker_);
|
||||||
VideoSourceRestrictions filtered = FilterRestrictionsByDegradationPreference(
|
VideoSourceRestrictions filtered = FilterRestrictionsByDegradationPreference(
|
||||||
|
|||||||
@ -114,9 +114,9 @@ class FakeVideoStream {
|
|||||||
class FakeVideoStreamAdapterListner : public VideoSourceRestrictionsListener {
|
class FakeVideoStreamAdapterListner : public VideoSourceRestrictionsListener {
|
||||||
public:
|
public:
|
||||||
void OnVideoSourceRestrictionsUpdated(
|
void OnVideoSourceRestrictionsUpdated(
|
||||||
VideoSourceRestrictions restrictions,
|
VideoSourceRestrictions /* restrictions */,
|
||||||
const VideoAdaptationCounters& adaptation_counters,
|
const VideoAdaptationCounters& /* adaptation_counters */,
|
||||||
rtc::scoped_refptr<Resource> reason,
|
rtc::scoped_refptr<Resource> /* reason */,
|
||||||
const VideoSourceRestrictions& unfiltered_restrictions) override {
|
const VideoSourceRestrictions& unfiltered_restrictions) override {
|
||||||
calls_++;
|
calls_++;
|
||||||
last_restrictions_ = unfiltered_restrictions;
|
last_restrictions_ = unfiltered_restrictions;
|
||||||
|
|||||||
@ -305,7 +305,7 @@ std::map<BitrateAllocatorObserver*, int> NormalRateAllocation(
|
|||||||
std::map<BitrateAllocatorObserver*, int> MaxRateAllocation(
|
std::map<BitrateAllocatorObserver*, int> MaxRateAllocation(
|
||||||
const std::vector<AllocatableTrack>& allocatable_tracks,
|
const std::vector<AllocatableTrack>& allocatable_tracks,
|
||||||
uint32_t bitrate,
|
uint32_t bitrate,
|
||||||
uint32_t sum_max_bitrates) {
|
uint32_t /* sum_max_bitrates */) {
|
||||||
std::map<BitrateAllocatorObserver*, int> allocation;
|
std::map<BitrateAllocatorObserver*, int> allocation;
|
||||||
|
|
||||||
for (const auto& observer_config : allocatable_tracks) {
|
for (const auto& observer_config : allocatable_tracks) {
|
||||||
|
|||||||
@ -332,7 +332,7 @@ class BitrateAllocatorTestNoEnforceMin : public ::testing::Test {
|
|||||||
uint32_t max_bitrate_bps,
|
uint32_t max_bitrate_bps,
|
||||||
uint32_t pad_up_bitrate_bps,
|
uint32_t pad_up_bitrate_bps,
|
||||||
bool enforce_min_bitrate,
|
bool enforce_min_bitrate,
|
||||||
absl::string_view track_id,
|
absl::string_view /* track_id */,
|
||||||
double bitrate_priority) {
|
double bitrate_priority) {
|
||||||
allocator_->AddObserver(
|
allocator_->AddObserver(
|
||||||
observer, {min_bitrate_bps, max_bitrate_bps, pad_up_bitrate_bps, 0,
|
observer, {min_bitrate_bps, max_bitrate_bps, pad_up_bitrate_bps, 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user