2020-08-14 16:58:22 +00:00
|
|
|
#include "VideoCapturerInterfaceImpl.h"
|
|
|
|
|
2021-06-25 00:43:10 +00:00
|
|
|
#include <memory>
|
|
|
|
|
2020-08-14 16:58:22 +00:00
|
|
|
#include "VideoCameraCapturer.h"
|
|
|
|
|
|
|
|
namespace tgcalls {
|
|
|
|
|
2020-10-01 01:59:32 +00:00
|
|
|
VideoCapturerInterfaceImpl::VideoCapturerInterfaceImpl(rtc::scoped_refptr<webrtc::JavaVideoTrackSourceInterface> source, std::string deviceId, std::function<void(VideoState)> stateUpdated, std::shared_ptr<PlatformContext> platformContext) {
|
2021-06-25 00:43:10 +00:00
|
|
|
_capturer = std::make_unique<VideoCameraCapturer>(source, deviceId, stateUpdated, platformContext);
|
2020-08-14 16:58:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void VideoCapturerInterfaceImpl::setState(VideoState state) {
|
|
|
|
_capturer->setState(state);
|
|
|
|
}
|
|
|
|
|
|
|
|
void VideoCapturerInterfaceImpl::setPreferredCaptureAspectRatio(float aspectRatio) {
|
|
|
|
_capturer->setPreferredCaptureAspectRatio(aspectRatio);
|
|
|
|
}
|
|
|
|
|
|
|
|
void VideoCapturerInterfaceImpl::setUncroppedOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) {
|
|
|
|
_capturer->setUncroppedSink(sink);
|
|
|
|
}
|
|
|
|
|
2021-06-25 00:43:10 +00:00
|
|
|
int VideoCapturerInterfaceImpl::VideoCapturerInterfaceImpl::getRotation() {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void VideoCapturerInterfaceImpl::setOnFatalError(std::function<void()> error) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-08-14 16:58:22 +00:00
|
|
|
} // namespace tgcalls
|