blob: cefd8e4e4262ee93f610a19d46b882e101a9eea9 [file] [log] [blame]
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +00001/*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#ifndef MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_FAX_H_
12#define MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_FAX_H_
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000013
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020014#include "modules/audio_coding/neteq/decision_logic.h"
15#include "rtc_base/constructormagic.h"
Mirko Bonadei71207422017-09-15 13:58:09 +020016#include "typedefs.h" // NOLINT(build/include)
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000017
18namespace webrtc {
19
20// Implementation of the DecisionLogic class for playout modes kPlayoutFax and
21// kPlayoutOff.
22class DecisionLogicFax : public DecisionLogic {
23 public:
24 // Constructor.
25 DecisionLogicFax(int fs_hz,
Peter Kastingdce40cf2015-08-24 14:52:23 -070026 size_t output_size_samples,
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000027 NetEqPlayoutMode playout_mode,
28 DecoderDatabase* decoder_database,
29 const PacketBuffer& packet_buffer,
30 DelayManager* delay_manager,
Henrik Lundin47b17dc2016-05-10 10:20:59 +020031 BufferLevelFilter* buffer_level_filter,
32 const TickTimer* tick_timer)
33 : DecisionLogic(fs_hz,
34 output_size_samples,
35 playout_mode,
36 decoder_database,
37 packet_buffer,
38 delay_manager,
39 buffer_level_filter,
40 tick_timer) {}
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000041
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000042 protected:
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000043 Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer,
44 const Expand& expand,
Peter Kastingdce40cf2015-08-24 14:52:23 -070045 size_t decoder_frame_length,
ossu7a377612016-10-18 04:06:13 -070046 const Packet* next_packet,
kjellander@webrtc.org14665ff2015-03-04 12:58:35 +000047 Modes prev_mode,
48 bool play_dtmf,
henrik.lundinb1fb72b2016-05-03 08:18:47 -070049 bool* reset_decoder,
50 size_t generated_noise_samples) override;
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000051
52 private:
henrikg3c089d72015-09-16 05:37:44 -070053 RTC_DISALLOW_COPY_AND_ASSIGN(DecisionLogicFax);
henrik.lundin@webrtc.orgd94659d2013-01-29 12:09:21 +000054};
55
56} // namespace webrtc
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020057#endif // MODULES_AUDIO_CODING_NETEQ_DECISION_LOGIC_FAX_H_