#ifndef TGCALLS_DARWIN_INTERFACE_H #define TGCALLS_DARWIN_INTERFACE_H #include "platform/PlatformInterface.h" #import namespace tgcalls { class DarwinVideoFrame : public PlatformVideoFrame { public: DarwinVideoFrame(CVPixelBufferRef pixelBuffer); virtual ~DarwinVideoFrame(); CVPixelBufferRef pixelBuffer() const { return _pixelBuffer; } private: CVPixelBufferRef _pixelBuffer = nullptr; }; class DarwinInterface : public PlatformInterface { public: std::unique_ptr createNetworkMonitorFactory() override; void configurePlatformAudio(int numChannels) override; std::unique_ptr makeVideoEncoderFactory(bool preferHardwareEncoding, bool isScreencast) override; std::unique_ptr makeVideoDecoderFactory() override; bool supportsEncoding(const std::string &codecName) override; webrtc::scoped_refptr makeVideoSource(rtc::Thread *signalingThread, rtc::Thread *workerThread) override; virtual void adaptVideoSource(webrtc::scoped_refptr videoSource, int width, int height, int fps) override; std::unique_ptr makeVideoCapturer(webrtc::scoped_refptr source, std::string deviceId, std::function stateUpdated, std::function captureInfoUpdated, std::shared_ptr platformContext, std::pair &outResolution) override; virtual webrtc::scoped_refptr wrapAudioDeviceModule(webrtc::scoped_refptr module) override; virtual void setupVideoDecoding(AVCodecContext *codecContext) override; virtual webrtc::scoped_refptr createPlatformFrameFromData(AVFrame const *frame) override; }; } // namespace tgcalls #endif