LeviLamina
Loading...
Searching...
No Matches
NetEq.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7namespace webrtc { class AudioFrame; }
8namespace webrtc { struct NetEqLifetimeStatistics; }
9namespace webrtc { struct NetEqNetworkStatistics; }
10namespace webrtc { struct NetEqOperationsAndState; }
11namespace webrtc { struct RTPHeader; }
12namespace webrtc { struct SdpAudioFormat; }
13// clang-format on
14
15namespace webrtc {
16
17class NetEq {
18public:
19 // NetEq inner types declare
20 // clang-format off
21 struct Config;
22 struct DecoderFormat;
23 // clang-format on
24
25 // NetEq inner types define
26 enum class Mode : int {
27 KNormal = 0,
28 KExpand = 1,
29 KMerge = 2,
30 KAccelerateSuccess = 3,
31 KAccelerateLowEnergy = 4,
32 KAccelerateFail = 5,
33 KPreemptiveExpandSuccess = 6,
34 KPreemptiveExpandLowEnergy = 7,
35 KPreemptiveExpandFail = 8,
36 KRfc3389Cng = 9,
37 KCodecInternalCng = 10,
38 KCodecPlc = 11,
39 KDtmf = 12,
40 KError = 13,
41 KUndefined = 14,
42 };
43
44 enum class Operation : int {
45 KNormal = 0,
46 KMerge = 1,
47 KExpand = 2,
48 KAccelerate = 3,
49 KFastAccelerate = 4,
50 KPreemptiveExpand = 5,
51 KRfc3389Cng = 6,
52 KRfc3389CngNoPacket = 7,
53 KCodecInternalCng = 8,
54 KDtmf = 9,
55 KUndefined = 10,
56 };
57
58 enum class ReturnCodes : int {
59 KOK = 0,
60 KFail = -1,
61 };
62
63 struct Config {
64 public:
65 // member variables
66 // NOLINTBEGIN
76 // NOLINTEND
77
78 public:
79 // prevent constructor by default
80 Config& operator=(Config const&);
81 Config(Config const&);
82 Config();
83 };
84
85 struct DecoderFormat {
86 public:
87 // member variables
88 // NOLINTBEGIN
92 // NOLINTEND
93
94 public:
95 // prevent constructor by default
96 DecoderFormat& operator=(DecoderFormat const&);
97 DecoderFormat(DecoderFormat const&);
98 DecoderFormat();
99 };
100
101public:
102 // virtual functions
103 // NOLINTBEGIN
104 virtual ~NetEq() = default;
105
106 virtual int InsertPacket(::webrtc::RTPHeader const&, ::rtc::ArrayView<uchar const>) = 0;
107
108 virtual void InsertEmptyPacket(::webrtc::RTPHeader const&) = 0;
109
110 virtual int GetAudio(::webrtc::AudioFrame*, bool*, int*, ::std::optional<::webrtc::NetEq::Operation>) = 0;
111
112 virtual void SetCodecs(::std::map<int, ::webrtc::SdpAudioFormat> const&) = 0;
113
114 virtual bool RegisterPayloadType(int, ::webrtc::SdpAudioFormat const&) = 0;
115
116 virtual int RemovePayloadType(uchar) = 0;
117
118 virtual void RemoveAllPayloadTypes() = 0;
119
120 virtual bool SetMinimumDelay(int) = 0;
121
122 virtual bool SetMaximumDelay(int) = 0;
123
124 virtual bool SetBaseMinimumDelayMs(int) = 0;
125
126 virtual int GetBaseMinimumDelayMs() const = 0;
127
128 virtual int TargetDelayMs() const = 0;
129
130 virtual int FilteredCurrentDelayMs() const = 0;
131
132 virtual int NetworkStatistics(::webrtc::NetEqNetworkStatistics*) = 0;
133
134 virtual ::webrtc::NetEqNetworkStatistics CurrentNetworkStatistics() const = 0;
135
136 virtual ::webrtc::NetEqLifetimeStatistics GetLifetimeStatistics() const = 0;
137
138 virtual ::webrtc::NetEqOperationsAndState GetOperationsAndState() const = 0;
139
140 virtual ::std::optional<uint> GetPlayoutTimestamp() const = 0;
141
142 virtual int last_output_sample_rate_hz() const = 0;
143
144 virtual ::std::optional<::webrtc::NetEq::DecoderFormat> GetDecoderFormat(int) const = 0;
145
146 virtual void FlushBuffers() = 0;
147
148 virtual void EnableNack(uint64) = 0;
149
150 virtual void DisableNack() = 0;
151
152 virtual ::std::vector<ushort> GetNackList(int64) const = 0;
153
154 virtual int SyncBufferSizeMs() const = 0;
155 // NOLINTEND
156
157public:
158 // virtual function thunks
159 // NOLINTBEGIN
160
161 // NOLINTEND
162};
163
164} // namespace webrtc
Definition _HeaderOutputPredefine.h:311
Definition AudioFrame.h:7
Definition NetEq.h:17
Definition Alias.h:14
Definition NetEqLifetimeStatistics.h:7
Definition NetEqNetworkStatistics.h:7
Definition NetEqOperationsAndState.h:7
Definition NetEq.h:63
Definition NetEq.h:85
Definition RTPHeader.h:7
Definition SdpAudioFormat.h:7