Agora Server Gateway SDK C++ API Reference
NGIAgoraVideoTrack.h
Go to the documentation of this file.
1
2// Copyright (c) 2019 Agora.io. All rights reserved
3
4// This program is confidential and proprietary to Agora.io.
5// And may not be copied, reproduced, modified, disclosed to others, published
6// or used, in whole or in part, without the express prior written permission
7// of Agora.io.
8
9#pragma once // NOLINT(build/header_guard)
10
11#include "AgoraBase.h"
12
13#ifndef OPTIONAL_OVERRIDE
14#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
15#define OPTIONAL_OVERRIDE override
16#else
17#define OPTIONAL_OVERRIDE
18#endif
19#endif
20
21namespace agora {
22namespace rtc {
23class IVideoEncodedImageReceiver;
24class IVideoSinkBase;
25
39 REMOTE_VIDEO_IMAGE_TRACK,
41};
42
46class IVideoTrack : public RefCountInterface {
47 public:
62 virtual bool addRenderer(agora_refptr<IVideoSinkBase> videoRenderer, media::base::VIDEO_MODULE_POSITION position = media::base::POSITION_POST_FILTERS) = 0;
72 virtual bool removeRenderer(agora_refptr<IVideoSinkBase> videoRenderer, media::base::VIDEO_MODULE_POSITION position = media::base::POSITION_POST_FILTERS) = 0;
78 virtual VideoTrackType getType() = 0;
79
80 protected:
82};
83
143 int total_bitrate_bps; // Include FEC
163 int width;
169 uint32_t encoder_type;
171
175
180
195 capture_width(0),
199 width(0),
200 height(0),
201 encoder_type(0),
204};
205
212 public:
222 virtual void setEnabled(bool enable) = 0;
223
241
253 virtual int enableSimulcastStream(bool enabled, const SimulcastStreamConfig& config) = 0;
254
272
279
288 virtual bool getStatistics(LocalVideoTrackStats& stats) = 0;
292 protected:
294};
306 int delay;
310 int width;
372
378};
379
384 public:
385
393 virtual bool getStatistics(RemoteVideoTrackStats& stats) = 0;
406 virtual bool getTrackInfo(VideoTrackInfo& info) = 0;
431 protected:
433};
434
435} // namespace rtc
436} // namespace agora
#define OPTIONAL_OVERRIDE
Definition: NGIAgoraVideoTrack.h:17
Definition: NGIAgoraVideoTrack.h:211
virtual int setSimulcastStreamMode(SIMULCAST_STREAM_MODE mode, const SimulcastStreamConfig &config)=0
virtual int setVideoEncoderConfiguration(const VideoEncoderConfiguration &config)=0
virtual bool getStatistics(LocalVideoTrackStats &stats)=0
virtual LOCAL_VIDEO_STREAM_STATE getState()=0
~ILocalVideoTrack()
Definition: NGIAgoraVideoTrack.h:293
virtual void setEnabled(bool enable)=0
virtual int enableSimulcastStream(bool enabled, const SimulcastStreamConfig &config)=0
Definition: NGIAgoraVideoTrack.h:383
virtual int unregisterVideoEncodedImageReceiver(IVideoEncodedImageReceiver *videoReceiver)=0
virtual int registerVideoEncodedImageReceiver(IVideoEncodedImageReceiver *videoReceiver)=0
~IRemoteVideoTrack()
Definition: NGIAgoraVideoTrack.h:432
virtual REMOTE_VIDEO_STATE getState()=0
virtual bool getTrackInfo(VideoTrackInfo &info)=0
virtual bool getStatistics(RemoteVideoTrackStats &stats)=0
Definition: AgoraBase.h:3175
Definition: NGIAgoraVideoTrack.h:46
virtual bool removeRenderer(agora_refptr< IVideoSinkBase > videoRenderer, media::base::VIDEO_MODULE_POSITION position=media::base::POSITION_POST_FILTERS)=0
virtual bool addRenderer(agora_refptr< IVideoSinkBase > videoRenderer, media::base::VIDEO_MODULE_POSITION position=media::base::POSITION_POST_FILTERS)=0
~IVideoTrack()
Definition: NGIAgoraVideoTrack.h:81
virtual VideoTrackType getType()=0
SIMULCAST_STREAM_MODE
Definition: AgoraBase.h:2130
VideoTrackType
Definition: NGIAgoraVideoTrack.h:29
@ REMOTE_VIDEO_TRACK
Definition: NGIAgoraVideoTrack.h:37
@ LOCAL_VIDEO_TRACK
Definition: NGIAgoraVideoTrack.h:33
VIDEO_STREAM_TYPE
Definition: AgoraBase.h:1837
@ VIDEO_STREAM_HIGH
Definition: AgoraBase.h:1841
LOCAL_VIDEO_STREAM_STATE
Definition: AgoraBase.h:2785
REMOTE_VIDEO_STATE
Definition: AgoraBase.h:2915
unsigned int uid_t
Definition: AgoraMediaBase.h:25
QUALITY_ADAPT_INDICATION
Definition: AgoraBase.h:2428
@ ADAPT_NONE
Definition: AgoraBase.h:2430
Definition: AgoraBase.h:86
VIDEO_MODULE_POSITION
Definition: AgoraMediaBase.h:644
@ POSITION_POST_FILTERS
Definition: AgoraMediaBase.h:648
Definition: NGIAgoraVideoTrack.h:87
int regulated_capture_height
Definition: NGIAgoraVideoTrack.h:159
uint32_t frames_encoded
Definition: NGIAgoraVideoTrack.h:103
uint32_t ssrc_minor_stream
Definition: NGIAgoraVideoTrack.h:111
int height
Definition: NGIAgoraVideoTrack.h:167
int total_bitrate_bps
Definition: NGIAgoraVideoTrack.h:143
uint64_t bytes_major_stream
Definition: NGIAgoraVideoTrack.h:95
int regulated_capture_frame_rate
Definition: NGIAgoraVideoTrack.h:119
uint64_t number_of_streams
Definition: NGIAgoraVideoTrack.h:91
int width
Definition: NGIAgoraVideoTrack.h:163
int input_frame_rate
Definition: NGIAgoraVideoTrack.h:123
QUALITY_ADAPT_INDICATION quality_adapt_indication
Definition: NGIAgoraVideoTrack.h:179
uint64_t bytes_minor_stream
Definition: NGIAgoraVideoTrack.h:99
int encode_frame_rate
Definition: NGIAgoraVideoTrack.h:127
int target_media_bitrate_bps
Definition: NGIAgoraVideoTrack.h:135
int capture_width
Definition: NGIAgoraVideoTrack.h:147
int media_bitrate_bps
Definition: NGIAgoraVideoTrack.h:139
uint32_t uplink_cost_time_ms
Definition: NGIAgoraVideoTrack.h:174
int render_frame_rate
Definition: NGIAgoraVideoTrack.h:131
LocalVideoTrackStats()
Definition: NGIAgoraVideoTrack.h:181
uint32_t ssrc_major_stream
Definition: NGIAgoraVideoTrack.h:107
int capture_frame_rate
Definition: NGIAgoraVideoTrack.h:115
int capture_height
Definition: NGIAgoraVideoTrack.h:151
int regulated_capture_width
Definition: NGIAgoraVideoTrack.h:155
Definition: NGIAgoraVideoTrack.h:298
int frameLossRate
Definition: NGIAgoraVideoTrack.h:327
uint64_t totalActiveTime
Definition: NGIAgoraVideoTrack.h:367
int receivedBitrate
Definition: NGIAgoraVideoTrack.h:318
VIDEO_STREAM_TYPE rxStreamType
Definition: NGIAgoraVideoTrack.h:334
int totalFrozenTime
Definition: NGIAgoraVideoTrack.h:340
int delay
Definition: NGIAgoraVideoTrack.h:306
RemoteVideoTrackStats()
Definition: NGIAgoraVideoTrack.h:373
int width
Definition: NGIAgoraVideoTrack.h:310
uint32_t frame_render_delay_ms
Definition: NGIAgoraVideoTrack.h:362
uint32_t downlink_process_time_ms
Definition: NGIAgoraVideoTrack.h:358
int rendererOutputFrameRate
Definition: NGIAgoraVideoTrack.h:324
int avSyncTimeMs
Definition: NGIAgoraVideoTrack.h:353
uid_t uid
Definition: NGIAgoraVideoTrack.h:302
int decoderOutputFrameRate
Definition: NGIAgoraVideoTrack.h:321
int packetLossRate
Definition: NGIAgoraVideoTrack.h:330
uint64_t publishDuration
Definition: NGIAgoraVideoTrack.h:371
int frozenRate
Definition: NGIAgoraVideoTrack.h:344
uint32_t totalDecodedFrames
Definition: NGIAgoraVideoTrack.h:348
int height
Definition: NGIAgoraVideoTrack.h:314
Definition: AgoraBase.h:2149
Definition: AgoraBase.h:1998
Definition: AgoraBase.h:3011