#ifndef VIDEO_CAPTURE_INTERFACE_IMPL_H #define VIDEO_CAPTURE_INTERFACE_IMPL_H #include "TgVoip.h" #include #include "ThreadLocalObject.h" #include "api/media_stream_interface.h" #ifdef TGVOIP_NAMESPACE namespace TGVOIP_NAMESPACE { #endif class VideoCapturerInterface; class TgVoipVideoCaptureInterfaceObject { public: TgVoipVideoCaptureInterfaceObject(); ~TgVoipVideoCaptureInterfaceObject(); void switchCamera(); void setIsVideoEnabled(bool isVideoEnabled); void setVideoOutput(std::shared_ptr> sink); void setIsActiveUpdated(std::function isActiveUpdated); public: rtc::scoped_refptr _videoSource; std::unique_ptr _videoCapturer; private: std::shared_ptr> _currentSink; std::function _isActiveUpdated; bool _useFrontCamera; bool _isVideoEnabled; }; class TgVoipVideoCaptureInterfaceImpl : public TgVoipVideoCaptureInterface { public: TgVoipVideoCaptureInterfaceImpl(); virtual ~TgVoipVideoCaptureInterfaceImpl(); virtual void switchCamera(); virtual void setIsVideoEnabled(bool isVideoEnabled); virtual void setVideoOutput(std::shared_ptr> sink); public: std::unique_ptr> _impl; }; #ifdef TGVOIP_NAMESPACE } #endif #endif