Comment unused variables in implemented functions 12\n
Bug: webrtc:370878648 Change-Id: Ia9b1db4f6c393a016c3769cd57c540704e9ca4f7 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366526 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@{#43329}
This commit is contained in:
parent
a154b73097
commit
c118881416
@ -115,7 +115,7 @@ RtpCapabilities PeerConnectionFactoryInterface::GetRtpSenderCapabilities(
|
|||||||
}
|
}
|
||||||
|
|
||||||
RtpCapabilities PeerConnectionFactoryInterface::GetRtpReceiverCapabilities(
|
RtpCapabilities PeerConnectionFactoryInterface::GetRtpReceiverCapabilities(
|
||||||
cricket::MediaType kind) const {
|
cricket::MediaType /* kind */) const {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,12 +38,12 @@ FakeVoiceMediaReceiveChannel::VoiceChannelAudioSink::~VoiceChannelAudioSink() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
void FakeVoiceMediaReceiveChannel::VoiceChannelAudioSink::OnData(
|
void FakeVoiceMediaReceiveChannel::VoiceChannelAudioSink::OnData(
|
||||||
const void* audio_data,
|
const void* /* audio_data */,
|
||||||
int bits_per_sample,
|
int /* bits_per_sample */,
|
||||||
int sample_rate,
|
int /* sample_rate */,
|
||||||
size_t number_of_channels,
|
size_t /* number_of_channels */,
|
||||||
size_t number_of_frames,
|
size_t /* number_of_frames */,
|
||||||
std::optional<int64_t> absolute_capture_timestamp_ms) {}
|
std::optional<int64_t> /* absolute_capture_timestamp_ms */) {}
|
||||||
void FakeVoiceMediaReceiveChannel::VoiceChannelAudioSink::OnClose() {
|
void FakeVoiceMediaReceiveChannel::VoiceChannelAudioSink::OnClose() {
|
||||||
source_ = nullptr;
|
source_ = nullptr;
|
||||||
}
|
}
|
||||||
@ -141,12 +141,13 @@ std::optional<int> FakeVoiceMediaReceiveChannel::GetBaseMinimumPlayoutDelayMs(
|
|||||||
}
|
}
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
bool FakeVoiceMediaReceiveChannel::GetStats(VoiceMediaReceiveInfo* info,
|
bool FakeVoiceMediaReceiveChannel::GetStats(
|
||||||
bool get_and_clear_legacy_stats) {
|
VoiceMediaReceiveInfo* /* info */,
|
||||||
|
bool /* get_and_clear_legacy_stats */) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
void FakeVoiceMediaReceiveChannel::SetRawAudioSink(
|
void FakeVoiceMediaReceiveChannel::SetRawAudioSink(
|
||||||
uint32_t ssrc,
|
uint32_t /* ssrc */,
|
||||||
std::unique_ptr<webrtc::AudioSinkInterface> sink) {
|
std::unique_ptr<webrtc::AudioSinkInterface> sink) {
|
||||||
sink_ = std::move(sink);
|
sink_ = std::move(sink);
|
||||||
}
|
}
|
||||||
@ -155,7 +156,7 @@ void FakeVoiceMediaReceiveChannel::SetDefaultRawAudioSink(
|
|||||||
sink_ = std::move(sink);
|
sink_ = std::move(sink);
|
||||||
}
|
}
|
||||||
std::vector<webrtc::RtpSource> FakeVoiceMediaReceiveChannel::GetSources(
|
std::vector<webrtc::RtpSource> FakeVoiceMediaReceiveChannel::GetSources(
|
||||||
uint32_t ssrc) const {
|
uint32_t /* ssrc */) const {
|
||||||
return std::vector<webrtc::RtpSource>();
|
return std::vector<webrtc::RtpSource>();
|
||||||
}
|
}
|
||||||
bool FakeVoiceMediaReceiveChannel::SetRecvCodecs(
|
bool FakeVoiceMediaReceiveChannel::SetRecvCodecs(
|
||||||
|
|||||||
@ -581,7 +581,7 @@ class FakeVoiceMediaSendChannel
|
|||||||
void SetReceiveNonSenderRttEnabled(bool /* enabled */) {}
|
void SetReceiveNonSenderRttEnabled(bool /* enabled */) {}
|
||||||
bool SendCodecHasNack() const override { return false; }
|
bool SendCodecHasNack() const override { return false; }
|
||||||
void SetSendCodecChangedCallback(
|
void SetSendCodecChangedCallback(
|
||||||
absl::AnyInvocable<void()> callback) override {}
|
absl::AnyInvocable<void()> /* callback */) override {}
|
||||||
std::optional<Codec> GetSendCodec() const override;
|
std::optional<Codec> GetSendCodec() const override;
|
||||||
|
|
||||||
bool GetStats(VoiceMediaSendInfo* stats) override;
|
bool GetStats(VoiceMediaSendInfo* stats) override;
|
||||||
@ -658,7 +658,7 @@ class FakeVideoMediaReceiveChannel
|
|||||||
rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override;
|
rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) override;
|
||||||
bool HasSink(uint32_t ssrc) const;
|
bool HasSink(uint32_t ssrc) const;
|
||||||
|
|
||||||
void SetReceive(bool receive) override {}
|
void SetReceive(bool /* receive */) override {}
|
||||||
|
|
||||||
bool HasSource(uint32_t ssrc) const;
|
bool HasSource(uint32_t ssrc) const;
|
||||||
bool AddRecvStream(const StreamParams& sp) override;
|
bool AddRecvStream(const StreamParams& sp) override;
|
||||||
@ -675,13 +675,14 @@ class FakeVideoMediaReceiveChannel
|
|||||||
override;
|
override;
|
||||||
void ClearRecordableEncodedFrameCallback(uint32_t ssrc) override;
|
void ClearRecordableEncodedFrameCallback(uint32_t ssrc) override;
|
||||||
void RequestRecvKeyFrame(uint32_t ssrc) override;
|
void RequestRecvKeyFrame(uint32_t ssrc) override;
|
||||||
void SetReceiverFeedbackParameters(bool lntf_enabled,
|
void SetReceiverFeedbackParameters(
|
||||||
bool nack_enabled,
|
bool /* lntf_enabled */,
|
||||||
webrtc::RtcpMode rtcp_mode,
|
bool /* nack_enabled */,
|
||||||
std::optional<int> rtx_time) override {}
|
webrtc::RtcpMode /* rtcp_mode */,
|
||||||
|
std::optional<int> /* rtx_time */) override {}
|
||||||
bool GetStats(VideoMediaReceiveInfo* info) override;
|
bool GetStats(VideoMediaReceiveInfo* info) override;
|
||||||
|
|
||||||
bool AddDefaultRecvStreamForTesting(const StreamParams& sp) override {
|
bool AddDefaultRecvStreamForTesting(const StreamParams& /* sp */) override {
|
||||||
RTC_CHECK_NOTREACHED();
|
RTC_CHECK_NOTREACHED();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -742,9 +743,10 @@ class FakeVideoMediaSendChannel
|
|||||||
return webrtc::RtcpMode::kCompound;
|
return webrtc::RtcpMode::kCompound;
|
||||||
}
|
}
|
||||||
void SetSendCodecChangedCallback(
|
void SetSendCodecChangedCallback(
|
||||||
absl::AnyInvocable<void()> callback) override {}
|
absl::AnyInvocable<void()> /* callback */) override {}
|
||||||
void SetSsrcListChangedCallback(
|
void SetSsrcListChangedCallback(
|
||||||
absl::AnyInvocable<void(const std::set<uint32_t>&)> callback) override {}
|
absl::AnyInvocable<void(const std::set<uint32_t>&)> /* callback */)
|
||||||
|
override {}
|
||||||
|
|
||||||
bool SendCodecHasLntf() const override { return false; }
|
bool SendCodecHasLntf() const override { return false; }
|
||||||
bool SendCodecHasNack() const override { return false; }
|
bool SendCodecHasNack() const override { return false; }
|
||||||
|
|||||||
@ -137,7 +137,7 @@ void FakeAudioReceiveStream::SetFrameDecryptor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
webrtc::AudioReceiveStreamInterface::Stats FakeAudioReceiveStream::GetStats(
|
webrtc::AudioReceiveStreamInterface::Stats FakeAudioReceiveStream::GetStats(
|
||||||
bool get_and_clear_legacy_stats) const {
|
bool /* get_and_clear_legacy_stats */) const {
|
||||||
return stats_;
|
return stats_;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ void FakeVideoSendStream::Stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FakeVideoSendStream::AddAdaptationResource(
|
void FakeVideoSendStream::AddAdaptationResource(
|
||||||
rtc::scoped_refptr<webrtc::Resource> resource) {}
|
rtc::scoped_refptr<webrtc::Resource> /* resource */) {}
|
||||||
|
|
||||||
std::vector<rtc::scoped_refptr<webrtc::Resource>>
|
std::vector<rtc::scoped_refptr<webrtc::Resource>>
|
||||||
FakeVideoSendStream::GetAdaptationResources() {
|
FakeVideoSendStream::GetAdaptationResources() {
|
||||||
@ -637,7 +637,7 @@ void FakeCall::DestroyFlexfecReceiveStream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FakeCall::AddAdaptationResource(
|
void FakeCall::AddAdaptationResource(
|
||||||
rtc::scoped_refptr<webrtc::Resource> resource) {}
|
rtc::scoped_refptr<webrtc::Resource> /* resource */) {}
|
||||||
|
|
||||||
webrtc::PacketReceiver* FakeCall::Receiver() {
|
webrtc::PacketReceiver* FakeCall::Receiver() {
|
||||||
return this;
|
return this;
|
||||||
@ -728,7 +728,7 @@ void FakeCall::SignalChannelNetworkState(webrtc::MediaType media,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void FakeCall::OnAudioTransportOverheadChanged(
|
void FakeCall::OnAudioTransportOverheadChanged(
|
||||||
int transport_overhead_per_packet) {}
|
int /* transport_overhead_per_packet */) {}
|
||||||
|
|
||||||
void FakeCall::OnLocalSsrcUpdated(webrtc::AudioReceiveStreamInterface& stream,
|
void FakeCall::OnLocalSsrcUpdated(webrtc::AudioReceiveStreamInterface& stream,
|
||||||
uint32_t local_ssrc) {
|
uint32_t local_ssrc) {
|
||||||
|
|||||||
@ -465,7 +465,7 @@ class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver {
|
|||||||
void SetStats(const webrtc::Call::Stats& stats);
|
void SetStats(const webrtc::Call::Stats& stats);
|
||||||
|
|
||||||
void SetClientBitratePreferences(
|
void SetClientBitratePreferences(
|
||||||
const webrtc::BitrateSettings& preferences) override {}
|
const webrtc::BitrateSettings& /* preferences */) override {}
|
||||||
const webrtc::FieldTrialsView& trials() const override {
|
const webrtc::FieldTrialsView& trials() const override {
|
||||||
return env_.field_trials();
|
return env_.field_trials();
|
||||||
}
|
}
|
||||||
@ -500,7 +500,7 @@ class FakeCall final : public webrtc::Call, public webrtc::PacketReceiver {
|
|||||||
|
|
||||||
webrtc::PacketReceiver* Receiver() override;
|
webrtc::PacketReceiver* Receiver() override;
|
||||||
|
|
||||||
void DeliverRtcpPacket(rtc::CopyOnWriteBuffer packet) override {}
|
void DeliverRtcpPacket(rtc::CopyOnWriteBuffer /* packet */) override {}
|
||||||
|
|
||||||
void DeliverRtpPacket(
|
void DeliverRtpPacket(
|
||||||
webrtc::MediaType media_type,
|
webrtc::MediaType media_type,
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class PowerRatioEstimator : public LappedTransform::Callback {
|
|||||||
size_t num_input_channels,
|
size_t num_input_channels,
|
||||||
size_t /* num_freq_bins */,
|
size_t /* num_freq_bins */,
|
||||||
size_t /* num_output_channels */,
|
size_t /* num_output_channels */,
|
||||||
std::complex<float>* const* output) override {
|
std::complex<float>* const* /* output */) override {
|
||||||
float low_pow = 0.f;
|
float low_pow = 0.f;
|
||||||
float high_pow = 0.f;
|
float high_pow = 0.f;
|
||||||
for (size_t i = 0u; i < num_input_channels; ++i) {
|
for (size_t i = 0u; i < num_input_channels; ++i) {
|
||||||
|
|||||||
@ -187,7 +187,7 @@ void OpusTest::PrepareSpeechData(int block_length_ms, int loop_length_ms) {
|
|||||||
block_length_ms * sample_rate_khz * channels_));
|
block_length_ms * sample_rate_khz * channels_));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OpusTest::SetMaxPlaybackRate(WebRtcOpusEncInst* encoder,
|
void OpusTest::SetMaxPlaybackRate(WebRtcOpusEncInst* /* encoder */,
|
||||||
opus_int32 expect,
|
opus_int32 expect,
|
||||||
int32_t set) {
|
int32_t set) {
|
||||||
opus_int32 bandwidth;
|
opus_int32 bandwidth;
|
||||||
|
|||||||
@ -22,7 +22,7 @@ class PlusThreeBlockerCallback : public webrtc::BlockerCallback {
|
|||||||
public:
|
public:
|
||||||
void ProcessBlock(const float* const* input,
|
void ProcessBlock(const float* const* input,
|
||||||
size_t num_frames,
|
size_t num_frames,
|
||||||
size_t num_input_channels,
|
size_t /* num_input_channels */,
|
||||||
size_t num_output_channels,
|
size_t num_output_channels,
|
||||||
float* const* output) override {
|
float* const* output) override {
|
||||||
for (size_t i = 0; i < num_output_channels; ++i) {
|
for (size_t i = 0; i < num_output_channels; ++i) {
|
||||||
@ -38,7 +38,7 @@ class CopyBlockerCallback : public webrtc::BlockerCallback {
|
|||||||
public:
|
public:
|
||||||
void ProcessBlock(const float* const* input,
|
void ProcessBlock(const float* const* input,
|
||||||
size_t num_frames,
|
size_t num_frames,
|
||||||
size_t num_input_channels,
|
size_t /* num_input_channels */,
|
||||||
size_t num_output_channels,
|
size_t num_output_channels,
|
||||||
float* const* output) override {
|
float* const* output) override {
|
||||||
for (size_t i = 0; i < num_output_channels; ++i) {
|
for (size_t i = 0; i < num_output_channels; ++i) {
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class FftCheckerCallback : public webrtc::LappedTransform::Callback {
|
|||||||
size_t in_channels,
|
size_t in_channels,
|
||||||
size_t frames,
|
size_t frames,
|
||||||
size_t out_channels,
|
size_t out_channels,
|
||||||
complex<float>* const* out_block) override {
|
complex<float>* const* /* out_block */) override {
|
||||||
RTC_CHECK_EQ(in_channels, out_channels);
|
RTC_CHECK_EQ(in_channels, out_channels);
|
||||||
|
|
||||||
size_t full_length = (frames - 1) * 2;
|
size_t full_length = (frames - 1) * 2;
|
||||||
|
|||||||
@ -61,7 +61,7 @@ std::vector<AudioDecoder::ParseResult> AudioDecoderPcm16B::ParsePayload(
|
|||||||
samples_per_ms);
|
samples_per_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
int AudioDecoderPcm16B::PacketDuration(const uint8_t* encoded,
|
int AudioDecoderPcm16B::PacketDuration(const uint8_t* /* encoded */,
|
||||||
size_t encoded_len) const {
|
size_t encoded_len) const {
|
||||||
// Two encoded byte per sample per channel.
|
// Two encoded byte per sample per channel.
|
||||||
return static_cast<int>(encoded_len / (2 * Channels()));
|
return static_cast<int>(encoded_len / (2 * Channels()));
|
||||||
|
|||||||
@ -39,17 +39,17 @@ class AudioPacketizationCallback {
|
|||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
int64_t absolute_capture_timestamp_ms) {
|
int64_t /* absolute_capture_timestamp_ms */) {
|
||||||
// TODO(bugs.webrtc.org/10739): Deprecate the old SendData and make this one
|
// TODO(bugs.webrtc.org/10739): Deprecate the old SendData and make this one
|
||||||
// pure virtual.
|
// pure virtual.
|
||||||
return SendData(frame_type, payload_type, timestamp, payload_data,
|
return SendData(frame_type, payload_type, timestamp, payload_data,
|
||||||
payload_len_bytes);
|
payload_len_bytes);
|
||||||
}
|
}
|
||||||
virtual int32_t SendData(AudioFrameType frame_type,
|
virtual int32_t SendData(AudioFrameType /* frame_type */,
|
||||||
uint8_t payload_type,
|
uint8_t /* payload_type */,
|
||||||
uint32_t timestamp,
|
uint32_t /* timestamp */,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* /* payload_data */,
|
||||||
size_t payload_len_bytes) {
|
size_t /* payload_len_bytes */) {
|
||||||
RTC_DCHECK_NOTREACHED() << "This method must be overridden, or not used.";
|
RTC_DCHECK_NOTREACHED() << "This method must be overridden, or not used.";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -120,8 +120,8 @@ bool BackgroundNoise::Update(const AudioMultiVector& sync_buffer) {
|
|||||||
void BackgroundNoise::GenerateBackgroundNoise(
|
void BackgroundNoise::GenerateBackgroundNoise(
|
||||||
rtc::ArrayView<const int16_t> random_vector,
|
rtc::ArrayView<const int16_t> random_vector,
|
||||||
size_t channel,
|
size_t channel,
|
||||||
int mute_slope,
|
int /* mute_slope */,
|
||||||
bool too_many_expands,
|
bool /* too_many_expands */,
|
||||||
size_t num_noise_samples,
|
size_t num_noise_samples,
|
||||||
int16_t* buffer) {
|
int16_t* buffer) {
|
||||||
constexpr size_t kNoiseLpcOrder = kMaxLpcOrder;
|
constexpr size_t kNoiseLpcOrder = kMaxLpcOrder;
|
||||||
|
|||||||
@ -114,7 +114,7 @@ void DecisionLogic::SetSampleRate(int fs_hz, size_t output_size_samples) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
NetEq::Operation DecisionLogic::GetDecision(const NetEqStatus& status,
|
NetEq::Operation DecisionLogic::GetDecision(const NetEqStatus& status,
|
||||||
bool* reset_decoder) {
|
bool* /* reset_decoder */) {
|
||||||
prev_time_scale_ = prev_time_scale_ && IsTimestretch(status.last_mode);
|
prev_time_scale_ = prev_time_scale_ && IsTimestretch(status.last_mode);
|
||||||
if (prev_time_scale_) {
|
if (prev_time_scale_) {
|
||||||
timescale_countdown_ = tick_timer_->GetNewCountdown(kMinTimescaleInterval);
|
timescale_countdown_ = tick_timer_->GetNewCountdown(kMinTimescaleInterval);
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class DecisionLogic : public NetEqController {
|
|||||||
NetEq::Operation GetDecision(const NetEqController::NetEqStatus& status,
|
NetEq::Operation GetDecision(const NetEqController::NetEqStatus& status,
|
||||||
bool* reset_decoder) override;
|
bool* reset_decoder) override;
|
||||||
|
|
||||||
void ExpandDecision(NetEq::Operation operation) override {}
|
void ExpandDecision(NetEq::Operation /* operation */) override {}
|
||||||
|
|
||||||
// Adds `value` to `sample_memory_`.
|
// Adds `value` to `sample_memory_`.
|
||||||
void AddSampleMemory(int32_t value) override { sample_memory_ += value; }
|
void AddSampleMemory(int32_t value) override { sample_memory_ += value; }
|
||||||
|
|||||||
@ -56,7 +56,7 @@ class FakeStatisticsCalculator : public StatisticsCalculator {
|
|||||||
FakeStatisticsCalculator(TickTimer* tick_timer)
|
FakeStatisticsCalculator(TickTimer* tick_timer)
|
||||||
: StatisticsCalculator(tick_timer) {}
|
: StatisticsCalculator(tick_timer) {}
|
||||||
|
|
||||||
void LogDelayedPacketOutageEvent(int num_samples, int fs_hz) override {
|
void LogDelayedPacketOutageEvent(int num_samples, int /* fs_hz */) override {
|
||||||
last_outage_duration_samples_ = num_samples;
|
last_outage_duration_samples_ = num_samples;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -494,7 +494,7 @@ TEST_F(NetEqImplTest, VerifyTimestampPropagation) {
|
|||||||
CountingSamplesDecoder() : next_value_(1) {}
|
CountingSamplesDecoder() : next_value_(1) {}
|
||||||
|
|
||||||
// Produce as many samples as input bytes (`encoded_len`).
|
// Produce as many samples as input bytes (`encoded_len`).
|
||||||
int DecodeInternal(const uint8_t* encoded,
|
int DecodeInternal(const uint8_t* /* encoded */,
|
||||||
size_t encoded_len,
|
size_t encoded_len,
|
||||||
int /* sample_rate_hz */,
|
int /* sample_rate_hz */,
|
||||||
int16_t* decoded,
|
int16_t* decoded,
|
||||||
@ -1690,7 +1690,7 @@ TEST_F(NetEqImplTest, NoCrashWith1000Channels) {
|
|||||||
EXPECT_CALL(*mock_decoder_database_, GetActiveDecoder())
|
EXPECT_CALL(*mock_decoder_database_, GetActiveDecoder())
|
||||||
.WillRepeatedly(Return(decoder));
|
.WillRepeatedly(Return(decoder));
|
||||||
EXPECT_CALL(*mock_decoder_database_, SetActiveDecoder(_, _))
|
EXPECT_CALL(*mock_decoder_database_, SetActiveDecoder(_, _))
|
||||||
.WillOnce(Invoke([](uint8_t rtp_payload_type, bool* new_decoder) {
|
.WillOnce(Invoke([](uint8_t /* rtp_payload_type */, bool* new_decoder) {
|
||||||
*new_decoder = true;
|
*new_decoder = true;
|
||||||
return 0;
|
return 0;
|
||||||
}));
|
}));
|
||||||
@ -1803,8 +1803,8 @@ class Decoder120ms : public AudioDecoder {
|
|||||||
next_value_(1),
|
next_value_(1),
|
||||||
speech_type_(speech_type) {}
|
speech_type_(speech_type) {}
|
||||||
|
|
||||||
int DecodeInternal(const uint8_t* encoded,
|
int DecodeInternal(const uint8_t* /* encoded */,
|
||||||
size_t encoded_len,
|
size_t /* encoded_len */,
|
||||||
int sample_rate_hz,
|
int sample_rate_hz,
|
||||||
int16_t* decoded,
|
int16_t* decoded,
|
||||||
SpeechType* speech_type) override {
|
SpeechType* speech_type) override {
|
||||||
|
|||||||
@ -77,7 +77,7 @@ class MockAudioDecoder final : public AudioDecoder {
|
|||||||
const size_t num_channels_;
|
const size_t num_channels_;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<ParseResult> ParsePayload(rtc::Buffer&& payload,
|
std::vector<ParseResult> ParsePayload(rtc::Buffer&& /* payload */,
|
||||||
uint32_t timestamp) override {
|
uint32_t timestamp) override {
|
||||||
std::vector<ParseResult> results;
|
std::vector<ParseResult> results;
|
||||||
if (fec_enabled_) {
|
if (fec_enabled_) {
|
||||||
@ -91,14 +91,15 @@ class MockAudioDecoder final : public AudioDecoder {
|
|||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
int PacketDuration(const uint8_t* encoded,
|
int PacketDuration(const uint8_t* /* encoded */,
|
||||||
size_t encoded_len) const override {
|
size_t /* encoded_len */) const override {
|
||||||
ADD_FAILURE() << "Since going through ParsePayload, PacketDuration should "
|
ADD_FAILURE() << "Since going through ParsePayload, PacketDuration should "
|
||||||
"never get called.";
|
"never get called.";
|
||||||
return kPacketDuration;
|
return kPacketDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PacketHasFec(const uint8_t* encoded, size_t encoded_len) const override {
|
bool PacketHasFec(const uint8_t* /* encoded */,
|
||||||
|
size_t /* encoded_len */) const override {
|
||||||
ADD_FAILURE() << "Since going through ParsePayload, PacketHasFec should "
|
ADD_FAILURE() << "Since going through ParsePayload, PacketHasFec should "
|
||||||
"never get called.";
|
"never get called.";
|
||||||
return fec_enabled_;
|
return fec_enabled_;
|
||||||
@ -113,11 +114,11 @@ class MockAudioDecoder final : public AudioDecoder {
|
|||||||
bool fec_enabled() const { return fec_enabled_; }
|
bool fec_enabled() const { return fec_enabled_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int DecodeInternal(const uint8_t* encoded,
|
int DecodeInternal(const uint8_t* /* encoded */,
|
||||||
size_t encoded_len,
|
size_t /* encoded_len */,
|
||||||
int sample_rate_hz,
|
int /* sample_rate_hz */,
|
||||||
int16_t* decoded,
|
int16_t* /* decoded */,
|
||||||
SpeechType* speech_type) override {
|
SpeechType* /* speech_type */) override {
|
||||||
ADD_FAILURE() << "Since going through ParsePayload, DecodeInternal should "
|
ADD_FAILURE() << "Since going through ParsePayload, DecodeInternal should "
|
||||||
"never get called.";
|
"never get called.";
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
@ -52,9 +52,9 @@ class NetEqPcm16bQualityTest : public NetEqQualityTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int EncodeBlock(int16_t* in_data,
|
int EncodeBlock(int16_t* in_data,
|
||||||
size_t block_size_samples,
|
size_t /* block_size_samples */,
|
||||||
rtc::Buffer* payload,
|
rtc::Buffer* payload,
|
||||||
size_t max_bytes) override {
|
size_t /* max_bytes */) override {
|
||||||
const size_t kFrameSizeSamples = 480; // Samples per 10 ms.
|
const size_t kFrameSizeSamples = 480; // Samples per 10 ms.
|
||||||
size_t encoded_samples = 0;
|
size_t encoded_samples = 0;
|
||||||
uint32_t dummy_timestamp = 0;
|
uint32_t dummy_timestamp = 0;
|
||||||
|
|||||||
@ -51,9 +51,9 @@ class NetEqPcmuQualityTest : public NetEqQualityTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int EncodeBlock(int16_t* in_data,
|
int EncodeBlock(int16_t* in_data,
|
||||||
size_t block_size_samples,
|
size_t /* block_size_samples */,
|
||||||
rtc::Buffer* payload,
|
rtc::Buffer* payload,
|
||||||
size_t max_bytes) override {
|
size_t /* max_bytes */) override {
|
||||||
const size_t kFrameSizeSamples = 80; // Samples per 10 ms.
|
const size_t kFrameSizeSamples = 80; // Samples per 10 ms.
|
||||||
size_t encoded_samples = 0;
|
size_t encoded_samples = 0;
|
||||||
uint32_t dummy_timestamp = 0;
|
uint32_t dummy_timestamp = 0;
|
||||||
|
|||||||
@ -18,7 +18,8 @@ bool AudioSinkFork::WriteArray(const int16_t* audio, size_t num_samples) {
|
|||||||
right_sink_->WriteArray(audio, num_samples);
|
right_sink_->WriteArray(audio, num_samples);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VoidAudioSink::WriteArray(const int16_t* audio, size_t num_samples) {
|
bool VoidAudioSink::WriteArray(const int16_t* /* audio */,
|
||||||
|
size_t /* num_samples */) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,7 @@ void PrintDelays(const NetEqDelayAnalyzer::Delays& delays,
|
|||||||
|
|
||||||
void NetEqDelayAnalyzer::AfterInsertPacket(
|
void NetEqDelayAnalyzer::AfterInsertPacket(
|
||||||
const test::NetEqInput::PacketData& packet,
|
const test::NetEqInput::PacketData& packet,
|
||||||
NetEq* neteq) {
|
NetEq* /* neteq */) {
|
||||||
data_.insert(
|
data_.insert(
|
||||||
std::make_pair(packet.header.timestamp, TimingData(packet.time_ms)));
|
std::make_pair(packet.header.timestamp, TimingData(packet.time_ms)));
|
||||||
ssrcs_.insert(packet.header.ssrc);
|
ssrcs_.insert(packet.header.ssrc);
|
||||||
|
|||||||
@ -259,13 +259,13 @@ NetEqQualityTest::~NetEqQualityTest() {
|
|||||||
log_file_.close();
|
log_file_.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool NoLoss::Lost(int now_ms) {
|
bool NoLoss::Lost(int /* now_ms */) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
UniformLoss::UniformLoss(double loss_rate) : loss_rate_(loss_rate) {}
|
UniformLoss::UniformLoss(double loss_rate) : loss_rate_(loss_rate) {}
|
||||||
|
|
||||||
bool UniformLoss::Lost(int now_ms) {
|
bool UniformLoss::Lost(int /* now_ms */) {
|
||||||
int drop_this = rand();
|
int drop_this = rand();
|
||||||
return (drop_this < loss_rate_ * RAND_MAX);
|
return (drop_this < loss_rate_ * RAND_MAX);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,7 +33,8 @@ namespace test {
|
|||||||
class NetEqTestErrorCallback {
|
class NetEqTestErrorCallback {
|
||||||
public:
|
public:
|
||||||
virtual ~NetEqTestErrorCallback() = default;
|
virtual ~NetEqTestErrorCallback() = default;
|
||||||
virtual void OnInsertPacketError(const NetEqInput::PacketData& packet) {}
|
virtual void OnInsertPacketError(const NetEqInput::PacketData& /* packet */) {
|
||||||
|
}
|
||||||
virtual void OnGetAudioError() {}
|
virtual void OnGetAudioError() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -107,12 +107,12 @@ class Packetizer : public AudioPacketizationCallback {
|
|||||||
ssrc_(ssrc),
|
ssrc_(ssrc),
|
||||||
timestamp_rate_hz_(timestamp_rate_hz) {}
|
timestamp_rate_hz_(timestamp_rate_hz) {}
|
||||||
|
|
||||||
int32_t SendData(AudioFrameType frame_type,
|
int32_t SendData(AudioFrameType /* frame_type */,
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
int64_t absolute_capture_timestamp_ms) override {
|
int64_t /* absolute_capture_timestamp_ms */) override {
|
||||||
if (payload_len_bytes == 0) {
|
if (payload_len_bytes == 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@ int32_t Channel::SendData(AudioFrameType frameType,
|
|||||||
uint32_t timeStamp,
|
uint32_t timeStamp,
|
||||||
const uint8_t* payloadData,
|
const uint8_t* payloadData,
|
||||||
size_t payloadSize,
|
size_t payloadSize,
|
||||||
int64_t absolute_capture_timestamp_ms) {
|
int64_t /* absolute_capture_timestamp_ms */) {
|
||||||
RTPHeader rtp_header;
|
RTPHeader rtp_header;
|
||||||
int32_t status;
|
int32_t status;
|
||||||
size_t payloadDataSize = payloadSize;
|
size_t payloadDataSize = payloadSize;
|
||||||
|
|||||||
@ -39,12 +39,13 @@ TestPacketization::TestPacketization(RTPStream* rtpStream, uint16_t frequency)
|
|||||||
|
|
||||||
TestPacketization::~TestPacketization() {}
|
TestPacketization::~TestPacketization() {}
|
||||||
|
|
||||||
int32_t TestPacketization::SendData(const AudioFrameType /* frameType */,
|
int32_t TestPacketization::SendData(
|
||||||
|
const AudioFrameType /* frameType */,
|
||||||
const uint8_t payloadType,
|
const uint8_t payloadType,
|
||||||
const uint32_t timeStamp,
|
const uint32_t timeStamp,
|
||||||
const uint8_t* payloadData,
|
const uint8_t* payloadData,
|
||||||
const size_t payloadSize,
|
const size_t payloadSize,
|
||||||
int64_t absolute_capture_timestamp_ms) {
|
int64_t /* absolute_capture_timestamp_ms */) {
|
||||||
_rtpStream->Write(payloadType, timeStamp, _seqNo++, payloadData, payloadSize,
|
_rtpStream->Write(payloadType, timeStamp, _seqNo++, payloadData, payloadSize,
|
||||||
_frequency);
|
_frequency);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
@ -68,7 +68,7 @@ int32_t TestPack::SendData(AudioFrameType frame_type,
|
|||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_size,
|
size_t payload_size,
|
||||||
int64_t absolute_capture_timestamp_ms) {
|
int64_t /* absolute_capture_timestamp_ms */) {
|
||||||
RTPHeader rtp_header;
|
RTPHeader rtp_header;
|
||||||
int32_t status;
|
int32_t status;
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ int32_t TestPackStereo::SendData(const AudioFrameType frame_type,
|
|||||||
const uint32_t timestamp,
|
const uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
const size_t payload_size,
|
const size_t payload_size,
|
||||||
int64_t absolute_capture_timestamp_ms) {
|
int64_t /* absolute_capture_timestamp_ms */) {
|
||||||
RTPHeader rtp_header;
|
RTPHeader rtp_header;
|
||||||
int32_t status = 0;
|
int32_t status = 0;
|
||||||
|
|
||||||
|
|||||||
@ -122,8 +122,8 @@ class ADMWrapper : public AudioDeviceModule, public AudioTransport {
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PullRenderData(int bits_per_sample,
|
void PullRenderData(int /* bits_per_sample */,
|
||||||
int sample_rate,
|
int /* sample_rate */,
|
||||||
size_t number_of_channels,
|
size_t number_of_channels,
|
||||||
size_t number_of_frames,
|
size_t number_of_frames,
|
||||||
void* audio_data,
|
void* audio_data,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user