| #include <vector> |
| 6 | #include <string> |
| 7 | #include <memory> |
| 8 | #include <map> |
| 9 |
| 10 | #include "../Instance.h" |
| 11 | #include "GroupInstanceImpl.h" |
| 12 |
| 13 | namespace tgcalls { |
| 14 |
| 15 | class LogSinkImpl; |
| 16 | class GroupInstanceCustomInternal; |
| 17 | class Threads; |
| 18 |
| 19 | class GroupInstanceCustomImpl final : public GroupInstanceInterface { |
| 20 | public: |
| 21 | explicit GroupInstanceCustomImpl(GroupInstanceDescriptor &&descriptor); |
| 22 | ~GroupInstanceCustomImpl(); |
| 23 |
| 24 | void stop(); |
| 25 |
| 26 | void setConnectionMode(GroupConnectionMode connectionMode, bool keepBroadcastIfWasEnabled); |
| 27 |
| 28 | void emitJoinPayload(std::function<void(GroupJoinPayload)> completion); |
| 29 | void setJoinResponsePayload(GroupJoinResponsePayload payload, std::vector<tgcalls::GroupParticipantDescription> &&participants); |
| 30 | void addParticipants(std::vector<GroupParticipantDescription> &&participants); |
| 31 | void removeSsrcs(std::vector<uint32_t> ssrcs); |
| 32 |
| 33 | void setIsMuted(bool isMuted); |
| 34 | void setVideoCapture(std::shared_ptr<VideoCaptureInterface> videoCapture, std::function<void(GroupJoinPayload)> completion); |
| 35 | void setAudioOutputDevice(std::string id); |
| 36 | void setAudioInputDevice(std::string id); |
| 37 |
| 38 | void addIncomingVideoOutput(uint32_t ssrc, std::weak_ptr<rtc::VideoSinkInterface<webrtc::VideoFrame>> sink); |
| 39 |
| 40 | void setVolume(uint32_t ssrc, double volume); |
| 41 | void setFullSizeVideoSsrc(uint32_t ssrc); |
| 42 |
| 43 | private: |
| 44 | std::shared_ptr<Threads> _threads; |
| 45 | std::unique_ptr<ThreadLocalObject<GroupInstanceCustomInternal>> _internal; |
| 46 | std::unique_ptr<LogSinkImpl> _logSink; |
| 47 |
| 48 | }; |
| 49 |
| 50 | } // namespace tgcalls |
| 51 |
| 52 | #endif |
| 53 |