| 6 | namespace tgcalls { |
| 7 |
| 8 | class LogSinkImpl; |
| 9 |
| 10 | class Manager; |
| 11 | template <typename T> |
| 12 | class ThreadLocalObject; |
| 13 |
| 14 | class InstanceImpl final : public Instance { |
| 15 | public: |
| 16 | explicit InstanceImpl(Descriptor &&descriptor); |
| 17 | ~InstanceImpl() override; |
| 18 |
| 19 | static int GetConnectionMaxLayer(); |
| 20 | static std::vector<std::string> GetVersions(); |
| 21 |
| 22 | void receiveSignalingData(const std::vector<uint8_t> &data) override; |
| 23 | void setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCapture) override; |
| 24 | void sendVideoDeviceUpdated() override; |
| 25 | void setRequestedVideoAspect(float aspect) override; |
| 26 | void setNetworkType(NetworkType networkType) override; |
| 27 | void setMuteMicrophone(bool muteMicrophone) override; |
| 28 | bool supportsVideo() override { |
| 29 | return true; |
| 30 | } |
| 31 | void setIncomingVideoOutput(std::weak_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) override; |
| 32 | void setAudioOutputGainControlEnabled(bool enabled) override; |
| 33 | void setEchoCancellationStrength(int strength) override; |
| 34 | void setAudioInputDevice(std::string id) override; |
| 35 | void setAudioOutputDevice(std::string id) override; |
| 36 | void setInputVolume(float level) override; |
| 37 | void setOutputVolume(float level) override; |
| 38 | void setAudioOutputDuckingEnabled(bool enabled) override; |
| 39 | void addExternalAudioSamples(std::vector<uint8_t> &&samples) override; |
| 40 | void setIsLowBatteryLevel(bool isLowBatteryLevel) override; |
| 41 | std::string getLastError() override; |
| 42 | std::string getDebugInfo() override; |
| 43 | int64_t getPreferredRelayId() override; |
| 44 | TrafficStats getTrafficStats() override; |
| 45 | PersistentState getPersistentState() override; |
| 46 | void stop(std::function<void(FinalState)> completion) override; |
| 47 |
| 48 | private: |
| 49 | std::unique_ptr<ThreadLocalObject<Manager>> _manager; |
| 50 | std::unique_ptr<LogSinkImpl> _logSink; |
| 51 |
| 52 | }; |
| 53 |
| 54 | } // namespace tgcalls |
| 55 |
| 56 | #endif |
| 57 |