Make some DecisionLogic functions virtual.
Bug: webrtc:11005
Change-Id: I86d1eadc85162abf77010d97917e5ab20f644d66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158783
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29684}
diff --git a/modules/audio_coding/neteq/decision_logic.h b/modules/audio_coding/neteq/decision_logic.h
index b8dbefe..899f930 100644
--- a/modules/audio_coding/neteq/decision_logic.h
+++ b/modules/audio_coding/neteq/decision_logic.h
@@ -99,7 +99,7 @@
}
bool PeakFound() const override { return delay_manager_->PeakFound(); }
- virtual int GetFilteredBufferLevel() const override {
+ int GetFilteredBufferLevel() const override {
return buffer_level_filter_.filtered_current_level();
}
@@ -126,29 +126,30 @@
// Returns the operation given that the next available packet is a comfort
// noise payload (RFC 3389 only, not codec-internal).
- NetEq::Operation CngOperation(NetEq::Mode prev_mode,
- uint32_t target_timestamp,
- uint32_t available_timestamp,
- size_t generated_noise_samples);
+ virtual NetEq::Operation CngOperation(NetEq::Mode prev_mode,
+ uint32_t target_timestamp,
+ uint32_t available_timestamp,
+ size_t generated_noise_samples);
// Returns the operation given that no packets are available (except maybe
// a DTMF event, flagged by setting |play_dtmf| true).
- NetEq::Operation NoPacket(bool play_dtmf);
+ virtual NetEq::Operation NoPacket(bool play_dtmf);
// Returns the operation to do given that the expected packet is available.
- NetEq::Operation ExpectedPacketAvailable(NetEq::Mode prev_mode,
- bool play_dtmf);
+ virtual NetEq::Operation ExpectedPacketAvailable(NetEq::Mode prev_mode,
+ bool play_dtmf);
// Returns the operation to do given that the expected packet is not
// available, but a packet further into the future is at hand.
- NetEq::Operation FuturePacketAvailable(size_t decoder_frame_length,
- NetEq::Mode prev_mode,
- uint32_t target_timestamp,
- uint32_t available_timestamp,
- bool play_dtmf,
- size_t generated_noise_samples,
- size_t span_samples_in_packet_buffer,
- size_t num_packets_in_packet_buffer);
+ virtual NetEq::Operation FuturePacketAvailable(
+ size_t decoder_frame_length,
+ NetEq::Mode prev_mode,
+ uint32_t target_timestamp,
+ uint32_t available_timestamp,
+ bool play_dtmf,
+ size_t generated_noise_samples,
+ size_t span_samples_in_packet_buffer,
+ size_t num_packets_in_packet_buffer);
// Checks if enough time has elapsed since the last successful timescale
// operation was done (i.e., accelerate or preemptive expand).