ZegoLiveRoom
zego-api-media-side-info.h
Go to the documentation of this file.
1//
2// zego-api-media-side-info.hpp
3// ZegoLiveRoom
4//
5// Created by MarkWu on 2018/1/12.
6//
7
8#ifndef zego_api_media_side_info_h
9#define zego_api_media_side_info_h
10#include "zego-api-defines.h"
11#include <stdint.h>
12
13namespace ZEGO
14{
15 namespace MEDIASIDEINFO
16 {
18 {
22 const char* pszStreamID;
23
27 const unsigned char* pBuf;
28
33
37 int64_t timestamp_ns;
38
43
45 {
46 pszStreamID = nullptr;
47 pBuf = nullptr;
48 dataLen = 0;
49 timestamp_ns = 0;
50 moduleType = 0;
51 }
52 };
53
58 {
59 public:
70 virtual void onRecvMediaSideInfo(const char * pszStreamID, const unsigned char *pBuf, int dataLen) = 0;
71
81 virtual void onRecvMediaSideInfo(const MediaSideInfo& info) {}
82
84 };
85
90 {
91 public:
103 virtual void onRecvAudioSideInfo(const char* pszStreamID, const unsigned char* pBuf, int dataLen){};
104
106 };
107
121 ZEGOAVKIT_API void SetMediaSideFlags(bool bStart, bool bOnlyAudioPublish, int mediaInfoType = AV::SideInfoZegoDefined, int seiSendType = AV::SeiSendSingleFrame, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
122
139 ZEGOAVKIT_API void SendMediaSideInfo(const unsigned char *inData, int dataLen, bool bPacket, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
140
157 ZEGOAVKIT_API void SendMediaSideInfoSyncWithCustomVideo(const unsigned char *inData, int dataLen, unsigned long long timestamp_ns, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
158
174 ZEGOAVKIT_API void SendAudioSideInfo(const unsigned char* inData, int dataLen, double timeStampMs, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
175
188
200 }
201}
202
203
204
205#endif /* zego_api_media_side_info_hpp */
Definition: zego-api-media-side-info.h:90
virtual void onRecvAudioSideInfo(const char *pszStreamID, const unsigned char *pBuf, int dataLen)
Definition: zego-api-media-side-info.h:103
virtual ~IZegoAudioSideCallback()
Definition: zego-api-media-side-info.h:105
Definition: zego-api-media-side-info.h:58
virtual void onRecvMediaSideInfo(const char *pszStreamID, const unsigned char *pBuf, int dataLen)=0
virtual ~IZegoMediaSideCallback()
Definition: zego-api-media-side-info.h:83
virtual void onRecvMediaSideInfo(const MediaSideInfo &info)
Definition: zego-api-media-side-info.h:81
@ SeiSendSingleFrame
Definition: zego-api-defines.h:1024
@ SideInfoZegoDefined
Definition: zego-api-defines.h:999
PublishChannelIndex
Definition: zego-api-defines.h:976
@ PUBLISH_CHN_MAIN
Definition: zego-api-defines.h:977
ZEGOAVKIT_API void SetMediaSideCallback(IZegoMediaSideCallback *pCB)
ZEGOAVKIT_API void SendMediaSideInfoSyncWithCustomVideo(const unsigned char *inData, int dataLen, unsigned long long timestamp_ns, AV::PublishChannelIndex idx=AV::PUBLISH_CHN_MAIN)
ZEGOAVKIT_API void SendAudioSideInfo(const unsigned char *inData, int dataLen, double timeStampMs, AV::PublishChannelIndex idx=AV::PUBLISH_CHN_MAIN)
ZEGOAVKIT_API void SendMediaSideInfo(const unsigned char *inData, int dataLen, bool bPacket, AV::PublishChannelIndex idx=AV::PUBLISH_CHN_MAIN)
ZEGOAVKIT_API void SetAudioSideCallback(IZegoAudioSideCallback *pCB)
ZEGOAVKIT_API void SetMediaSideFlags(bool bStart, bool bOnlyAudioPublish, int mediaInfoType=AV::SideInfoZegoDefined, int seiSendType=AV::SeiSendSingleFrame, AV::PublishChannelIndex idx=AV::PUBLISH_CHN_MAIN)
Definition: AVDefines.h:17
Definition: zego-api-media-side-info.h:18
MediaSideInfo()
Definition: zego-api-media-side-info.h:44
int dataLen
Definition: zego-api-media-side-info.h:32
int moduleType
Definition: zego-api-media-side-info.h:42
int64_t timestamp_ns
Definition: zego-api-media-side-info.h:37
const unsigned char * pBuf
Definition: zego-api-media-side-info.h:27
const char * pszStreamID
Definition: zego-api-media-side-info.h:22
#define ZEGOAVKIT_API
Definition: zego-api-defines.h:59