Agora RTC Objective-C API Reference Refactor

NGIAgoraVideoDeviceManager.h
Go to the documentation of this file.
1 //
2 // Agora SDK
3 //
4 // Copyright (c) 2025 Agora.io. All rights reserved.
5 //
6
7 #pragma once // NOLINT(build/header_guard)
8
9
10 #include "AgoraBase.h"
11 #include "AgoraRefPtr.h"
12 #include <api/cpp/aosl_ares_class.h>
13
14 namespace agora {
15 namespace rtc {
16
20 static const int kVdmMaxDeviceSize = 260;
21
25 class VideoDeviceInfo {
26 public:
30 char deviceId[kVdmMaxDeviceSize];
34 char deviceName[kVdmMaxDeviceSize];
35
36 VideoDeviceInfo() {
37 memset(deviceId, 0, sizeof(deviceId));
38 memset(deviceName, 0, sizeof(deviceName));
39 }
40 };
41
45 class IVideoDeviceManagerObserver
46 {
47 public:
48 virtual ~IVideoDeviceManagerObserver() {}
49
60 virtual void onVideoDeviceStateChanged(const char *deviceId, int deviceType, int deviceState) = 0;
61
62 };
63
64
68 class INGVideoDeviceManager: public RefCountInterface {
69 public:
70
82 virtual int registerObserver(IVideoDeviceManagerObserver* observer, void(*safeDeleter)(IVideoDeviceManagerObserver*) = NULL, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
83
91 virtual int unregisterObserver(IVideoDeviceManagerObserver* observer) = 0;
92
98 virtual int getNumberOfDevices() = 0;
99
106 virtual int getNumberOfCapabilities(const char* deviceId) = 0;
107
108
117 virtual int getCapability(const char* deviceId, const uint32_t capabilityIndex, VideoFormat& capability) = 0;
118
127 virtual int getDeviceInfo(int index, VideoDeviceInfo& deviceInfo) = 0;
128
129
130 protected:
131 ~INGVideoDeviceManager() {}
132 };
133
134 } //namespace rtc
135 } // namespace agora
agora::rtc::IVideoDeviceManagerObserver
Definition: NGIAgoraVideoDeviceManager.h:46
AgoraBase.h
agora::rtc::VideoDeviceInfo::deviceId
char deviceId[kVdmMaxDeviceSize]
Definition: NGIAgoraVideoDeviceManager.h:30
agora::rtc::INGVideoDeviceManager::getNumberOfCapabilities
virtual int getNumberOfCapabilities(const char *deviceId)=0
agora::rtc::INGVideoDeviceManager::getDeviceInfo
virtual int getDeviceInfo(int index, VideoDeviceInfo &deviceInfo)=0
agora
Definition: AgoraAtomicOps.h:21
agora::rtc::VideoFormat
The format of the video frame.
Definition: AgoraBase.h:3166
agora::rtc::INGVideoDeviceManager::unregisterObserver
virtual int unregisterObserver(IVideoDeviceManagerObserver *observer)=0
agora::rtc::IVideoDeviceManagerObserver::onVideoDeviceStateChanged
virtual void onVideoDeviceStateChanged(const char *deviceId, int deviceType, int deviceState)=0
agora::rtc::VideoDeviceInfo
Definition: NGIAgoraVideoDeviceManager.h:25
agora::rtc::INGVideoDeviceManager::~INGVideoDeviceManager
~INGVideoDeviceManager()
Definition: NGIAgoraVideoDeviceManager.h:131
agora::rtc::INGVideoDeviceManager::registerObserver
virtual int registerObserver(IVideoDeviceManagerObserver *observer, void(*safeDeleter)(IVideoDeviceManagerObserver *)=NULL, aosl_ref_t ares=AOSL_REF_INVALID)=0
agora::rtc::INGVideoDeviceManager::getNumberOfDevices
virtual int getNumberOfDevices()=0
agora::rtc::INGVideoDeviceManager
Definition: NGIAgoraVideoDeviceManager.h:68
AgoraRefPtr.h
agora::RefCountInterface
Definition: AgoraRefPtr.h:31
agora::rtc::VideoDeviceInfo::deviceName
char deviceName[kVdmMaxDeviceSize]
Definition: NGIAgoraVideoDeviceManager.h:34
agora::rtc::INGVideoDeviceManager::getCapability
virtual int getCapability(const char *deviceId, const uint32_t capabilityIndex, VideoFormat &capability)=0
agora::rtc::VideoDeviceInfo::VideoDeviceInfo
VideoDeviceInfo()
Definition: NGIAgoraVideoDeviceManager.h:36
agora::rtc::kVdmMaxDeviceSize
static const int kVdmMaxDeviceSize
Definition: NGIAgoraVideoDeviceManager.h:20
agora::rtc::IVideoDeviceManagerObserver::~IVideoDeviceManagerObserver
virtual ~IVideoDeviceManagerObserver()
Definition: NGIAgoraVideoDeviceManager.h:48