mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Add callback for all consumers done
This commit is contained in:
parent
88d4314a3c
commit
ab221fa842
4 changed files with 25 additions and 0 deletions
|
@ -406,6 +406,11 @@ void SrsRtcStream::on_consumer_destroy(SrsRtcConsumer* consumer)
|
|||
if (it != consumers.end()) {
|
||||
consumers.erase(it);
|
||||
}
|
||||
|
||||
// When all consumers finished, notify publisher to handle it.
|
||||
if (publish_stream_ && consumers.empty()) {
|
||||
publish_stream_->on_consumers_finished();
|
||||
}
|
||||
}
|
||||
|
||||
bool SrsRtcStream::can_publish()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue