| 6 | #include "api/media_stream_interface.h" |
| 7 |
| 8 | namespace tgcalls { |
| 9 |
| 10 | class VideoCapturerInterfaceImpl final : public VideoCapturerInterface { |
| 11 | public: |
| 12 | VideoCapturerInterfaceImpl(rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source, bool useFrontCamera, std::function<void(VideoState)> stateUpdated); |
| 13 | ~VideoCapturerInterfaceImpl() override; |
| 14 |
| 15 | void setState(VideoState state) override; |
| 16 | void setPreferredCaptureAspectRatio(float aspectRatio) override; |
| 17 | void setUncroppedOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) override; |
| 18 |
| 19 | private: |
| 20 | rtc::scoped_refptr<webrtc::VideoTrackSourceInterface> _source; |
| 21 | std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> _uncroppedSink; |
| 22 | std::function<void(VideoState)> _stateUpdated; |
| 23 |
| 24 | }; |
| 25 |
| 26 | } // namespace tgcalls |
| 27 |
| 28 | #endif |
| 29 |