70 const std::shared_ptr<MediaFrame>& v)
override;
92 bool verifyActive(
const std::string&
id) {
return activeStream_ == id; }
110 if (!localInputs_.empty())
111 return *localInputs_.begin();
117 std::shared_ptr<SinkClient>&
getSink() {
return sink_; }
121 std::unique_lock
lk(audioOnlySourcesMtx_);
122 audioOnlySources_.insert({callId, streamId});
129 std::unique_lock
lk(audioOnlySourcesMtx_);
130 if (audioOnlySources_.erase({callId, streamId})) {
137 const std::string& callId,
138 const std::string& streamId);
143 std::lock_guard
lk(videoToStreamInfoMtx_);
144 auto it = videoToStreamInfo_.find(
frame);
145 if (
it == videoToStreamInfo_.end())
152 struct VideoMixerSource;
155 const std::shared_ptr<VideoFrame>& input,
156 std::unique_ptr<VideoMixerSource>& source);
158 void calc_position(std::unique_ptr<VideoMixerSource>& source,
159 const std::shared_ptr<VideoFrame>& input,
167 const std::string id_;
171 std::shared_mutex rwMutex_;
173 std::shared_ptr<SinkClient> sink_;
175 std::chrono::time_point<std::chrono::steady_clock> nextProcess_;
176 std::mutex localInputsMtx_;
177 std::vector<std::shared_ptr<VideoFrameActiveWriter>> localInputs_ {};
178 void stopInput(
const std::shared_ptr<VideoFrameActiveWriter>& input);
185 std::list<std::unique_ptr<VideoMixerSource>> sources_;
188 mutable std::mutex videoToStreamInfoMtx_ {};
189 std::map<Observable<std::shared_ptr<MediaFrame>>*, StreamInfo> videoToStreamInfo_ {};
191 std::mutex audioOnlySourcesMtx_;
192 std::set<std::pair<std::string, std::string>> audioOnlySources_;
193 std::string activeStream_ {};
195 std::atomic_int layoutUpdated_ {0};