Agora RTC Objective-C API Reference Refactor

NGIAgoraScreenCapturer.h
Go to the documentation of this file.
1 //
2 // Agora SDK
3 //
4 // Copyright (c) 2019 Agora.io. All rights reserved.
5 //
6
7 #pragma once // NOLINT(build/header_guard)
8
9 #include "AgoraBase.h"
10 #include "AgoraRefPtr.h"
11
12 namespace agora {
13 namespace rtc {
14
18 class IScreenCapturer : public RefCountInterface {
19 public:
20 #if defined (_WIN32) || (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE)
21
38 virtual int initWithDisplayId(uint32_t displayId, const Rectangle& regionRect) = 0;
39 #endif
40
41 #if defined(_WIN32) || (defined(__linux__) && !defined(__ANDROID__))
42
59 virtual int initWithScreenRect(const Rectangle& screenRect,
60 const Rectangle& regionRect) = 0;
61 #endif // TARGET_OS_MAC && !TARGET_OS_IPHONE
62
80 virtual int initWithWindowId(view_t windowId, const Rectangle& regionRect) = 0;
81
93 virtual int setContentHint(VIDEO_CONTENT_HINT contentHint) = 0;
94
105 virtual int updateScreenCaptureRegion(const Rectangle& regionRect) = 0;
106
111 virtual void setScreenOrientation(VIDEO_ORIENTATION orientation) = 0;
112
117 virtual void setFrameRate(int rate) = 0;
118
119 #if defined(__ANDROID__)
120
136 virtual int initWithMediaProjectionPermissionResultData(void* data,
137 const VideoDimensions& dimensions) = 0;
138 #endif // __ANDROID__
139
140 protected:
141 ~IScreenCapturer() {}
142 };
143
144 #if defined(__ANDROID__) || TARGET_OS_IPHONE
145 class IScreenCapturer2 : public RefCountInterface {
146 public:
157 virtual int setScreenCaptureDimensions(const VideoDimensions& dimensions) = 0;
158
169 virtual int updateScreenCaptureRegion(const Rectangle& regionRect) = 0;
170
175 virtual int setFrameRate(int rate) = 0;
176
185 virtual int setAudioRecordConfig(int channels, int sampleRate) = 0;
186
194 virtual int setAudioVolume(uint32_t volume) = 0;
195
196 protected:
197 virtual ~IScreenCapturer2() {}
198 };
199 #endif
200
201 } // namespace rtc
202 } // namespace agora
agora::rtc::IScreenCapturer2::updateScreenCaptureRegion
virtual int updateScreenCaptureRegion(const Rectangle &regionRect)=0
agora::rtc::IScreenCapturer::updateScreenCaptureRegion
virtual int updateScreenCaptureRegion(const Rectangle &regionRect)=0
AgoraBase.h
agora::rtc::Rectangle
Definition: AgoraBase.h:2008
agora::view_t
void * view_t
Definition: AgoraBase.h:801
agora::rtc::IScreenCapturer::initWithWindowId
virtual int initWithWindowId(view_t windowId, const Rectangle &regionRect)=0
agora::rtc::VIDEO_CONTENT_HINT
VIDEO_CONTENT_HINT
Definition: AgoraBase.h:2541
agora::rtc::IScreenCapturer::~IScreenCapturer
~IScreenCapturer()
Definition: NGIAgoraScreenCapturer.h:141
agora
Definition: AgoraAtomicOps.h:21
agora::rtc::IScreenCapturer::setScreenOrientation
virtual void setScreenOrientation(VIDEO_ORIENTATION orientation)=0
agora::rtc::IScreenCapturer
Definition: NGIAgoraScreenCapturer.h:18
agora::rtc::IScreenCapturer2::setAudioVolume
virtual int setAudioVolume(uint32_t volume)=0
agora::rtc::IScreenCapturer2::setAudioRecordConfig
virtual int setAudioRecordConfig(int channels, int sampleRate)=0
agora::rtc::IScreenCapturer2::setScreenCaptureDimensions
virtual int setScreenCaptureDimensions(const VideoDimensions &dimensions)=0
agora::rtc::VIDEO_ORIENTATION
VIDEO_ORIENTATION
Definition: AgoraBase.h:935
agora::rtc::IScreenCapturer2
Definition: NGIAgoraScreenCapturer.h:145
agora::rtc::IScreenCapturer2::~IScreenCapturer2
virtual ~IScreenCapturer2()
Definition: NGIAgoraScreenCapturer.h:197
AgoraRefPtr.h
agora::rtc::IScreenCapturer2::setFrameRate
virtual int setFrameRate(int rate)=0
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::VideoDimensions
Definition: AgoraBase.h:1081
agora::rtc::IScreenCapturer::setContentHint
virtual int setContentHint(VIDEO_CONTENT_HINT contentHint)=0
agora::rtc::IScreenCapturer::setFrameRate
virtual void setFrameRate(int rate)=0