NetEq: Fold GetDecisionSpecialized into GetDecision

Now that there is only one implementation of the decision logic, there
is no longer any need to have GetDecisionSpecialized being separate.

Bug: webrtc:9421
Change-Id: Id364ce09ac05d106652d749502058056f11bba27
Reviewed-on: https://webrtc-review.googlesource.com/86604
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Commit-Queue: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23804}
This commit is contained in:
Henrik Lundin
2018-07-02 14:53:24 +02:00
committed by Commit Bot
parent 9f2e624024
commit 5afa61cf15
2 changed files with 34 additions and 68 deletions

View File

@ -29,7 +29,7 @@ class SyncBuffer;
struct Packet;
// This is the class for the decision tree implementation.
class DecisionLogic {
class DecisionLogic final {
public:
// Static factory function which creates different types of objects depending
// on the |playout_mode|.
@ -120,26 +120,6 @@ class DecisionLogic {
// |buffer_size_packets|.
void FilterBufferLevel(size_t buffer_size_packets, Modes prev_mode);
// Returns the operation that should be done next. |sync_buffer| and |expand|
// are provided for reference. |decoder_frame_length| is the number of samples
// obtained from the last decoded frame. If there is a packet available, it
// should be supplied in |next_packet|; otherwise it should be NULL. The mode
// resulting from the last call to NetEqImpl::GetAudio is supplied in
// |prev_mode|. If there is a DTMF event to play, |play_dtmf| should be set to
// true. The output variable |reset_decoder| will be set to true if a reset is
// required; otherwise it is left unchanged (i.e., it can remain true if it
// was true before the call).
// TODO(henrik.lundin) Fold this method into GetDecision.
Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer,
const Expand& expand,
size_t decoder_frame_length,
const Packet* next_packet,
Modes prev_mode,
bool play_dtmf,
bool* reset_decoder,
size_t generated_noise_samples,
size_t cur_size_samples);
// Returns the operation given that the next available packet is a comfort
// noise payload (RFC 3389 only, not codec-internal).
Operations CngOperation(Modes prev_mode,