| #include "VideoCameraCapturer.h" |
| 6 | #include "api/media_stream_interface.h" |
| 7 |
| 8 | namespace tgcalls { |
| 9 |
| 10 | class VideoCapturerInterfaceImpl final : public VideoCapturerInterface { |
| 11 | public: |
| 12 | VideoCapturerInterfaceImpl( |
| 13 | rtc::scoped_refptr<webrtc::JavaVideoTrackSourceInterface> source, |
| 14 | std::string deviceId, |
| 15 | std::function<void(VideoState)> stateUpdated, |
| 16 | std::shared_ptr<PlatformContext> platformContext |
| 17 | ); |
| 18 |
| 19 | void setState(VideoState state) override; |
| 20 | void setPreferredCaptureAspectRatio(float aspectRatio) override; |
| 21 | void setUncroppedOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) override; |
| 22 | int getRotation() override; |
| 23 | void setOnFatalError(std::function<void()> error) override; |
| 24 |
| 25 | private: |
| 26 | std::unique_ptr<VideoCameraCapturer> _capturer; |
| 27 |
| 28 | }; |
| 29 |
| 30 | } // namespace tgcalls |
| 31 |
| 32 | #endif |
| 33 |