Agora Java API Reference for Android
NGIAgoraVideoMixerSource.h
1 //
2 // Agora SDK
3 //
4 // Copyright (c) 2018 Agora.io. All rights reserved.
5 //
6 
7 #pragma once // NOLINT(build/header_guard)
8 
9 #include "AgoraBase.h"
10 #include "AgoraRefPtr.h"
11 #include "IAgoraService.h"
12 
13 namespace agora {
14 namespace rtc {
15 
16 class IVideoTrack;
17 
19  int32_t x;
20  int32_t y;
21  int32_t width;
22  int32_t height;
23  int32_t zOrder; // larger zOrder prioritizes smaller ones
24  float alpha;
25  bool mirror;
26  const char* image_path; // url of the place holder picture
27  VIDEO_ORIENTATION rotation;
28 
29  MixerLayoutConfig() : x(0), y(0), width(0), height(0), zOrder(0), alpha(1.0), mirror(false), image_path(NULL), rotation(VIDEO_ORIENTATION::VIDEO_ORIENTATION_0) {}
30  MixerLayoutConfig(int ox, int oy, int w, int h, int order) : x(ox), y(oy), width(w), height(h), zOrder(order), alpha(1.0), mirror(false), image_path(NULL), rotation(VIDEO_ORIENTATION::VIDEO_ORIENTATION_0) {}
31 };
32 
33 enum ImageType {
34  kUnknownPic,
35  kPng,
36  kJpeg,
37  kGif
38 };
39 
47 public:
56  virtual int addVideoTrack(const char* id, agora_refptr<IVideoTrack> track, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
65  virtual int removeVideoTrack(const char* id, agora_refptr<IVideoTrack> track, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
75  virtual int setStreamLayout(const char* id, const MixerLayoutConfig& config, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
84  virtual int delStreamLayout(const char* id, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
93  virtual int addImageSource(const char* id, const MixerLayoutConfig& config, ImageType type = kPng, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
101  virtual int delImageSource(const char* id, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
105  virtual int clearLayout(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
112  virtual int refresh(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
123  virtual int setBackground(uint32_t width, uint32_t height, int fps, uint32_t color_argb = 0, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
134  virtual int setBackground(uint32_t width, uint32_t height, int fps, const char* url, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
142  virtual int setRotation(uint8_t rotation, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
149  virtual int getAvgMixerDelay() = 0;
157  virtual int setMasterClockSource(const char* id = NULL, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
158 };
159 
160 } //namespace rtc
161 } // namespace agora
agora::rtc::IVideoMixerSource::setRotation
virtual int setRotation(uint8_t rotation, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource::setBackground
virtual int setBackground(uint32_t width, uint32_t height, int fps, uint32_t color_argb=0, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource::setStreamLayout
virtual int setStreamLayout(const char *id, const MixerLayoutConfig &config, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::agora_refptr
Definition: AgoraRefPtr.h:44
agora::rtc::MixerLayoutConfig
Definition: NGIAgoraVideoMixerSource.h:18
agora::rtc::IVideoMixerSource::addImageSource
virtual int addImageSource(const char *id, const MixerLayoutConfig &config, ImageType type=kPng, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource::removeVideoTrack
virtual int removeVideoTrack(const char *id, agora_refptr< IVideoTrack > track, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource
Definition: NGIAgoraVideoMixerSource.h:46
agora::rtc::IVideoMixerSource::clearLayout
virtual int clearLayout(aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource::addVideoTrack
virtual int addVideoTrack(const char *id, agora_refptr< IVideoTrack > track, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource::refresh
virtual int refresh(aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource::delImageSource
virtual int delImageSource(const char *id, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource::setBackground
virtual int setBackground(uint32_t width, uint32_t height, int fps, const char *url, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::IVideoMixerSource::getAvgMixerDelay
virtual int getAvgMixerDelay()=0
agora::rtc::IVideoMixerSource::delStreamLayout
virtual int delStreamLayout(const char *id, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::IVideoMixerSource::setMasterClockSource
virtual int setMasterClockSource(const char *id=NULL, aosl_ref_t ares=AOSL_REF_INVALID)=0