Nagram/TMessagesProj/jni/voip/tgcalls/InstanceImpl.h

57 lines
1.8 KiB
C
Raw Normal View History

2020-08-14 16:58:22 +00:00
#ifndef TGCALLS_INSTANCE_IMPL_H
#define TGCALLS_INSTANCE_IMPL_H
#include "Instance.h"
namespace tgcalls {
class LogSinkImpl;
class Manager;
template <typename T>
class ThreadLocalObject;
class InstanceImpl final : public Instance {
public:
explicit InstanceImpl(Descriptor &&descriptor);
~InstanceImpl() override;
static int GetConnectionMaxLayer();
2020-08-15 21:06:36 +00:00
static std::vector<std::string> GetVersions();
2020-08-14 16:58:22 +00:00
void receiveSignalingData(const std::vector<uint8_t> &data) override;
void setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCapture) override;
2021-08-31 19:06:39 +00:00
void sendVideoDeviceUpdated() override;
2020-10-01 01:59:32 +00:00
void setRequestedVideoAspect(float aspect) override;
2020-08-14 16:58:22 +00:00
void setNetworkType(NetworkType networkType) override;
void setMuteMicrophone(bool muteMicrophone) override;
2020-10-01 01:59:32 +00:00
bool supportsVideo() override {
return true;
}
2020-08-14 16:58:22 +00:00
void setIncomingVideoOutput(std::shared_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink) override;
void setAudioOutputGainControlEnabled(bool enabled) override;
void setEchoCancellationStrength(int strength) override;
void setAudioInputDevice(std::string id) override;
void setAudioOutputDevice(std::string id) override;
void setInputVolume(float level) override;
void setOutputVolume(float level) override;
void setAudioOutputDuckingEnabled(bool enabled) override;
2021-07-30 14:49:55 +00:00
void addExternalAudioSamples(std::vector<uint8_t> &&samples) override;
2020-08-14 16:58:22 +00:00
void setIsLowBatteryLevel(bool isLowBatteryLevel) override;
std::string getLastError() override;
std::string getDebugInfo() override;
int64_t getPreferredRelayId() override;
TrafficStats getTrafficStats() override;
PersistentState getPersistentState() override;
2020-08-15 21:06:36 +00:00
void stop(std::function<void(FinalState)> completion) override;
2020-08-14 16:58:22 +00:00
private:
std::unique_ptr<ThreadLocalObject<Manager>> _manager;
std::unique_ptr<LogSinkImpl> _logSink;
};
} // namespace tgcalls
#endif