QNCustomVideoTrack
Hierarchy
Index
Core Methods
Core Methods
GetTrackID
- virtual const std::string& GetTrackID() = 0
-
获取 TrackID
Returns string
GetUserID
- virtual const std::string& GetUserID() = 0
-
获取 UserID
Returns string
GetTag
- virtual const std::string& GetTag() = 0
-
获取 Tag
Returns string
IsAudio
- virtual bool IsAudio() = 0
-
是否为音频 track
Returns bool
IsVideo
- virtual bool IsVideo() = 0
-
是否为视频 track
Returns bool
IsMuted
- virtual bool IsMuted() = 0
-
是否 muted
Returns bool
SetMuted
- virtual void SetMuted(bool muted) = 0
-
设置是否静默该 track,静默后,SDK 将会发送静默帧数据
对于推 H264 源的 track,不支持 mute 操作
Parameters-
muted: bool
是否静默
-
SetVideoFrameListener
- virtual void SetVideoFrameListener(QNVideoFrameListener* listener) = 0
-
设置视频数据监听
Parameters-
listener: QNVideoFrameListener
视频数据监听接口
-
SendSEI
- virtual void SendSEI(std::string& message,std::string& uuid,int32_t repeat_count) = 0
-
发送 SEI
Parameters-
message: string
消息内容
-
uuid: string
唯一 ID
-
repeat_count: int
重复次数, -1 为每一帧都发送
-
PushVideoFrame
- virtual int PushVideoFrame(const uint8_t* data,const uint32_t data_size,const int32_t width,const int32_t height,const int64_t timestamp_us,QNVideoFrameType video_frame_type,QNVideoRotation rotation,bool mirror = false) = 0
-
推送自定义视频帧
Parameters-
data: uint8_t*
视频数据
-
data_size: uint32_t
数据长度
-
width: int32_t
视频宽
-
height: int32_t
视频高
-
int64_t: timestamp_us
时间戳,单位:微妙
-
video_frame_type: QNVideoFrameType
视频原始格式,支持:kI420 kYUY2 kRGB24
-
rotation: QNVideoRotation
导入后旋转角度,如果不需要旋转则使用默认值 kVideoRotation0 即可
-
mirror: bool
是否镜像
-
文档反馈
(如有产品使用问题,请 提交工单)