#ifndef TGCALLS_VIDEO_CAMERA_CAPTURER_H #define TGCALLS_VIDEO_CAMERA_CAPTURER_H #include "api/scoped_refptr.h" #include "api/media_stream_interface.h" #include "modules/video_capture/video_capture.h" #include "sdk/android/native_api/jni/scoped_java_ref.h" #include "sdk/android/native_api/video/video_source.h" #include "VideoCaptureInterface.h" #include #include #include #include namespace tgcalls { class VideoCameraCapturer; class VideoCameraCapturer { public: VideoCameraCapturer(rtc::scoped_refptr source, bool useFrontCamera, std::function stateUpdated, std::shared_ptr platformContext); void setState(VideoState state); void setPreferredCaptureAspectRatio(float aspectRatio); void setUncroppedSink(std::shared_ptr> sink); webrtc::ScopedJavaLocalRef GetJavaVideoCapturerObserver(JNIEnv* env); private: rtc::scoped_refptr _source; std::function _stateUpdated; VideoState _state; std::shared_ptr _platformContext; float _aspectRatio; std::shared_ptr> _uncroppedSink; }; } // namespace tgcalls #endif