Agora C++ API Reference for All Platforms
|
14 #include "AgoraBase.h"
446 #define VIDEO_ENGINE_FLAG_SCALABLE_DELTA 0x00000080
447 #define VIDEO_ENGINE_FLAG_NASA 0x00000040
448 #define VIDEO_ENGINE_FLAG_HAS_PISE 0x00000020
449 #define VIDEO_ENGINE_FLAG_HAS_INTRA_REQUEST 0x00000010
450 #define VIDEO_ENGINE_FLAG_STD_CODEC 0x00000008
451 #define VIDEO_ENGINE_FLAG_HARDWARE_ENCODE 0x00000004
452 #define VIDEO_ENGINE_FLAG_NEW_AVSYNC_TIMESTAMP 0x00000002
453 #define VIDEO_ENGINE_FLAG_MULTI_STREAM 0x00000001
513 virtual int sendVideoRtcpPacket(
unsigned int uid,
const void* packet,
unsigned short packetLen,
bool isToVos) = 0;
523 virtual void onVideoProfile(
unsigned int width,
unsigned int height,
unsigned int fps,
unsigned int bitrate) = 0;
551 virtual int onSendSEI(
char **info,
int *len,
long long timeStampMs,
int streamType,
bool isDualStream) = 0;
552 virtual int onReceiveSEI(
char *info,
int len,
unsigned int uid,
long long timeStampMs) = 0;
554 uint32_t max_kbps, uint32_t min_kbps) = 0;
virtual int sendVideoRtcpFeedbackPacket(const VideoFeedbackPacketType type, unsigned int toUid, const void *packet, int packetSize)=0
virtual int onSendSEI(char **info, int *len, long long timeStampMs, int streamType, bool isDualStream)=0
int sentBytes
Definition: packet_i.h:268
VideoFrameType frame_type
Definition: packet_i.h:487
VideoStreamType
Definition: packet_i.h:251
virtual void onBandWidthLevelChanged(int level)=0
int sentPkgNumber
Definition: packet_i.h:271
int duration
Definition: packet_i.h:387
int8_t vad
Definition: packet_i.h:117
@ VIDEO_FEEDBACK_INTRA_REQUEST
Definition: packet_i.h:469
@ DELTA_FRAME
Definition: packet_i.h:457
int delay
Definition: packet_i.h:374
int8_t cc_type
Definition: packet_i.h:191
@ RTC_FLAG_FROM_VOS
Definition: packet_i.h:86
@ LIVE_VIDEO_STREAM
Definition: packet_i.h:255
uint16_t frame_pkg_num
Definition: packet_i.h:482
virtual void onRemoteFirstFrameDecoded(unsigned int uid, int width, int height)=0
uint64_t render_buffer_size
Definition: packet_i.h:321
@ VIDEO_STREAM_MEDIUM
Definition: packet_i.h:130
int8_t vad_
Definition: packet_i.h:65
int sentLoss
Definition: packet_i.h:295
SAudioFrame()
Definition: packet_i.h:54
int captureWidth
Definition: packet_i.h:302
@ RTC_FLAG_FROM_P2P
Definition: packet_i.h:87
VideoFeedbackPacketType
Definition: packet_i.h:468
static const uint8_t kVideoEngineFlagMajorStreamOnly
Definition: packet_i.h:24
@ VIDEO_CODEC_H264
Definition: packet_i.h:464
unsigned int totalEncodedFrames
Definition: packet_i.h:308
unsigned int prevFrameNumber
Definition: packet_i.h:267
int captureType
Definition: packet_i.h:319
int fecLevel
Definition: packet_i.h:313
uint32_t ts
Definition: packet_i.h:116
VideoCodecType
Definition: packet_i.h:462
@ VIDEO_FEEDBACK_DISABLE_INTRA_FEC
Definition: packet_i.h:470
int encodeFailFrames
Definition: packet_i.h:309
uint16_t payloadLength_
Definition: packet_i.h:70
Definition: packet_i.h:478
@ AUDIO_PACKET_REXFERRED
Definition: packet_i.h:61
virtual void onVideoStat(const LocalVideoStat &localStat, RemoteVideoStat *remoteStat, int remoteCount)=0
@ VIDEO_FEEDBACK_AUT
Definition: packet_i.h:475
@ VIDEO_CODEC_E264
Definition: packet_i.h:466
unsigned int maxEncodeTimeMs
Definition: packet_i.h:301
int freezeTimeMs300
Definition: packet_i.h:397
uint16_t ssrc_
Definition: packet_i.h:69
uint16_t rtt
Definition: packet_i.h:499
uint16_t pkg_seq_in_frame
Definition: packet_i.h:483
@ B_FRAME
Definition: packet_i.h:150
virtual void onCameraExposureAreaChanged(int x, int y, int width, int height)=0
@ VIDEO_FLAG_LIVE
Definition: packet_i.h:140
unsigned int freezeCnt500
Definition: packet_i.h:395
int height
Definition: packet_i.h:379
@ MEDIA_STREAM_TYPE_VIDEO_HIGH
Definition: packet_i.h:32
std::string user_id
Definition: packet_i.h:247
bool rtcp
Definition: packet_i.h:108
uint8_t stream_type
Definition: packet_i.h:210
uint8_t codec_
Definition: packet_i.h:49
unsigned int freezeCnt
Definition: packet_i.h:393
int receivedBytes
Definition: packet_i.h:376
int height
Definition: packet_i.h:266
uint32_t ts_
Definition: packet_i.h:50
std::string payload
Definition: packet_i.h:241
uint32_t frameSeq
Definition: packet_i.h:178
@ SCALABLE_DELTA_FRAME
Definition: packet_i.h:460
int uid
Definition: packet_i.h:373
int uplinkFreezeCount
Definition: packet_i.h:316
unsigned int frame_num
Definition: packet_i.h:481
int decodeFailedFrames
Definition: packet_i.h:381
int renderType
Definition: packet_i.h:401
int sentFrames
Definition: packet_i.h:269
unsigned char fec_num
Definition: packet_i.h:484
uint16_t lost_ratio
Definition: packet_i.h:500
uint8_t streamType
Definition: packet_i.h:180
uint16_t queueing_time
Definition: packet_i.h:504
std::string payload
Definition: packet_i.h:100
rtc::uid_t uid
Definition: packet_i.h:240
virtual void onVideoFrameFrozen(unsigned int uid, bool frozen)=0
virtual int onReceiveSEI(char *info, int len, unsigned int uid, long long timeStampMs)=0
uint8_t expected_stream_type
Definition: packet_i.h:496
uint16_t mtu
Definition: packet_i.h:507
Definition: packet_i.h:493
video_packet_t()
Definition: packet_i.h:193
@ VIDEO_FEEDBACK_REQUEST_MULTISTREAM
Definition: packet_i.h:474
unsigned int maxFrameNumber
Definition: packet_i.h:392
@ LOW_BITRATE_VIDEO_STREAM
Definition: packet_i.h:253
virtual void onVideoSizeChanged(unsigned int uid, int newWidth, int newHeight, int newRotation)
Definition: packet_i.h:539
rtc_packet_t()
Definition: packet_i.h:101
@ AUDIO_PACKET_FROM_P2P
Definition: packet_i.h:63
Definition: packet_i.h:289
rtc::uid_t uid
Definition: packet_i.h:245
int captureHeight
Definition: packet_i.h:303
uint8_t frame_type
Definition: packet_i.h:211
@ VIDEO_STREAM_MAX
Definition: packet_i.h:133
@ VIDEO_STREAM_HIGH
Definition: packet_i.h:128
@ VIDEO_STREAM_LOW
Definition: packet_i.h:129
uint16_t total_sent
Definition: packet_i.h:503
static const uint8_t kAgoraHeaderLength
Definition: packet_i.h:26
uint8_t toVideoType() const
Definition: packet_i.h:223
int sentTargetFrameRate
Definition: packet_i.h:297
uint8_t internalFlags_
Definition: packet_i.h:67
Definition: AgoraAtomicOps.h:21
unsigned int freezeCnt300
Definition: packet_i.h:394
EXTENSION_VERSION
Definition: packet_i.h:166
bool real_quit
Definition: packet_i.h:110
uint32_t reqMs
Definition: packet_i.h:187
int lossAfterFec
Definition: packet_i.h:380
uint64_t sent_ts
Definition: packet_i.h:96
Definition: packet_i.h:172
unsigned int maxRenderInterval
Definition: packet_i.h:389
@ MEDIA_STREAM_TYPE_AUDIO
Definition: packet_i.h:30
virtual int sendVideoRtcpPacket(unsigned int uid, const void *packet, unsigned short packetLen, bool isToVos)=0
virtual void onRemoteFirstFrameDrawed(int viewIndex, unsigned int uid, int width, int height)=0
int freezeTimeMs
Definition: packet_i.h:396
unsigned int maxFrameOutInterval
Definition: packet_i.h:315
@ VIDEO_EXTRA_FLAG_TIMESTAMP_SET
Definition: packet_i.h:163
uint64_t recv_ts
Definition: packet_i.h:97
uint8_t internalFlags_
Definition: packet_i.h:52
int renderedFrames
Definition: packet_i.h:375
@ RTC_FLAG_FROM_BROADCAST
Definition: packet_i.h:88
rtc::uid_t uid
Definition: packet_i.h:234
@ EXTENSION_VERSION_1
Definition: packet_i.h:168
audio_packet_t()
Definition: packet_i.h:122
uint16_t packets
Definition: packet_i.h:181
virtual int sendVideoPacket(const PacketInfo &info)=0
int sentTargetBitRate
Definition: packet_i.h:296
int width
Definition: packet_i.h:378
int renderType
Definition: packet_i.h:320
uint8_t fecPkgNum
Definition: packet_i.h:183
int decoderInFrames
Definition: packet_i.h:400
void reset()
Definition: packet_i.h:273
int encodedFrames
Definition: packet_i.h:306
@ AUDIO_PACKET_FROM_VOS
Definition: packet_i.h:62
virtual void onLocalFirstFrameDrawed(int width, int height)=0
virtual void onBWELevel(int level)=0
std::vector< uint32_t > content_
Definition: packet_i.h:175
int decodeBgDroppedFrames
Definition: packet_i.h:404
bool has_extension_
Definition: packet_i.h:173
int cameraOpenStatus
Definition: packet_i.h:318
static const uint8_t kVideoEngineFlagStdCodec
Definition: packet_i.h:21
@ KEY_FRAME
Definition: packet_i.h:148
@ EXTENSION_VERSION_2
Definition: packet_i.h:169
static const uint8_t kAgoraAudioExtendLength
Definition: packet_i.h:27
unsigned short packetLen
Definition: packet_i.h:480
AUDIO_PACKET_TYPE
Definition: packet_i.h:60
Definition: packet_i.h:264
@ VIDEO_CODEC_EVP
Definition: packet_i.h:157
virtual int onEncodeVideoSEI(char **info, int *len)=0
unsigned int lastRenderMs
Definition: packet_i.h:390
@ VIDEO_CODEC_E264
Definition: packet_i.h:158
Definition: packet_i.h:125
@ EXTENSION_VERSION_0
Definition: packet_i.h:167
bool need_reliable
Definition: packet_i.h:109
uint8_t internal_flags
Definition: packet_i.h:99
Definition: packet_i.h:233
@ MEDIUM_BITRATE_VIDEO_STREAM
Definition: packet_i.h:254
uint8_t protocolVersion
Definition: packet_i.h:186
virtual void onVideoRexferStatus(bool status, int target_bitrate)=0
VIDEO_STREAM_TYPE
Definition: packet_i.h:126
uint8_t flags
Definition: packet_i.h:121
virtual void onCameraFocusAreaChanged(int x, int y, int width, int height)=0
bool muted
Definition: packet_i.h:402
virtual ~rtc_packet_t()
Definition: packet_i.h:103
const void * packet
Definition: packet_i.h:479
Definition: packet_i.h:48
int renderedFrames
Definition: packet_i.h:311
@ VIDEO_STREAM_MIN
Definition: packet_i.h:132
@ VIDEO_FEEDBACK_BANDWIDTH_ESTIMATION
Definition: packet_i.h:473
bool quit
Definition: packet_i.h:107
void reset()
Definition: packet_i.h:407
int sentBitrateExcludeFec
Definition: packet_i.h:298
int captureFrames
Definition: packet_i.h:304
uint16_t bandwidth
Definition: packet_i.h:494
unsigned char fec_method
Definition: packet_i.h:485
uint8_t codec
Definition: packet_i.h:118
int freezeTimeMs500
Definition: packet_i.h:398
@ VIDEO_STREAM_UNKNOWN
Definition: packet_i.h:127
@ MEDIA_STREAM_TYPE_VIDEO
Definition: packet_i.h:33
int decodedFrames
Definition: packet_i.h:384
@ VIDEO_CODEC_H264
Definition: packet_i.h:156
uint8_t video_type
Definition: packet_i.h:213
Definition: packet_i.h:106
uint16_t payload_length
Definition: packet_i.h:95
@ VIDEO_FLAG_TIMESTAMP_SET
Definition: packet_i.h:89
uint8_t codec_
Definition: packet_i.h:66
uint16_t active_uid_counts
Definition: packet_i.h:505
int width
Definition: packet_i.h:265
Definition: packet_i.h:115
int encoderRecvFrames
Definition: packet_i.h:305
int decodeTimeMs
Definition: packet_i.h:386
bool hasReserveBit(uint16_t bit)
Definition: packet_i.h:230
@ KEY_FRAME
Definition: packet_i.h:456
unsigned int encodeTimeMs
Definition: packet_i.h:299
int codec_type
Definition: packet_i.h:486
int sentQP
Definition: packet_i.h:270
static const uint8_t kVideoEngineFlagHasIntraRequest
Definition: packet_i.h:20
unsigned int bitFieldStates
Definition: packet_i.h:337
bool isHardwareDecoding
Definition: packet_i.h:399
void fromVideType(uint8_t f)
Definition: packet_i.h:216
bool from_vos
Definition: packet_i.h:235
int beautyCostTime
Definition: packet_i.h:322
uint64_t render_buffer_size
Definition: packet_i.h:403
uint16_t latestFrameSeq_
Definition: packet_i.h:71
uint8_t recv_stream_type
Definition: packet_i.h:495
int link_id
Definition: packet_i.h:98
VIDEO_FLAG_TYPE
Definition: packet_i.h:136
int encodedKeyFrames
Definition: packet_i.h:307
virtual void onVideoProfile(unsigned int width, unsigned int height, unsigned int fps, unsigned int bitrate)=0
int type
Definition: packet_i.h:246
@ VIDEO_FLAG_HARDWARE_ENCODE
Definition: packet_i.h:144
@ VIDEO_FLAG_KEY_FRAME
Definition: packet_i.h:138
broadcast_packet_t()
Definition: packet_i.h:111
@ MEDIA_STREAM_TYPE_VIDEO_LOW
Definition: packet_i.h:31
bool isSuperResolutionEnabled
Definition: packet_i.h:405
SAudioPacket()
Definition: packet_i.h:73
int estimateBandwidth
Definition: packet_i.h:314
uint32_t reqMs
Definition: packet_i.h:120
@ VIDEO_FLAG_FEC
Definition: packet_i.h:139
@ VIDEO_FEEDBACK_INTRA_REQUEST_QUICK
Definition: packet_i.h:471
std::list< SharedSAudioFrame > frames_
Definition: packet_i.h:72
unsigned short reserve1
Definition: packet_i.h:491
uid_t uid
Definition: packet_i.h:93
int8_t vad_
Definition: packet_i.h:51
@ VIDEO_CODEC_EVP
Definition: packet_i.h:465
uint32_t seq
Definition: packet_i.h:94
uint16_t jitter95
Definition: packet_i.h:508
MEDIA_STREAM_TYPE
Definition: packet_i.h:29
uint8_t frameType
Definition: packet_i.h:179
int uplinkFreezeTime
Definition: packet_i.h:317
int last_error
Definition: packet_i.h:119
int decodeRejectedFrames
Definition: packet_i.h:382
Definition: packet_i.h:371
std::list< AutStreamData > stream_info
Definition: packet_i.h:509
Extension extension
Definition: packet_i.h:189
uint16_t seq_
Definition: packet_i.h:68
int encoderSkipFrames
Definition: packet_i.h:310
Definition: packet_i.h:244
Definition: packet_i.h:239
VIDEO_CODEC_TYPE
Definition: packet_i.h:154
Definition: packet_i.h:83
Definition: packet_i.h:59
LocalVideoStreamStat()
Definition: packet_i.h:280
int decodedQP
Definition: packet_i.h:388
int64_t transport_seq
Definition: packet_i.h:190
static const uint8_t kVideoEngineFlagNasa
Definition: packet_i.h:22
uint16_t padding
Definition: packet_i.h:502
virtual void onVideoViewSizeChanged(int userID, int newWidth, int newHeight)
Definition: packet_i.h:528
uint16_t tag_
Definition: packet_i.h:174
uint16_t subseq
Definition: packet_i.h:182
static const uint8_t kVideoEngineFlagScalableDelta
Definition: packet_i.h:23
int duration
Definition: packet_i.h:312
virtual void onAppSetVideoStartBitRate(int value)=0
unsigned int flag
Definition: packet_i.h:489
LocalVideoStreamStat highStream
Definition: packet_i.h:292
Definition: packet_i.h:208
@ VIDEO_FLAG_B_FRAME
Definition: packet_i.h:142
virtual void onRemoteVideoInterrupted(unsigned int uid, unsigned int elapse_time)=0
@ PISE_FRAME
Definition: packet_i.h:459
Definition: packet_i.h:260
@ B_FRAME
Definition: packet_i.h:458
std::string payload
Definition: packet_i.h:248
@ VIDEO_CODEC_VP8
Definition: packet_i.h:155
unsigned int uid_t
Definition: AgoraMediaBase.h:25
uint8_t codec
Definition: packet_i.h:184
@ MASTER_VIDEO_STREAM
Definition: packet_i.h:252
std::string payload
Definition: packet_i.h:236
@ VIDEO_FEEDBACK_DECODE_FB
Definition: packet_i.h:472
VideoFrameType
Definition: packet_i.h:455
uint8_t audio_fec_level_
Definition: packet_i.h:53
@ RTC_FLAG_REXFERRED
Definition: packet_i.h:85
virtual ~IVideoListener()
Definition: packet_i.h:262
uint16_t bwe
Definition: packet_i.h:501
virtual void switchVideoStream(unsigned int uid, VideoStreamType stream)=0
@ VIDEO_CODEC_VP8
Definition: packet_i.h:463
@ VIDEO_STREAM_LIVE
Definition: packet_i.h:131
@ DELTA_FRAME
Definition: packet_i.h:149
@ VIDEO_FLAG_CACHED
Definition: packet_i.h:90
virtual void onStartCaptureSuccess()=0
uint8_t flags
Definition: packet_i.h:185
int recvPkgNumber
Definition: packet_i.h:377
int version
Definition: packet_i.h:490
VIDEO_FRAME_TYPE
Definition: packet_i.h:147
virtual void OnVideoStreamBitrateRangeChanged(VideoStreamType type, uint32_t max_kbps, uint32_t min_kbps)=0
int rendererRecvFrames
Definition: packet_i.h:385
int sentRtt
Definition: packet_i.h:294
@ VIDEO_FLAG_STD_CODEC
Definition: packet_i.h:141
Definition: packet_i.h:498
VIDEO_EXTRA_FLAG_TYPE
Definition: packet_i.h:161
uint32_t reserve1
Definition: packet_i.h:188
VideoStreamType stream_type
Definition: packet_i.h:488
Definition: video_node_i.h:27
std::shared_ptr< SAudioFrame > SharedSAudioFrame
Definition: packet_i.h:57
unsigned int minFrameNumber
Definition: packet_i.h:391
int streamType
Definition: packet_i.h:383
@ VIDEO_FLAG_VIDEO3
Definition: packet_i.h:91
LocalVideoStreamStat lowStream
Definition: packet_i.h:293
INTERNAL_FLAG_TYPE
Definition: packet_i.h:84
virtual void onSendVideoPaced(bool status)=0
unsigned int minEncodeTimeMs
Definition: packet_i.h:300
uint16_t allocated
Definition: packet_i.h:506
void reset()
Definition: packet_i.h:339