#ifndef TGCALLS_VIDEO_CAPTURER_INTERFACE_IMPL_H #define TGCALLS_VIDEO_CAPTURER_INTERFACE_IMPL_H #include "VideoCapturerInterface.h" #ifdef TGCALLS_UWP_DESKTOP #include "platform/uwp/UwpContext.h" #include "platform/uwp/UwpScreenCapturer.h" #endif // TGCALLS_UWP_DESKTOP #include "api/media_stream_interface.h" namespace tgcalls { class DesktopCaptureSourceHelper; class VideoCameraCapturer; class PlatformContext; class VideoCapturerInterfaceImpl final : public VideoCapturerInterface { public: VideoCapturerInterfaceImpl( rtc::scoped_refptr source, std::string deviceId, std::function stateUpdated, std::shared_ptr platformContext, std::pair &outResolution); ~VideoCapturerInterfaceImpl() override; void setState(VideoState state) override; void setPreferredCaptureAspectRatio(float aspectRatio) override; void setUncroppedOutput(std::shared_ptr> sink) override; int getRotation() override { return 0; } void setOnFatalError(std::function error) override; void setOnPause(std::function pause) override; private: rtc::scoped_refptr _source; std::shared_ptr> _sink; #ifdef TGCALLS_UWP_DESKTOP std::unique_ptr _screenCapturer; #else // TGCALLS_UWP_DESKTOP std::unique_ptr _desktopCapturer; #endif // TGCALLS_UWP_DESKTOP std::unique_ptr _cameraCapturer; std::shared_ptr> _uncroppedSink; std::function _stateUpdated; std::function _onFatalError; }; } // namespace tgcalls #endif