2020-08-14 16:58:22 +00:00
|
|
|
#ifndef TGCALLS_VIDEO_CAPTURER_INTERFACE_IMPL_H
|
|
|
|
#define TGCALLS_VIDEO_CAPTURER_INTERFACE_IMPL_H
|
|
|
|
|
|
|
|
#include "VideoCapturerInterface.h"
|
|
|
|
#include "VideoCameraCapturer.h"
|
|
|
|
#include "api/media_stream_interface.h"
|
|
|
|
|
|
|
|
namespace tgcalls {
|
|
|
|
|
|
|
|
class VideoCapturerInterfaceImpl final : public VideoCapturerInterface {
|
|
|
|
public:
|
2020-10-01 01:59:32 +00:00
|
|
|
VideoCapturerInterfaceImpl(rtc::scoped_refptr<webrtc::JavaVideoTrackSourceInterface> source, std::string deviceId, std::function<void(VideoState)> stateUpdated, std::shared_ptr<PlatformContext> platformContext);
|
2020-08-14 16:58:22 +00:00
|
|
|
|
|
|
|
void setState(VideoState state) override;
|
|
|
|
void setPreferredCaptureAspectRatio(float aspectRatio) override;
|
|
|
|
void setUncroppedOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) override;
|
2021-06-25 00:43:10 +00:00
|
|
|
int getRotation() override;
|
|
|
|
void setOnFatalError(std::function<void()> error) override;
|
2020-08-14 16:58:22 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::unique_ptr<VideoCameraCapturer> _capturer;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace tgcalls
|
|
|
|
|
|
|
|
#endif
|