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