| 5 |
| //#include "api/video_track_source_proxy.h" |
| 6 |
| 7 | namespace tgcalls { |
| 8 |
| 9 | std::unique_ptr<webrtc::VideoEncoderFactory> FakeInterface::makeVideoEncoderFactory(bool preferHardwareEncoding, bool isScreencast) { |
| 10 | return webrtc::CreateBuiltinVideoEncoderFactory(); |
| 11 | } |
| 12 |
| 13 | std::unique_ptr<webrtc::VideoDecoderFactory> FakeInterface::makeVideoDecoderFactory() { |
| 14 | return webrtc::CreateBuiltinVideoDecoderFactory(); |
| 15 | } |
| 16 |
| 17 | webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface> FakeInterface::makeVideoSource(rtc::Thread *signalingThread, |
| 18 | rtc::Thread *workerThread) { |
| 19 | return nullptr; |
| 20 | } |
| 21 |
| 22 | bool FakeInterface::supportsEncoding(const std::string &codecName) { |
| 23 | return false; |
| 24 | //return (codecName == cricket::kH264CodecName) || (codecName == cricket::kVp8CodecName); |
| 25 | } |
| 26 |
| 27 | void FakeInterface::adaptVideoSource(webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface> videoSource, int width, |
| 28 | int height, int fps) { |
| 29 | } |
| 30 |
| 31 | std::unique_ptr<VideoCapturerInterface> FakeInterface::makeVideoCapturer( |
| 32 | webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface> source, std::string deviceId, |
| 33 | std::function<void(VideoState)> stateUpdated, std::function<void(PlatformCaptureInfo)> captureInfoUpdated, |
| 34 | std::shared_ptr<PlatformContext> platformContext, std::pair<int, int> &outResolution) { |
| 35 | return nullptr; |
| 36 | //return std::make_unique<VideoCapturerInterfaceImpl>(source, deviceId, stateUpdated, outResolution); |
| 37 | } |
| 38 |
| 39 | std::unique_ptr<PlatformInterface> CreatePlatformInterface() { |
| 40 | return std::make_unique<FakeInterface>(); |
| 41 | } |
| 42 |
| 43 | } // namespace tgcalls |
| 44 |