| 6 | #include "sdk/objc/native/src/objc_video_track_source.h" |
| 7 | //#include "api/video_track_source_proxy.h" |
| 8 |
| 9 | @interface VideoCapturerInterfaceImplHolder : NSObject |
| 10 |
| 11 | @property (nonatomic) void *reference; |
| 12 |
| 13 | @end |
| 14 |
| 15 | namespace tgcalls { |
| 16 |
| 17 | struct PlatformCaptureInfo; |
| 18 |
| 19 | class VideoCapturerInterfaceImpl : public VideoCapturerInterface { |
| 20 | public: |
| 21 | VideoCapturerInterfaceImpl(webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source, std::string deviceId, std::function<void(VideoState)> stateUpdated, std::function<void(PlatformCaptureInfo)> captureInfoUpdated, std::pair<int, int> &outResolution); |
| 22 | ~VideoCapturerInterfaceImpl() override; |
| 23 |
| 24 | void setState(VideoState state) override; |
| 25 | void setPreferredCaptureAspectRatio(float aspectRatio) override; |
| 26 | void withNativeImplementation(std::function<void(void *)> completion) override; |
| 27 | void setUncroppedOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) override; |
| 28 | void setOnFatalError(std::function<void()> error) override; |
| 29 | void setOnPause(std::function<void(bool)> pause) override; |
| 30 | int getRotation() override; |
| 31 |
| 32 | id getInternalReference(); |
| 33 |
| 34 | private: |
| 35 | webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface> _source; |
| 36 | VideoCapturerInterfaceImplHolder *_implReference; |
| 37 | }; |
| 38 |
| 39 | } // namespace tgcalls |
| 40 |
| 41 | #endif |
| 42 |