ZegoLiveRoom
zego-api-external-video-render.h
Go to the documentation of this file.
1//
2// zego-api-external-video-render.h
3//
4
5#ifndef zego_api_extrnal_video_render_h
6#define zego_api_extrnal_video_render_h
7#include "video_format.h"
8#include "zego-api-defines.h"
9#include "video_capture.h"
10
11namespace ZEGO
12{
13 namespace EXTERNAL_RENDER
14 {
15
20
22 {
37 };
38
43 {
44 public:
55 virtual void OnVideoRenderCallback(unsigned char **pData, int* dataLen,
56 const char* pszStreamID,
57 int width, int height, int strides[4],
58 AVE::VideoPixelFormat pixel_format) = 0;
59
66 virtual void SetFlipMode(const char* pszStreamID, int mode) = 0;
67
73 virtual void SetRotation(const char* pszStreamID, int rotation) = 0;
74
76 };
77
78#if defined(TARGET_OS_IPHONE) || TARGET_OS_OSX
83 class IZegoVideoRenderCVPixelBufferCallback
84 {
85 public:
91 virtual void OnVideoRenderCallback(void* cv_pixel_buffer, const char* pszStreamID) = 0;
92
99 virtual void SetFlipMode(const char* pszStreamID, int mode) = 0;
100
106 virtual void SetRotation(const char* pszStreamID, int rotation) = 0;
107
108 virtual ~IZegoVideoRenderCVPixelBufferCallback() {}
109 };
110#endif
111
116 {
117 public:
127 virtual void OnVideoDecodeCallback(const unsigned char* data, int length,
128 const char* pszStreamID, const AVE::VideoCodecConfig& codec_config,
129 bool b_keyframe, double reference_time_ms) = 0;
130
132 };
133
141
149
150#if defined(TARGET_OS_IPHONE) || TARGET_OS_OSX
159 ZEGOAVKIT_API void SetVideoRenderCVPixelBufferCallback(IZegoVideoRenderCVPixelBufferCallback* callback);
160#endif
161
170
179 ZEGOAVKIT_API bool EnableVideoRender(bool bEnable, const char *pszStreamID);
180
189 ZEGOAVKIT_API bool EnableVideoRender(bool bEnable, int nPlayChannel);
190
199 }
200}
201
202#endif /* zego_api_extrnal_video_render_h */
Definition: zego-api-external-video-render.h:116
virtual ~IZegoVideoDecodeCallback()
Definition: zego-api-external-video-render.h:131
virtual void OnVideoDecodeCallback(const unsigned char *data, int length, const char *pszStreamID, const AVE::VideoCodecConfig &codec_config, bool b_keyframe, double reference_time_ms)=0
Definition: zego-api-external-video-render.h:43
virtual ~IZegoVideoRenderCallback()
Definition: zego-api-external-video-render.h:75
virtual void SetFlipMode(const char *pszStreamID, int mode)=0
virtual void SetRotation(const char *pszStreamID, int rotation)=0
virtual void OnVideoRenderCallback(unsigned char **pData, int *dataLen, const char *pszStreamID, int width, int height, int strides[4], AVE::VideoPixelFormat pixel_format)=0
VideoPixelFormat
Definition: video_format.h:7
PublishChannelIndex
Definition: zego-api-defines.h:954
@ PUBLISH_CHN_MAIN
Definition: zego-api-defines.h:955
ZEGOAVKIT_API void SetVideoDecodeCallback(IZegoVideoDecodeCallback *callback)
ZEGOAVKIT_API const char * kZegoVideoDataThirdPublishingStream
ZEGOAVKIT_API const char * kZegoVideoDataMainPublishingStream
ZEGOAVKIT_API bool EnableVideoPreview(bool bEnable, AV::PublishChannelIndex nPublishChannel=AV::PUBLISH_CHN_MAIN)
VideoRenderType
Definition: zego-api-external-video-render.h:22
@ VIDEO_RENDER_TYPE_RGB
Definition: zego-api-external-video-render.h:26
@ VIDEO_RENDER_TYPE_NONE
Definition: zego-api-external-video-render.h:24
@ VIDEO_RENDER_TYPE_ANY
Definition: zego-api-external-video-render.h:30
@ VIDEO_RENDER_TYPE_EXTERNAL_SURFACE_TEXTURE
Definition: zego-api-external-video-render.h:36
@ VIDEO_RENDER_TYPE_YUV
Definition: zego-api-external-video-render.h:28
@ VIDEO_RENDER_TYPE_EXTERNAL_INTERNAL_RGB
Definition: zego-api-external-video-render.h:32
@ VIDEO_RENDER_TYPE_EXTERNAL_INTERNAL_YUV
Definition: zego-api-external-video-render.h:34
ZEGOAVKIT_API void SetVideoRenderCallback(IZegoVideoRenderCallback *callback)
ZEGOAVKIT_API const char * kZegoVideoDataFourthPublishingStream
ZEGOAVKIT_API const char * kZegoVideoDataAuxPublishingStream
ZEGOAVKIT_API void SetVideoRenderType(VideoRenderType type)
ZEGOAVKIT_API bool EnableVideoRender(bool bEnable, const char *pszStreamID)
Definition: AVDefines.h:17
Definition: video_capture.h:247
#define ZEGOAVKIT_API
Definition: zego-api-defines.h:56