mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add stream status to api.
This commit is contained in:
parent
ac13817aae
commit
7fc1cda392
5 changed files with 35 additions and 4 deletions
|
@ -1917,7 +1917,8 @@ int SrsSource::on_publish()
|
|||
srs_error("handle on publish failed. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
stat->on_stream_publish(_req);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1958,6 +1959,8 @@ void SrsSource::on_unpublish()
|
|||
|
||||
// notify the handler.
|
||||
srs_assert(handler);
|
||||
SrsStatistic* stat = SrsStatistic::instance();
|
||||
stat->on_stream_close(_req);
|
||||
handler->on_unpublish(this, _req);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue