69 void update(
Observable<std::shared_ptr<MediaFrame>>*
ob,
const std::shared_ptr<MediaFrame>& v)
override;
91 bool verifyActive(
const std::string&
id) {
return activeStream_ == id; }
109 if (!localInputs_.empty())
110 return *localInputs_.begin();
116 std::shared_ptr<SinkClient>&
getSink() {
return sink_; }
120 std::unique_lock
lk(audioOnlySourcesMtx_);
121 audioOnlySources_.insert({callId, streamId});
128 std::unique_lock
lk(audioOnlySourcesMtx_);
129 if (audioOnlySources_.erase({callId, streamId})) {
136 const std::string& callId,
137 const std::string& streamId);
142 std::lock_guard
lk(videoToStreamInfoMtx_);
143 auto it = videoToStreamInfo_.find(
frame);
144 if (
it == videoToStreamInfo_.end())
151 struct VideoMixerSource;
154 const std::shared_ptr<VideoFrame>& input,
155 std::unique_ptr<VideoMixerSource>& source);
157 void calc_position(std::unique_ptr<VideoMixerSource>& source,
const std::shared_ptr<VideoFrame>& input,
int index);
164 const std::string id_;
168 std::shared_mutex rwMutex_;
170 std::shared_ptr<SinkClient> sink_;
172 std::chrono::time_point<std::chrono::steady_clock> nextProcess_;
173 std::mutex localInputsMtx_;
174 std::vector<std::shared_ptr<VideoFrameActiveWriter>> localInputs_ {};
175 void stopInput(
const std::shared_ptr<VideoFrameActiveWriter>& input);
182 std::list<std::unique_ptr<VideoMixerSource>> sources_;
185 mutable std::mutex videoToStreamInfoMtx_ {};
186 std::map<Observable<std::shared_ptr<MediaFrame>>*, StreamInfo> videoToStreamInfo_ {};
188 std::mutex audioOnlySourcesMtx_;
189 std::set<std::pair<std::string, std::string>> audioOnlySources_;
190 std::string activeStream_ {};
192 std::atomic_int layoutUpdated_ {0};