Comment unused variables in implemented functions 6\n
Bug: webrtc:370878648 Change-Id: Ied495f832ae93da4c7dfdb8d0aca2913cb15794e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366203 Commit-Queue: Dor Hen <dorhen@meta.com> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#43314}
This commit is contained in:
parent
0e5d73510d
commit
c4024d62a4
@ -44,7 +44,7 @@ void AudioDecoderL16::AppendSupportedDecoders(
|
||||
std::unique_ptr<AudioDecoder> AudioDecoderL16::MakeAudioDecoder(
|
||||
const Config& config,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/,
|
||||
const FieldTrialsView* field_trials) {
|
||||
const FieldTrialsView* /* field_trials */) {
|
||||
if (!config.IsOk()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderL16::MakeAudioEncoder(
|
||||
const AudioEncoderL16::Config& config,
|
||||
int payload_type,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/,
|
||||
const FieldTrialsView* field_trials) {
|
||||
const FieldTrialsView* /* field_trials */) {
|
||||
AudioEncoderPcm16B::Config c;
|
||||
c.sample_rate_hz = config.sample_rate_hz;
|
||||
c.num_channels = config.num_channels;
|
||||
|
||||
@ -34,13 +34,16 @@ struct Helper;
|
||||
// Base case: 0 template parameters.
|
||||
template <>
|
||||
struct Helper<> {
|
||||
static void AppendSupportedDecoders(std::vector<AudioCodecSpec>* specs) {}
|
||||
static bool IsSupportedDecoder(const SdpAudioFormat& format) { return false; }
|
||||
static void AppendSupportedDecoders(
|
||||
std::vector<AudioCodecSpec>* /* specs */) {}
|
||||
static bool IsSupportedDecoder(const SdpAudioFormat& /* format */) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static absl::Nullable<std::unique_ptr<AudioDecoder>> MakeAudioDecoder(
|
||||
const Environment& env,
|
||||
const SdpAudioFormat& format,
|
||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
||||
const Environment& /* env */,
|
||||
const SdpAudioFormat& /* format */,
|
||||
std::optional<AudioCodecPairId> /* codec_pair_id */) {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
@ -72,7 +75,7 @@ template <typename Trait,
|
||||
std::unique_ptr<AudioDecoder>>>>
|
||||
absl::Nullable<std::unique_ptr<AudioDecoder>> CreateDecoder(
|
||||
Rank0,
|
||||
const Environment& env,
|
||||
const Environment& /* env */,
|
||||
const typename Trait::Config& config,
|
||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
||||
return Trait::MakeAudioDecoder(config, codec_pair_id);
|
||||
|
||||
@ -35,15 +35,16 @@ struct Helper;
|
||||
// Base case: 0 template parameters.
|
||||
template <>
|
||||
struct Helper<> {
|
||||
static void AppendSupportedEncoders(std::vector<AudioCodecSpec>* specs) {}
|
||||
static void AppendSupportedEncoders(
|
||||
std::vector<AudioCodecSpec>* /* specs */) {}
|
||||
static std::optional<AudioCodecInfo> QueryAudioEncoder(
|
||||
const SdpAudioFormat& format) {
|
||||
const SdpAudioFormat& /* format */) {
|
||||
return std::nullopt;
|
||||
}
|
||||
static absl::Nullable<std::unique_ptr<AudioEncoder>> CreateAudioEncoder(
|
||||
const Environment& env,
|
||||
const SdpAudioFormat& format,
|
||||
const AudioEncoderFactory::Options& options) {
|
||||
const Environment& /* env */,
|
||||
const SdpAudioFormat& /* format */,
|
||||
const AudioEncoderFactory::Options& /* options */) {
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
@ -76,7 +77,7 @@ template <typename Trait,
|
||||
std::unique_ptr<AudioEncoder>>>>
|
||||
absl::Nullable<std::unique_ptr<AudioEncoder>> CreateEncoder(
|
||||
Rank0,
|
||||
const Environment& env,
|
||||
const Environment& /* env */,
|
||||
const typename Trait::Config& config,
|
||||
const AudioEncoderFactory::Options& options) {
|
||||
return Trait::MakeAudioEncoder(config, options.payload_type,
|
||||
|
||||
@ -39,7 +39,8 @@ struct NotAdvertised {
|
||||
static std::optional<Config> SdpToConfig(const SdpAudioFormat& audio_format) {
|
||||
return T::SdpToConfig(audio_format);
|
||||
}
|
||||
static void AppendSupportedDecoders(std::vector<AudioCodecSpec>* specs) {
|
||||
static void AppendSupportedDecoders(
|
||||
std::vector<AudioCodecSpec>* /* specs */) {
|
||||
// Don't advertise support for anything.
|
||||
}
|
||||
static std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
||||
|
||||
@ -40,7 +40,8 @@ struct NotAdvertised {
|
||||
static std::optional<Config> SdpToConfig(const SdpAudioFormat& audio_format) {
|
||||
return T::SdpToConfig(audio_format);
|
||||
}
|
||||
static void AppendSupportedEncoders(std::vector<AudioCodecSpec>* specs) {
|
||||
static void AppendSupportedEncoders(
|
||||
std::vector<AudioCodecSpec>* /* specs */) {
|
||||
// Don't advertise support for anything.
|
||||
}
|
||||
static AudioCodecInfo QueryAudioEncoder(const Config& config) {
|
||||
|
||||
@ -55,7 +55,7 @@ void AudioDecoderG711::AppendSupportedDecoders(
|
||||
std::unique_ptr<AudioDecoder> AudioDecoderG711::MakeAudioDecoder(
|
||||
const Config& config,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/,
|
||||
const FieldTrialsView* field_trials) {
|
||||
const FieldTrialsView* /* field_trials */) {
|
||||
if (!config.IsOk()) {
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
|
||||
@ -76,7 +76,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderG711::MakeAudioEncoder(
|
||||
const Config& config,
|
||||
int payload_type,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/,
|
||||
const FieldTrialsView* field_trials) {
|
||||
const FieldTrialsView* /* field_trials */) {
|
||||
if (!config.IsOk()) {
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
|
||||
@ -43,7 +43,7 @@ void AudioDecoderG722::AppendSupportedDecoders(
|
||||
std::unique_ptr<AudioDecoder> AudioDecoderG722::MakeAudioDecoder(
|
||||
Config config,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/,
|
||||
const FieldTrialsView* field_trials) {
|
||||
const FieldTrialsView* /* field_trials */) {
|
||||
if (!config.IsOk()) {
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
|
||||
@ -74,7 +74,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderG722::MakeAudioEncoder(
|
||||
const AudioEncoderG722Config& config,
|
||||
int payload_type,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/,
|
||||
const FieldTrialsView* field_trials) {
|
||||
const FieldTrialsView* /* field_trials */) {
|
||||
if (!config.IsOk()) {
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
|
||||
@ -69,7 +69,7 @@ void AudioDecoderMultiChannelOpus::AppendSupportedDecoders(
|
||||
std::unique_ptr<AudioDecoder> AudioDecoderMultiChannelOpus::MakeAudioDecoder(
|
||||
AudioDecoderMultiChannelOpusConfig config,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/,
|
||||
const FieldTrialsView* field_trials) {
|
||||
const FieldTrialsView* /* field_trials */) {
|
||||
return AudioDecoderMultiChannelOpusImpl::MakeAudioDecoder(config);
|
||||
}
|
||||
} // namespace webrtc
|
||||
|
||||
@ -67,7 +67,7 @@ std::unique_ptr<AudioEncoder> AudioEncoderMultiChannelOpus::MakeAudioEncoder(
|
||||
const AudioEncoderMultiChannelOpusConfig& config,
|
||||
int payload_type,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/,
|
||||
const FieldTrialsView* field_trials) {
|
||||
const FieldTrialsView* /* field_trials */) {
|
||||
return AudioEncoderMultiChannelOpusImpl::MakeAudioEncoder(config,
|
||||
payload_type);
|
||||
}
|
||||
|
||||
@ -34,7 +34,8 @@ struct NotAdvertised {
|
||||
static std::optional<Config> SdpToConfig(const SdpAudioFormat& audio_format) {
|
||||
return T::SdpToConfig(audio_format);
|
||||
}
|
||||
static void AppendSupportedDecoders(std::vector<AudioCodecSpec>* specs) {
|
||||
static void AppendSupportedDecoders(
|
||||
std::vector<AudioCodecSpec>* /* specs */) {
|
||||
// Don't advertise support for anything.
|
||||
}
|
||||
static std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
||||
|
||||
@ -34,7 +34,8 @@ struct NotAdvertised {
|
||||
static std::optional<Config> SdpToConfig(const SdpAudioFormat& audio_format) {
|
||||
return T::SdpToConfig(audio_format);
|
||||
}
|
||||
static void AppendSupportedEncoders(std::vector<AudioCodecSpec>* specs) {
|
||||
static void AppendSupportedEncoders(
|
||||
std::vector<AudioCodecSpec>* /* specs */) {
|
||||
// Don't advertise support for anything.
|
||||
}
|
||||
static AudioCodecInfo QueryAudioEncoder(const Config& config) {
|
||||
|
||||
@ -93,7 +93,8 @@ struct BaseAudioDecoderApi {
|
||||
|
||||
static SdpAudioFormat AudioFormat() { return {"fake", 16'000, 2, {}}; }
|
||||
|
||||
static std::optional<Config> SdpToConfig(const SdpAudioFormat& audio_format) {
|
||||
static std::optional<Config> SdpToConfig(
|
||||
const SdpAudioFormat& /* audio_format */) {
|
||||
return Config();
|
||||
}
|
||||
|
||||
@ -110,17 +111,17 @@ struct TraitWithTwoMakeAudioDecoders : BaseAudioDecoderApi {
|
||||
static constexpr int kRateWithEnv = 20'000;
|
||||
|
||||
static std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
||||
const Config& config,
|
||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
||||
const Config& /* config */,
|
||||
std::optional<AudioCodecPairId> /* codec_pair_id */) {
|
||||
auto decoder = std::make_unique<NiceMock<MockAudioDecoder>>();
|
||||
ON_CALL(*decoder, SampleRateHz).WillByDefault(Return(kRateWithoutEnv));
|
||||
return decoder;
|
||||
}
|
||||
|
||||
static std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
||||
const Environment& env,
|
||||
const Config& config,
|
||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
||||
const Environment& /* env */,
|
||||
const Config& /* config */,
|
||||
std::optional<AudioCodecPairId> /* codec_pair_id */) {
|
||||
auto decoder = std::make_unique<NiceMock<MockAudioDecoder>>();
|
||||
ON_CALL(*decoder, SampleRateHz).WillByDefault(Return(kRateWithEnv));
|
||||
return decoder;
|
||||
@ -139,8 +140,8 @@ TEST(AudioDecoderFactoryTemplateTest,
|
||||
|
||||
struct AudioDecoderApiWithV1Make : BaseAudioDecoderApi {
|
||||
static std::unique_ptr<AudioDecoder> MakeAudioDecoder(
|
||||
const Config& config,
|
||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
||||
const Config& /* config */,
|
||||
std::optional<AudioCodecPairId> /* codec_pair_id */) {
|
||||
return std::make_unique<NiceMock<MockAudioDecoder>>();
|
||||
}
|
||||
};
|
||||
|
||||
@ -77,7 +77,7 @@ struct AudioEncoderFakeApi {
|
||||
|
||||
static std::unique_ptr<AudioEncoder> MakeAudioEncoder(
|
||||
const Config&,
|
||||
int payload_type,
|
||||
int /* payload_type */,
|
||||
std::optional<AudioCodecPairId> /*codec_pair_id*/ = std::nullopt) {
|
||||
auto enc = std::make_unique<testing::StrictMock<MockAudioEncoder>>();
|
||||
EXPECT_CALL(*enc, SampleRateHz())
|
||||
@ -99,7 +99,8 @@ struct BaseAudioEncoderApi {
|
||||
static SdpAudioFormat AudioFormat() { return {"fake", 16'000, 2, {}}; }
|
||||
static AudioCodecInfo CodecInfo() { return {16'000, 2, 23456}; }
|
||||
|
||||
static std::optional<Config> SdpToConfig(const SdpAudioFormat& audio_format) {
|
||||
static std::optional<Config> SdpToConfig(
|
||||
const SdpAudioFormat& /* audio_format */) {
|
||||
return Config();
|
||||
}
|
||||
|
||||
@ -113,8 +114,8 @@ struct BaseAudioEncoderApi {
|
||||
struct AudioEncoderApiWithV1Make : BaseAudioEncoderApi {
|
||||
static std::unique_ptr<AudioEncoder> MakeAudioEncoder(
|
||||
const Config&,
|
||||
int payload_type,
|
||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
||||
int /* payload_type */,
|
||||
std::optional<AudioCodecPairId> /* codec_pair_id */) {
|
||||
auto encoder = std::make_unique<NiceMock<MockAudioEncoder>>();
|
||||
ON_CALL(*encoder, SampleRateHz).WillByDefault(Return(kV1SameRate));
|
||||
return encoder;
|
||||
@ -123,9 +124,9 @@ struct AudioEncoderApiWithV1Make : BaseAudioEncoderApi {
|
||||
|
||||
struct AudioEncoderApiWithV2Make : BaseAudioEncoderApi {
|
||||
static std::unique_ptr<AudioEncoder> MakeAudioEncoder(
|
||||
const Environment& env,
|
||||
const Config& config,
|
||||
const AudioEncoderFactory::Options& options) {
|
||||
const Environment& /* env */,
|
||||
const Config& /* config */,
|
||||
const AudioEncoderFactory::Options& /* options */) {
|
||||
auto encoder = std::make_unique<NiceMock<MockAudioEncoder>>();
|
||||
ON_CALL(*encoder, SampleRateHz).WillByDefault(Return(kV2SameRate));
|
||||
return encoder;
|
||||
@ -135,17 +136,17 @@ struct AudioEncoderApiWithV2Make : BaseAudioEncoderApi {
|
||||
struct AudioEncoderApiWithBothV1AndV2Make : BaseAudioEncoderApi {
|
||||
static std::unique_ptr<AudioEncoder> MakeAudioEncoder(
|
||||
const Config&,
|
||||
int payload_type,
|
||||
std::optional<AudioCodecPairId> codec_pair_id) {
|
||||
int /* payload_type */,
|
||||
std::optional<AudioCodecPairId> /* codec_pair_id */) {
|
||||
auto encoder = std::make_unique<NiceMock<MockAudioEncoder>>();
|
||||
ON_CALL(*encoder, SampleRateHz).WillByDefault(Return(kV1SameRate));
|
||||
return encoder;
|
||||
}
|
||||
|
||||
static std::unique_ptr<AudioEncoder> MakeAudioEncoder(
|
||||
const Environment& env,
|
||||
const Config& config,
|
||||
const AudioEncoderFactory::Options& options) {
|
||||
const Environment& /* env */,
|
||||
const Config& /* config */,
|
||||
const AudioEncoderFactory::Options& /* options */) {
|
||||
auto encoder = std::make_unique<NiceMock<MockAudioEncoder>>();
|
||||
ON_CALL(*encoder, SampleRateHz).WillByDefault(Return(kV2SameRate));
|
||||
return encoder;
|
||||
|
||||
@ -58,15 +58,15 @@ uint64_t DataChannelInterface::MaxSendQueueSize() {
|
||||
}
|
||||
|
||||
// TODO(tommi): Remove method once downstream implementations have been removed.
|
||||
bool DataChannelInterface::Send(const DataBuffer& buffer) {
|
||||
bool DataChannelInterface::Send(const DataBuffer& /* buffer */) {
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO(tommi): Remove implementation once method is pure virtual.
|
||||
void DataChannelInterface::SendAsync(
|
||||
DataBuffer buffer,
|
||||
absl::AnyInvocable<void(RTCError) &&> on_complete) {
|
||||
DataBuffer /* buffer */,
|
||||
absl::AnyInvocable<void(RTCError) &&> /* on_complete */) {
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
}
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ class DataChannelObserver {
|
||||
// A data buffer was successfully received.
|
||||
virtual void OnMessage(const DataBuffer& buffer) = 0;
|
||||
// The data channel's buffered_amount has changed.
|
||||
virtual void OnBufferedAmountChange(uint64_t sent_data_size) {}
|
||||
virtual void OnBufferedAmountChange(uint64_t /* sent_data_size */) {}
|
||||
|
||||
// Override this to get callbacks directly on the network thread.
|
||||
// An implementation that does that must not block the network thread
|
||||
|
||||
@ -124,7 +124,7 @@ inline void EnvironmentFactory::Set(absl::Nullable<RtcEventLog*> utility) {
|
||||
|
||||
namespace webrtc_create_environment_internal {
|
||||
|
||||
inline void Set(EnvironmentFactory& factory) {}
|
||||
inline void Set(EnvironmentFactory& /* factory */) {}
|
||||
|
||||
template <typename FirstUtility, typename... Utilities>
|
||||
void Set(EnvironmentFactory& factory,
|
||||
|
||||
@ -54,7 +54,9 @@ class FakeFieldTrials : public FieldTrialsView {
|
||||
}
|
||||
}
|
||||
|
||||
std::string Lookup(absl::string_view key) const override { return "fake"; }
|
||||
std::string Lookup(absl::string_view /* key */) const override {
|
||||
return "fake";
|
||||
}
|
||||
|
||||
private:
|
||||
absl::AnyInvocable<void() &&> on_destroyed_;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user