#ifndef UVCDEVICE_MANAGER_H #define UVCDEVICE_MANAGER_H #include "../libuvc/libuvc.h" #include "../MppDecoder/MppDecoder.h" #include #include #include #include "UVCCallBack.h" #include #include "UVCDevice.h" #include #include #include "../gpio_explorer.hpp" #include "../DataManager/DataManager.h" class UVCManager { public: static UVCManager &getInstance() { static UVCManager instance; return instance; } void init(); int deliverFrameInCallBack(uvc_device_handle_t *devh); void startAllStreaming(); void stopAllStreaming(); uvc_context_t *getContext() { return ctx; } private: UVCManager() { uvc_init(&ctx, NULL); } ~UVCManager() { uvc_exit(ctx); } UVCManager(const UVCManager &) = delete; UVCManager &operator=(const UVCManager &) = delete; uvc_context_t *ctx; // device list uvc_device_t **deviceList; // device number int deviceNum; // the UVC device list is been managed by UVCManager std::list uvcDeviceList; // std::shared_ptr m_GpioExplorer; }; #endif // UVCDEVICE_MANAGER_H