| #include "StaticThreads.h" |
| 6 |
| 7 | namespace tgcalls { |
| 8 |
| 9 | class LogSinkImpl; |
| 10 |
| 11 | class Manager; |
| 12 | template <typename T> |
| 13 | class ThreadLocalObject; |
| 14 |
| 15 | class InstanceV2ReferenceImplInternal; |
| 16 |
| 17 | class InstanceV2ReferenceImpl final : public Instance { |
| 18 | public: |
| 19 | explicit InstanceV2ReferenceImpl(Descriptor &&descriptor); |
| 20 | ~InstanceV2ReferenceImpl() override; |
| 21 |
| 22 | void receiveSignalingData(const std::vector<uint8_t> &data) override; |
| 23 | void setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCapture) override; |
| 24 | void setRequestedVideoAspect(float aspect) override; |
| 25 | void setNetworkType(NetworkType networkType) override; |
| 26 | void setMuteMicrophone(bool muteMicrophone) override; |
| 27 | bool supportsVideo() override { |
| 28 | return true; |
| 29 | } |
| 30 | void setIncomingVideoOutput(std::weak_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) override; |
| 31 | void setAudioOutputGainControlEnabled(bool enabled) override; |
| 32 | void setEchoCancellationStrength(int strength) override; |
| 33 | void setAudioInputDevice(std::string id) override; |
| 34 | void setAudioOutputDevice(std::string id) override; |
| 35 | void setInputVolume(float level) override; |
| 36 | void setOutputVolume(float level) override; |
| 37 | void setAudioOutputDuckingEnabled(bool enabled) override; |
| 38 | void setIsLowBatteryLevel(bool isLowBatteryLevel) override; |
| 39 | static std::vector<std::string> GetVersions(); |
| 40 | static int GetConnectionMaxLayer(); |
| 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 | void sendVideoDeviceUpdated() override { |
| 48 | } |
| 49 |
| 50 | private: |
| 51 | std::shared_ptr<Threads> _threads; |
| 52 | std::unique_ptr<ThreadLocalObject<InstanceV2ReferenceImplInternal>> _internal; |
| 53 | std::unique_ptr<LogSinkImpl> _logSink; |
| 54 |
| 55 | }; |
| 56 |
| 57 | } // namespace tgcalls |
| 58 |
| 59 | #endif |
| 60 |