NekoX/TMessagesProj/jni/voip/tgcalls/group/GroupInstanceCustomImpl.h

58 lines
1.8 KiB
C
Raw Normal View History

2021-03-19 11:25:58 +01:00
#ifndef TGCALLS_GROUP_INSTANCE_CUSTOM_IMPL_H
#define TGCALLS_GROUP_INSTANCE_CUSTOM_IMPL_H
#include <functional>
#include <vector>
#include <string>
#include <memory>
#include <map>
#include "../Instance.h"
#include "GroupInstanceImpl.h"
namespace tgcalls {
class LogSinkImpl;
class GroupInstanceCustomInternal;
class Threads;
class GroupInstanceCustomImpl final : public GroupInstanceInterface {
public:
explicit GroupInstanceCustomImpl(GroupInstanceDescriptor &&descriptor);
~GroupInstanceCustomImpl();
void stop();
void setConnectionMode(GroupConnectionMode connectionMode, bool keepBroadcastIfWasEnabled);
2021-06-25 02:43:10 +02:00
void emitJoinPayload(std::function<void(GroupJoinPayload const &)> completion);
void setJoinResponsePayload(std::string const &payload);
2021-03-19 11:25:58 +01:00
void removeSsrcs(std::vector<uint32_t> ssrcs);
2021-06-25 02:43:10 +02:00
void removeIncomingVideoSource(uint32_t ssrc);
2021-03-19 11:25:58 +01:00
void setIsMuted(bool isMuted);
2021-06-25 02:43:10 +02:00
void setIsNoiseSuppressionEnabled(bool isNoiseSuppressionEnabled);
void setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCapture);
void setVideoSource(std::function<webrtc::VideoTrackSourceInterface*()> getVideoSource);
2021-03-19 11:25:58 +01:00
void setAudioOutputDevice(std::string id);
void setAudioInputDevice(std::string id);
2021-07-15 16:24:57 +02:00
void addExternalAudioSamples(std::vector<uint8_t> &&samples);
2021-03-19 11:25:58 +01:00
2021-06-25 02:43:10 +02:00
void addIncomingVideoOutput(std::string const &endpointId, std::weak_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink);
2021-03-19 11:25:58 +01:00
void setVolume(uint32_t ssrc, double volume);
2021-06-25 02:43:10 +02:00
void setRequestedVideoChannels(std::vector<VideoChannelDescription> &&requestedVideoChannels);
2021-03-19 11:25:58 +01:00
2021-08-05 22:35:18 +02:00
void getStats(std::function<void(GroupInstanceStats)> completion);
2021-03-19 11:25:58 +01:00
private:
std::shared_ptr<Threads> _threads;
std::unique_ptr<ThreadLocalObject<GroupInstanceCustomInternal>> _internal;
std::unique_ptr<LogSinkImpl> _logSink;
};
} // namespace tgcalls
#endif