AVCaptureDeviceManager.h [plain text]
#ifndef AVCaptureDeviceManager_h
#define AVCaptureDeviceManager_h
#if ENABLE(MEDIA_STREAM) && USE(AVFOUNDATION)
#include "CaptureDeviceManager.h"
#include "RealtimeMediaSource.h"
#include "RealtimeMediaSourceSupportedConstraints.h"
#include <wtf/NeverDestroyed.h>
#include <wtf/RetainPtr.h>
#include <wtf/text/WTFString.h>
OBJC_CLASS AVCaptureDevice;
OBJC_CLASS AVCaptureSession;
OBJC_CLASS NSArray;
OBJC_CLASS NSMutableArray;
OBJC_CLASS NSString;
OBJC_CLASS WebCoreAVCaptureDeviceManagerObserver;
namespace WebCore {
class AVCaptureDeviceManager final : public CaptureDeviceManager {
friend class NeverDestroyed<AVCaptureDeviceManager>;
public:
const Vector<CaptureDevice>& captureDevices() final;
static AVCaptureDeviceManager& singleton();
void refreshCaptureDevices();
private:
static bool isAvailable();
AVCaptureDeviceManager();
~AVCaptureDeviceManager() final;
void registerForDeviceNotifications();
Vector<CaptureDevice>& captureDevicesInternal();
void updateCachedAVCaptureDevices();
bool isMatchingExistingCaptureDevice(AVCaptureDevice*);
RetainPtr<WebCoreAVCaptureDeviceManagerObserver> m_objcObserver;
Vector<CaptureDevice> m_devices;
RetainPtr<NSMutableArray> m_avCaptureDevices;
bool m_notifyWhenDeviceListChanges { false };
};
}
#endif // ENABLE(MEDIA_STREAM)
#endif // AVCaptureDeviceManager_h