Agora C++ API Reference for All Platforms

packet_i.h
1 // Agora RTC/MEDIA SDK
2 //
3 // Created by Pengfei Han in 2019-06.
4 // Copyright (c) 2019 Agora.io. All rights reserved.
5 //
6 #pragma once
7
8 #include <cstdint>
9 #include <list>
10 #include <memory>
11 #include <string>
12 #include <vector>
13
14 #include "AgoraBase.h"
15 #include "audio_node_stat_i.h"
16
17 namespace agora {
18 namespace rtc {
19
20
21 static const uint8_t kVideoEngineFlagHasIntraRequest = 0x10;
22 static const uint8_t kVideoEngineFlagStdCodec = 0x8;
23 static const uint8_t kVideoEngineFlagNasa = 0x40;
24 static const uint8_t kVideoEngineFlagScalableDelta = 0x80;
25 static const uint8_t kVideoEngineFlagMajorStreamOnly = 0x01;
26
27 static const uint8_t kAgoraHeaderLength = 3;
28 static const uint8_t kAgoraAudioExtendLength = 5;
29
30 enum MEDIA_STREAM_TYPE {
31 MEDIA_STREAM_TYPE_AUDIO = (1 << 0),
32 MEDIA_STREAM_TYPE_VIDEO_LOW = (1 << 1),
33 MEDIA_STREAM_TYPE_VIDEO_HIGH = (1 << 2),
34 MEDIA_STREAM_TYPE_VIDEO_LAYER_0 = MEDIA_STREAM_TYPE_VIDEO_HIGH,
35 MEDIA_STREAM_TYPE_VIDEO_LAYER_1 = (1 << 16),
36 MEDIA_STREAM_TYPE_VIDEO_LAYER_2 = (1 << 17),
37 MEDIA_STREAM_TYPE_VIDEO_LAYER_3 = (1 << 18),
38 MEDIA_STREAM_TYPE_VIDEO_LAYER_4 = (1 << 19),
39 MEDIA_STREAM_TYPE_VIDEO_LAYER_5 = (1 << 20),
40 MEDIA_STREAM_TYPE_VIDEO_LAYER_6 = (1 << 21),
41 MEDIA_STREAM_TYPE_VIDEO = (MEDIA_STREAM_TYPE_VIDEO_LOW | MEDIA_STREAM_TYPE_VIDEO_HIGH | MEDIA_STREAM_TYPE_VIDEO_LAYER_1 | MEDIA_STREAM_TYPE_VIDEO_LAYER_2
42 | MEDIA_STREAM_TYPE_VIDEO_LAYER_3 | MEDIA_STREAM_TYPE_VIDEO_LAYER_4 | MEDIA_STREAM_TYPE_VIDEO_LAYER_5 | MEDIA_STREAM_TYPE_VIDEO_LAYER_6),
43 MEDIA_STREAM_TYPE_MEDIA = MEDIA_STREAM_TYPE_AUDIO | MEDIA_STREAM_TYPE_VIDEO,
44 };
45
46 enum MEDIA_FRAMERATE_LEVEL {
47 MEDIA_FRAMERATE_LEVEL_HIGH = (0b00 << 24),
48 MEDIA_FRAMERATE_LEVEL_MIDDLE = (0b01 << 24),
49 MEDIA_FRAMERATE_LEVEL_LOW = (0b10 << 24),
50 };
51
52 struct SMediaFrame {
53 uid_t uid_;
54 uint8_t flags_;
55 uint16_t seq_;
56 uint16_t ssrc_;
57 uint64_t packetSentTs_;
58 uint64_t sentTs_;
59 uint64_t receiveTs_;
60 std::string payload_;
61 SMediaFrame() : uid_(0), flags_(0), seq_(0), ssrc_(0), sentTs_(0), receiveTs_(0) {}
62 };
63
64 struct SAudioFrame : public SMediaFrame {
65 uint8_t codec_;
66 uint32_t ts_;
67 int8_t vad_;
68 uint8_t internalFlags_;
69 uint16_t audio_fec_level_;
70 bool arq_to_rsfec_flag_;
71 uint16_t cc_type_;
72 // energy is only used for send
73 uint8_t energy_;
74 AudioFrameHandleInfo handle_info_;
75 uint32_t bitrate_profile_kbps;
76 int64_t audio_pts_;
77 std::string metadata_;
78 SAudioFrame() : SMediaFrame(), codec_(0), ts_(0), vad_(0), internalFlags_(0), cc_type_(0), energy_(0), bitrate_profile_kbps(0), audio_pts_(0) {}
79 };
80
81 using SharedSAudioFrame = std::shared_ptr<SAudioFrame>;
82
83 struct SAudioPacket {
84 enum AUDIO_PACKET_TYPE {
85 AUDIO_PACKET_REXFERRED = 0x1,
86 AUDIO_PACKET_FROM_VOS = 0x2,
87 AUDIO_PACKET_FROM_P2P = 0x4,
88 };
89 int8_t vad_;
90 uint8_t codec_;
91 uint8_t internalFlags_;
92 uint16_t seq_;
93 uint16_t ssrc_;
94 uint16_t payloadLength_;
95 uint16_t latestFrameSeq_;
96 bool filterable_;
97 std::list<SharedSAudioFrame> frames_;
98 AudioFrameHandleInfo handle_timing_;
99 std::string metadata_;
100 SAudioPacket()
101 : vad_(0),
102 codec_(0),
103 internalFlags_(0),
104 seq_(0),
105 ssrc_(0),
106 payloadLength_(0),
107 latestFrameSeq_(0),
108 filterable_(true) {}
109 };
110
111 struct rtc_packet_t {
112 enum INTERNAL_FLAG_TYPE {
113 RTC_FLAG_REXFERRED = 0x1,
114 RTC_FLAG_FROM_VOS = 0x2,
115 RTC_FLAG_FROM_P2P = 0x4,
116 RTC_FLAG_FROM_BROADCAST = 0x8,
117 VIDEO_FLAG_TIMESTAMP_SET = 0x10,
118 VIDEO_FLAG_CACHED = 0x20,
119 VIDEO_FLAG_VIDEO3 = 0x40,
120 };
121 uid_t uid;
122 uint32_t seq;
123 uint16_t payload_length; // should be the same as payload.length()
124 uint64_t sent_ts;
125 uint64_t recv_ts;
126 int link_id;
127 uint8_t internal_flags;
128 std::string payload;
129 rtc_packet_t()
130 : uid(0), seq(0), payload_length(0), sent_ts(0), recv_ts(0), link_id(-1), internal_flags(0) {}
131 };
132
133 struct broadcast_packet_t : public rtc_packet_t {
134 bool quit;
135 bool rtcp;
136 bool need_reliable;
137 bool real_quit;
138 bool audience_send;
139 broadcast_packet_t()
140 : quit(false), rtcp(false), need_reliable(false), real_quit(false), audience_send(false) {}
141 };
142
143 struct distribution_property_t {
144 uint32_t estimated_bandwith_of_receiver = 0;
145 uint32_t queueing_time_to_receiver = 0;
146 uint8_t max_sender_output_level = 0;
147 uint32_t actual_sender_bandwidth = 0;
148 uint8_t actual_sender_output_level = 0;
149 };
150
151 struct audio_packet_t : public rtc_packet_t {
152 uint32_t ts;
153 int8_t vad;
154 uint8_t codec;
155 int last_error; // error code set by last filter
156 uint32_t reqMs; // for calculating RTT only
157 uint8_t flags; // flags from SAudioFrame
158 int64_t audio_pts; //audio pts from SAudioFrame extension
159 std::string metadata_;
160 audio_packet_t() : ts(0), vad(0), codec(0), last_error(0), reqMs(0), flags(0), audio_pts(0) {}
161 };
162
163 struct video_packet_t : public rtc_packet_t {
164 enum VIDEO_STREAM_TYPE {
165 VIDEO_STREAM_UNKNOWN = -1,
166 VIDEO_STREAM_HIGH = 0,
167 VIDEO_STREAM_LOW = 1,
168 VIDEO_STREAM_MEDIUM = 2,
169 VIDEO_STREAM_LIVE = 3,
170 VIDEO_STREAM_LAYER_0 = VIDEO_STREAM_HIGH,
171 VIDEO_STREAM_LAYER_1 = 4,
172 VIDEO_STREAM_LAYER_2 = 5,
173 VIDEO_STREAM_LAYER_3 = 6,
174 VIDEO_STREAM_LAYER_4 = 7,
175 VIDEO_STREAM_LAYER_5 = 8,
176 VIDEO_STREAM_LAYER_6 = 9,
177 VIDEO_STREAM_MIN = VIDEO_STREAM_HIGH,
178 VIDEO_STREAM_MAX = VIDEO_STREAM_LAYER_6,
179 };
180
181 enum VIDEO_FLAG_TYPE {
182 // below is for video2 only, not used in video3
183 VIDEO_FLAG_KEY_FRAME = 0x80,
184 VIDEO_FLAG_FEC = 0x40,
185 VIDEO_FLAG_LIVE = 0x20,
186 VIDEO_FLAG_STD_CODEC = 0x8, // also for video3 to differentiate std stream and private stream
187 VIDEO_FLAG_B_FRAME = 0x10,
188 // below is for video3
189 VIDEO_FLAG_HARDWARE_ENCODE = 0x4,
190 };
191
192 enum VIDEO_FRAME_TYPE {
193 KEY_FRAME = 0,
194 DELTA_FRAME = 1,
195 B_FRAME = 2,
196 };
197
198 // TODO(Bob): This should be removed and use public API definitions.
199 enum VIDEO_CODEC_TYPE {
200 VIDEO_CODEC_VP8 = 1, // std VP8
201 VIDEO_CODEC_H264 = 2, // std H264
202 VIDEO_CODEC_EVP = 3, // VP8 with BCM
203 VIDEO_CODEC_E264 = 4, // H264 with BCM
204 };
205
206 enum VIDEO_EXTRA_FLAG_TYPE {
207 // marks if the |req_ms| field of PVideoRexferRes_v4 is set
208 VIDEO_EXTRA_FLAG_TIMESTAMP_SET = 0x1,
209 };
210
211 enum EXTENSION_VERSION {
212 EXTENSION_VERSION_0 = 0,
213 EXTENSION_VERSION_1 = 1,
214 EXTENSION_VERSION_2 = 2,
215 };
216
217 struct Extension {
218 bool has_extension_ = false;
219 uint16_t tag_ = EXTENSION_VERSION_0;
220 std::vector<uint32_t> content_;
221 };
222
223 uint32_t frameSeq;
224 uint8_t frameType;
225 uint8_t streamType;
226 uint16_t packets;
227 uint16_t subseq;
228 uint16_t fecPkgNum;
229 uint8_t codec;
230 uint8_t flags;
231 uint8_t protocolVersion;
232 uint32_t reqMs; // for calculating RTT only
233 uint32_t reserve1;
234 Extension extension;
235 int64_t transport_seq; // for transport-cc
236 int8_t cc_type;
237 uint8_t max_temporal_layers;
238 uint8_t curr_temporal_layer;
239 uint32_t bitrate_profile_kbps;
240
241 video_packet_t()
242 : frameSeq(0),
243 frameType(0),
244 streamType(0),
245 packets(0),
246 subseq(0),
247 fecPkgNum(0),
248 codec(0),
249 flags(0),
250 protocolVersion(0),
251 reqMs(0),
252 reserve1(0),
253 transport_seq(-1),
254 cc_type(0),
255 bitrate_profile_kbps(0) {}
256
257 union video3_flags {
258 struct {
259 uint8_t stream_type : 4;
260 uint8_t frame_type : 4;
261 };
262 uint8_t video_type;
263 };
264
265 void fromVideType(uint8_t f) {
266 video3_flags t;
267 t.video_type = f;
268 streamType = t.stream_type;
269 frameType = t.frame_type;
270 }
271
272 uint8_t toVideoType() const {
273 video3_flags t;
274 t.stream_type = streamType;
275 t.frame_type = frameType;
276 return t.video_type;
277 }
278
279 bool hasReserveBit(uint16_t bit) { return (reserve1 & (1 << bit)) == (1 << bit); }
280 };
281
282 struct control_broadcast_packet_t {
283 rtc::uid_t uid = 0;
284 bool from_vos = false;
285 std::string payload;
286 };
287
288 struct video_custom_ctrl_broadcast_packet_t {
289 rtc::uid_t uid;
290 std::string payload;
291 };
292
293 struct peer_message_t {
294 rtc::uid_t uid;
295 int type;
296 std::string user_id;
297 std::string payload;
298 };
299
300 enum VideoStreamType {
301 MASTER_VIDEO_STREAM = 0,
302 LOW_BITRATE_VIDEO_STREAM = 1,
303 MEDIUM_BITRATE_VIDEO_STREAM = 2,
304 LIVE_VIDEO_STREAM = 3,
305 };
306
307 } // namespace rtc
308 } // namespace agora
agora::rtc::peer_message_t::type
int type
Definition: packet_i.h:295
agora::rtc::VideoStreamType
VideoStreamType
Definition: packet_i.h:300
agora::rtc::audio_packet_t::metadata_
std::string metadata_
Definition: packet_i.h:159
agora::rtc::audio_packet_t::vad
int8_t vad
Definition: packet_i.h:153
agora::rtc::peer_message_t::payload
std::string payload
Definition: packet_i.h:297
agora::rtc::SMediaFrame::flags_
uint8_t flags_
Definition: packet_i.h:54
agora::rtc::video_packet_t::cc_type
int8_t cc_type
Definition: packet_i.h:236
agora::rtc::rtc_packet_t::RTC_FLAG_FROM_VOS
@ RTC_FLAG_FROM_VOS
Definition: packet_i.h:114
agora::rtc::LIVE_VIDEO_STREAM
@ LIVE_VIDEO_STREAM
Definition: packet_i.h:304
agora::rtc::video_packet_t::VIDEO_STREAM_MEDIUM
@ VIDEO_STREAM_MEDIUM
Definition: packet_i.h:168
agora::rtc::SAudioPacket::vad_
int8_t vad_
Definition: packet_i.h:89
agora::rtc::SAudioFrame::SAudioFrame
SAudioFrame()
Definition: packet_i.h:78
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_LAYER_2
@ MEDIA_STREAM_TYPE_VIDEO_LAYER_2
Definition: packet_i.h:36
agora::rtc::rtc_packet_t::RTC_FLAG_FROM_P2P
@ RTC_FLAG_FROM_P2P
Definition: packet_i.h:115
agora::rtc::kVideoEngineFlagMajorStreamOnly
static const uint8_t kVideoEngineFlagMajorStreamOnly
Definition: packet_i.h:25
agora::rtc::SMediaFrame::SMediaFrame
SMediaFrame()
Definition: packet_i.h:61
agora::rtc::audio_packet_t::ts
uint32_t ts
Definition: packet_i.h:152
agora::rtc::SAudioPacket::payloadLength_
uint16_t payloadLength_
Definition: packet_i.h:94
agora::rtc::SAudioPacket::AUDIO_PACKET_REXFERRED
@ AUDIO_PACKET_REXFERRED
Definition: packet_i.h:85
agora::rtc::SAudioFrame::audio_pts_
int64_t audio_pts_
Definition: packet_i.h:76
agora::rtc::SAudioPacket::ssrc_
uint16_t ssrc_
Definition: packet_i.h:93
agora::rtc::video_packet_t::VIDEO_STREAM_LAYER_3
@ VIDEO_STREAM_LAYER_3
Definition: packet_i.h:173
agora::rtc::MEDIA_STREAM_TYPE_MEDIA
@ MEDIA_STREAM_TYPE_MEDIA
Definition: packet_i.h:43
agora::rtc::video_packet_t::B_FRAME
@ B_FRAME
Definition: packet_i.h:195
agora::rtc::video_packet_t::VIDEO_FLAG_LIVE
@ VIDEO_FLAG_LIVE
Definition: packet_i.h:185
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_LAYER_5
@ MEDIA_STREAM_TYPE_VIDEO_LAYER_5
Definition: packet_i.h:39
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_HIGH
@ MEDIA_STREAM_TYPE_VIDEO_HIGH
Definition: packet_i.h:33
agora::rtc::broadcast_packet_t::rtcp
bool rtcp
Definition: packet_i.h:135
agora::rtc::video_packet_t::video3_flags::stream_type
uint8_t stream_type
Definition: packet_i.h:259
agora::rtc::SMediaFrame::payload_
std::string payload_
Definition: packet_i.h:60
agora::rtc::SAudioFrame::codec_
uint8_t codec_
Definition: packet_i.h:65
agora::rtc::SAudioFrame::ts_
uint32_t ts_
Definition: packet_i.h:66
agora::rtc::video_custom_ctrl_broadcast_packet_t::payload
std::string payload
Definition: packet_i.h:290
agora::rtc::video_packet_t::frameSeq
uint32_t frameSeq
Definition: packet_i.h:223
agora::rtc::broadcast_packet_t::audience_send
bool audience_send
Definition: packet_i.h:138
agora::rtc::video_packet_t::fecPkgNum
uint16_t fecPkgNum
Definition: packet_i.h:228
agora::rtc::video_packet_t::streamType
uint8_t streamType
Definition: packet_i.h:225
agora::rtc::rtc_packet_t::payload
std::string payload
Definition: packet_i.h:128
agora::rtc::video_custom_ctrl_broadcast_packet_t::uid
rtc::uid_t uid
Definition: packet_i.h:289
agora::rtc::video_packet_t::video_packet_t
video_packet_t()
Definition: packet_i.h:241
agora::rtc::SAudioFrame::audio_fec_level_
uint16_t audio_fec_level_
Definition: packet_i.h:69
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_LAYER_3
@ MEDIA_STREAM_TYPE_VIDEO_LAYER_3
Definition: packet_i.h:37
agora::rtc::LOW_BITRATE_VIDEO_STREAM
@ LOW_BITRATE_VIDEO_STREAM
Definition: packet_i.h:302
agora::rtc::video_packet_t::max_temporal_layers
uint8_t max_temporal_layers
Definition: packet_i.h:237
agora::rtc::rtc_packet_t::rtc_packet_t
rtc_packet_t()
Definition: packet_i.h:129
agora::rtc::SAudioPacket::AUDIO_PACKET_FROM_P2P
@ AUDIO_PACKET_FROM_P2P
Definition: packet_i.h:87
agora::rtc::video_packet_t::video3_flags::frame_type
uint8_t frame_type
Definition: packet_i.h:260
agora::rtc::video_packet_t::VIDEO_STREAM_MAX
@ VIDEO_STREAM_MAX
Definition: packet_i.h:178
agora::rtc::video_packet_t::VIDEO_STREAM_LAYER_4
@ VIDEO_STREAM_LAYER_4
Definition: packet_i.h:174
agora::rtc::video_packet_t::VIDEO_STREAM_HIGH
@ VIDEO_STREAM_HIGH
Definition: packet_i.h:166
agora::rtc::video_packet_t::VIDEO_STREAM_LOW
@ VIDEO_STREAM_LOW
Definition: packet_i.h:167
agora::rtc::kAgoraHeaderLength
static const uint8_t kAgoraHeaderLength
Definition: packet_i.h:27
agora::rtc::SAudioFrame::arq_to_rsfec_flag_
bool arq_to_rsfec_flag_
Definition: packet_i.h:70
agora::rtc::SMediaFrame::packetSentTs_
uint64_t packetSentTs_
Definition: packet_i.h:57
agora::rtc::video_packet_t::toVideoType
uint8_t toVideoType() const
Definition: packet_i.h:272
agora::rtc::SAudioPacket::internalFlags_
uint8_t internalFlags_
Definition: packet_i.h:91
agora::rtc::SMediaFrame::receiveTs_
uint64_t receiveTs_
Definition: packet_i.h:59
agora::rtc::control_broadcast_packet_t::from_vos
bool from_vos
Definition: packet_i.h:284
agora
Definition: AgoraAtomicOps.h:21
agora::rtc::video_packet_t::EXTENSION_VERSION
EXTENSION_VERSION
Definition: packet_i.h:211
agora::rtc::broadcast_packet_t::real_quit
bool real_quit
Definition: packet_i.h:137
agora::rtc::video_packet_t::reqMs
uint32_t reqMs
Definition: packet_i.h:232
agora::rtc::rtc_packet_t::sent_ts
uint64_t sent_ts
Definition: packet_i.h:124
agora::rtc::distribution_property_t
Definition: packet_i.h:143
agora::rtc::video_packet_t::Extension
Definition: packet_i.h:217
agora::rtc::MEDIA_STREAM_TYPE_AUDIO
@ MEDIA_STREAM_TYPE_AUDIO
Definition: packet_i.h:31
agora::rtc::video_packet_t::VIDEO_EXTRA_FLAG_TIMESTAMP_SET
@ VIDEO_EXTRA_FLAG_TIMESTAMP_SET
Definition: packet_i.h:208
agora::rtc::rtc_packet_t::recv_ts
uint64_t recv_ts
Definition: packet_i.h:125
agora::rtc::SAudioFrame::internalFlags_
uint8_t internalFlags_
Definition: packet_i.h:68
agora::rtc::SAudioFrame::bitrate_profile_kbps
uint32_t bitrate_profile_kbps
Definition: packet_i.h:75
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_LAYER_0
@ MEDIA_STREAM_TYPE_VIDEO_LAYER_0
Definition: packet_i.h:34
agora::rtc::rtc_packet_t::RTC_FLAG_FROM_BROADCAST
@ RTC_FLAG_FROM_BROADCAST
Definition: packet_i.h:116
agora::rtc::video_packet_t::EXTENSION_VERSION_1
@ EXTENSION_VERSION_1
Definition: packet_i.h:213
agora::rtc::audio_packet_t::audio_packet_t
audio_packet_t()
Definition: packet_i.h:160
agora::rtc::video_packet_t::packets
uint16_t packets
Definition: packet_i.h:226
agora::rtc::SAudioFrame::metadata_
std::string metadata_
Definition: packet_i.h:77
agora::rtc::peer_message_t::user_id
std::string user_id
Definition: packet_i.h:296
agora::rtc::SAudioPacket::AUDIO_PACKET_FROM_VOS
@ AUDIO_PACKET_FROM_VOS
Definition: packet_i.h:86
agora::rtc::video_packet_t::VIDEO_STREAM_LAYER_0
@ VIDEO_STREAM_LAYER_0
Definition: packet_i.h:170
agora::rtc::AudioFrameHandleInfo
Definition: audio_node_stat_i.h:32
agora::rtc::video_packet_t::Extension::content_
std::vector< uint32_t > content_
Definition: packet_i.h:220
agora::rtc::MEDIA_FRAMERATE_LEVEL_HIGH
@ MEDIA_FRAMERATE_LEVEL_HIGH
Definition: packet_i.h:47
agora::rtc::video_packet_t::Extension::has_extension_
bool has_extension_
Definition: packet_i.h:218
agora::rtc::video_packet_t::curr_temporal_layer
uint8_t curr_temporal_layer
Definition: packet_i.h:238
agora::rtc::kVideoEngineFlagStdCodec
static const uint8_t kVideoEngineFlagStdCodec
Definition: packet_i.h:22
agora::rtc::video_packet_t::KEY_FRAME
@ KEY_FRAME
Definition: packet_i.h:193
agora::rtc::video_packet_t::EXTENSION_VERSION_2
@ EXTENSION_VERSION_2
Definition: packet_i.h:214
agora::rtc::SMediaFrame::uid_
uid_t uid_
Definition: packet_i.h:53
agora::rtc::kAgoraAudioExtendLength
static const uint8_t kAgoraAudioExtendLength
Definition: packet_i.h:28
agora::rtc::SAudioPacket::AUDIO_PACKET_TYPE
AUDIO_PACKET_TYPE
Definition: packet_i.h:84
agora::rtc::SAudioFrame::cc_type_
uint16_t cc_type_
Definition: packet_i.h:71
agora::rtc::video_packet_t::VIDEO_CODEC_EVP
@ VIDEO_CODEC_EVP
Definition: packet_i.h:202
agora::rtc::SAudioPacket::metadata_
std::string metadata_
Definition: packet_i.h:99
agora::rtc::distribution_property_t::queueing_time_to_receiver
uint32_t queueing_time_to_receiver
Definition: packet_i.h:145
agora::rtc::distribution_property_t::max_sender_output_level
uint8_t max_sender_output_level
Definition: packet_i.h:146
agora::rtc::SAudioFrame::handle_info_
AudioFrameHandleInfo handle_info_
Definition: packet_i.h:74
agora::rtc::video_packet_t::VIDEO_CODEC_E264
@ VIDEO_CODEC_E264
Definition: packet_i.h:203
agora::rtc::control_broadcast_packet_t::payload
std::string payload
Definition: packet_i.h:285
agora::rtc::video_packet_t
Definition: packet_i.h:163
agora::rtc::video_packet_t::EXTENSION_VERSION_0
@ EXTENSION_VERSION_0
Definition: packet_i.h:212
agora::rtc::broadcast_packet_t::need_reliable
bool need_reliable
Definition: packet_i.h:136
agora::rtc::rtc_packet_t::internal_flags
uint8_t internal_flags
Definition: packet_i.h:127
agora::rtc::MEDIUM_BITRATE_VIDEO_STREAM
@ MEDIUM_BITRATE_VIDEO_STREAM
Definition: packet_i.h:303
agora::rtc::video_packet_t::protocolVersion
uint8_t protocolVersion
Definition: packet_i.h:231
agora::rtc::SMediaFrame
Definition: packet_i.h:52
agora::rtc::distribution_property_t::actual_sender_output_level
uint8_t actual_sender_output_level
Definition: packet_i.h:148
agora::rtc::video_packet_t::VIDEO_STREAM_TYPE
VIDEO_STREAM_TYPE
Definition: packet_i.h:164
agora::rtc::MEDIA_FRAMERATE_LEVEL_LOW
@ MEDIA_FRAMERATE_LEVEL_LOW
Definition: packet_i.h:49
agora::rtc::audio_packet_t::flags
uint8_t flags
Definition: packet_i.h:157
agora::rtc::SAudioFrame
Definition: packet_i.h:64
agora::rtc::video_packet_t::VIDEO_STREAM_MIN
@ VIDEO_STREAM_MIN
Definition: packet_i.h:177
agora::rtc::broadcast_packet_t::quit
bool quit
Definition: packet_i.h:134
agora::rtc::audio_packet_t::codec
uint8_t codec
Definition: packet_i.h:154
agora::rtc::video_packet_t::VIDEO_STREAM_UNKNOWN
@ VIDEO_STREAM_UNKNOWN
Definition: packet_i.h:165
agora::rtc::MEDIA_STREAM_TYPE_VIDEO
@ MEDIA_STREAM_TYPE_VIDEO
Definition: packet_i.h:41
agora::rtc::video_packet_t::VIDEO_CODEC_H264
@ VIDEO_CODEC_H264
Definition: packet_i.h:201
agora::rtc::video_packet_t::video3_flags::video_type
uint8_t video_type
Definition: packet_i.h:262
agora::rtc::broadcast_packet_t
Definition: packet_i.h:133
agora::rtc::video_packet_t::VIDEO_STREAM_LAYER_2
@ VIDEO_STREAM_LAYER_2
Definition: packet_i.h:172
agora::rtc::rtc_packet_t::payload_length
uint16_t payload_length
Definition: packet_i.h:123
agora::rtc::rtc_packet_t::VIDEO_FLAG_TIMESTAMP_SET
@ VIDEO_FLAG_TIMESTAMP_SET
Definition: packet_i.h:117
agora::rtc::SAudioPacket::codec_
uint8_t codec_
Definition: packet_i.h:90
agora::rtc::SAudioPacket::handle_timing_
AudioFrameHandleInfo handle_timing_
Definition: packet_i.h:98
agora::rtc::audio_packet_t
Definition: packet_i.h:151
agora::rtc::video_packet_t::hasReserveBit
bool hasReserveBit(uint16_t bit)
Definition: packet_i.h:279
agora::rtc::kVideoEngineFlagHasIntraRequest
static const uint8_t kVideoEngineFlagHasIntraRequest
Definition: packet_i.h:21
agora::rtc::video_packet_t::fromVideType
void fromVideType(uint8_t f)
Definition: packet_i.h:265
agora::rtc::control_broadcast_packet_t
Definition: packet_i.h:282
agora::rtc::SAudioPacket::latestFrameSeq_
uint16_t latestFrameSeq_
Definition: packet_i.h:95
agora::rtc::rtc_packet_t::link_id
int link_id
Definition: packet_i.h:126
agora::rtc::video_packet_t::VIDEO_FLAG_TYPE
VIDEO_FLAG_TYPE
Definition: packet_i.h:181
agora::rtc::distribution_property_t::actual_sender_bandwidth
uint32_t actual_sender_bandwidth
Definition: packet_i.h:147
agora::rtc::video_packet_t::VIDEO_FLAG_HARDWARE_ENCODE
@ VIDEO_FLAG_HARDWARE_ENCODE
Definition: packet_i.h:189
agora::rtc::SMediaFrame::ssrc_
uint16_t ssrc_
Definition: packet_i.h:56
agora::rtc::video_packet_t::VIDEO_FLAG_KEY_FRAME
@ VIDEO_FLAG_KEY_FRAME
Definition: packet_i.h:183
agora::rtc::broadcast_packet_t::broadcast_packet_t
broadcast_packet_t()
Definition: packet_i.h:139
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_LOW
@ MEDIA_STREAM_TYPE_VIDEO_LOW
Definition: packet_i.h:32
agora::rtc::SAudioPacket::SAudioPacket
SAudioPacket()
Definition: packet_i.h:100
agora::rtc::SMediaFrame::sentTs_
uint64_t sentTs_
Definition: packet_i.h:58
agora::rtc::audio_packet_t::reqMs
uint32_t reqMs
Definition: packet_i.h:156
agora::rtc::video_packet_t::VIDEO_FLAG_FEC
@ VIDEO_FLAG_FEC
Definition: packet_i.h:184
agora::rtc::SAudioPacket::frames_
std::list< SharedSAudioFrame > frames_
Definition: packet_i.h:97
agora::rtc::rtc_packet_t::uid
uid_t uid
Definition: packet_i.h:121
agora::rtc::SAudioFrame::vad_
int8_t vad_
Definition: packet_i.h:67
agora::rtc::rtc_packet_t::seq
uint32_t seq
Definition: packet_i.h:122
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_LAYER_1
@ MEDIA_STREAM_TYPE_VIDEO_LAYER_1
Definition: packet_i.h:35
agora::rtc::MEDIA_STREAM_TYPE
MEDIA_STREAM_TYPE
Definition: packet_i.h:30
agora::rtc::video_packet_t::frameType
uint8_t frameType
Definition: packet_i.h:224
agora::rtc::audio_packet_t::last_error
int last_error
Definition: packet_i.h:155
agora::rtc::video_packet_t::extension
Extension extension
Definition: packet_i.h:234
agora::rtc::SAudioPacket::seq_
uint16_t seq_
Definition: packet_i.h:92
agora::rtc::video_custom_ctrl_broadcast_packet_t
Definition: packet_i.h:288
agora::rtc::video_packet_t::VIDEO_CODEC_TYPE
VIDEO_CODEC_TYPE
Definition: packet_i.h:199
agora::rtc::rtc_packet_t
Definition: packet_i.h:111
agora::rtc::SAudioPacket
Definition: packet_i.h:83
agora::rtc::video_packet_t::VIDEO_STREAM_LAYER_1
@ VIDEO_STREAM_LAYER_1
Definition: packet_i.h:171
agora::rtc::video_packet_t::VIDEO_STREAM_LAYER_6
@ VIDEO_STREAM_LAYER_6
Definition: packet_i.h:176
agora::rtc::video_packet_t::transport_seq
int64_t transport_seq
Definition: packet_i.h:235
agora::rtc::kVideoEngineFlagNasa
static const uint8_t kVideoEngineFlagNasa
Definition: packet_i.h:23
agora::rtc::SAudioPacket::filterable_
bool filterable_
Definition: packet_i.h:96
agora::rtc::video_packet_t::bitrate_profile_kbps
uint32_t bitrate_profile_kbps
Definition: packet_i.h:239
agora::rtc::video_packet_t::Extension::tag_
uint16_t tag_
Definition: packet_i.h:219
agora::rtc::video_packet_t::subseq
uint16_t subseq
Definition: packet_i.h:227
agora::rtc::kVideoEngineFlagScalableDelta
static const uint8_t kVideoEngineFlagScalableDelta
Definition: packet_i.h:24
agora::rtc::peer_message_t
Definition: packet_i.h:293
agora::rtc::video_packet_t::video3_flags
Definition: packet_i.h:257
agora::rtc::video_packet_t::VIDEO_FLAG_B_FRAME
@ VIDEO_FLAG_B_FRAME
Definition: packet_i.h:187
agora::rtc::SAudioFrame::energy_
uint8_t energy_
Definition: packet_i.h:73
agora::rtc::video_packet_t::VIDEO_CODEC_VP8
@ VIDEO_CODEC_VP8
Definition: packet_i.h:200
agora::rtc::uid_t
unsigned int uid_t
Definition: AgoraMediaBase.h:28
agora::rtc::distribution_property_t::estimated_bandwith_of_receiver
uint32_t estimated_bandwith_of_receiver
Definition: packet_i.h:144
agora::rtc::video_packet_t::codec
uint8_t codec
Definition: packet_i.h:229
agora::rtc::peer_message_t::uid
rtc::uid_t uid
Definition: packet_i.h:294
agora::rtc::MASTER_VIDEO_STREAM
@ MASTER_VIDEO_STREAM
Definition: packet_i.h:301
agora::rtc::control_broadcast_packet_t::uid
rtc::uid_t uid
Definition: packet_i.h:283
agora::rtc::audio_packet_t::audio_pts
int64_t audio_pts
Definition: packet_i.h:158
agora::rtc::rtc_packet_t::RTC_FLAG_REXFERRED
@ RTC_FLAG_REXFERRED
Definition: packet_i.h:113
agora::rtc::video_packet_t::VIDEO_STREAM_LAYER_5
@ VIDEO_STREAM_LAYER_5
Definition: packet_i.h:175
agora::rtc::video_packet_t::VIDEO_STREAM_LIVE
@ VIDEO_STREAM_LIVE
Definition: packet_i.h:169
agora::rtc::video_packet_t::DELTA_FRAME
@ DELTA_FRAME
Definition: packet_i.h:194
agora::rtc::rtc_packet_t::VIDEO_FLAG_CACHED
@ VIDEO_FLAG_CACHED
Definition: packet_i.h:118
agora::rtc::video_packet_t::flags
uint8_t flags
Definition: packet_i.h:230
agora::rtc::video_packet_t::VIDEO_FRAME_TYPE
VIDEO_FRAME_TYPE
Definition: packet_i.h:192
agora::rtc::SMediaFrame::seq_
uint16_t seq_
Definition: packet_i.h:55
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_LAYER_6
@ MEDIA_STREAM_TYPE_VIDEO_LAYER_6
Definition: packet_i.h:40
agora::rtc::video_packet_t::VIDEO_FLAG_STD_CODEC
@ VIDEO_FLAG_STD_CODEC
Definition: packet_i.h:186
agora::rtc::video_packet_t::VIDEO_EXTRA_FLAG_TYPE
VIDEO_EXTRA_FLAG_TYPE
Definition: packet_i.h:206
agora::rtc::video_packet_t::reserve1
uint32_t reserve1
Definition: packet_i.h:233
rtc
Definition: video_node_i.h:28
agora::rtc::SharedSAudioFrame
std::shared_ptr< SAudioFrame > SharedSAudioFrame
Definition: packet_i.h:81
agora::rtc::MEDIA_STREAM_TYPE_VIDEO_LAYER_4
@ MEDIA_STREAM_TYPE_VIDEO_LAYER_4
Definition: packet_i.h:38
agora::rtc::MEDIA_FRAMERATE_LEVEL
MEDIA_FRAMERATE_LEVEL
Definition: packet_i.h:46
agora::rtc::MEDIA_FRAMERATE_LEVEL_MIDDLE
@ MEDIA_FRAMERATE_LEVEL_MIDDLE
Definition: packet_i.h:48
agora::rtc::rtc_packet_t::VIDEO_FLAG_VIDEO3
@ VIDEO_FLAG_VIDEO3
Definition: packet_i.h:119
agora::rtc::rtc_packet_t::INTERNAL_FLAG_TYPE
INTERNAL_FLAG_TYPE
Definition: packet_i.h:112