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
|
@ -35,6 +35,9 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <srs_kernel_codec.hpp>
|
||||
|
||||
#define STATISTIC_STREAM_STATUS_PUBLISHING "publishing"
|
||||
#define STATISTIC_STREAM_STATUS_IDLING "idling"
|
||||
|
||||
class SrsKbps;
|
||||
class SrsRequest;
|
||||
class SrsConnection;
|
||||
|
@ -62,6 +65,7 @@ public:
|
|||
std::string app;
|
||||
std::string stream;
|
||||
std::string url;
|
||||
std::string status;
|
||||
public:
|
||||
/**
|
||||
* stream total kbps.
|
||||
|
@ -90,6 +94,10 @@ public:
|
|||
SrsStatisticStream();
|
||||
virtual ~SrsStatisticStream();
|
||||
public:
|
||||
/**
|
||||
* publish the stream.
|
||||
*/
|
||||
virtual void publish();
|
||||
/**
|
||||
* close the stream.
|
||||
*/
|
||||
|
@ -137,6 +145,10 @@ public:
|
|||
SrsAacObjectType aac_object
|
||||
);
|
||||
/**
|
||||
* when publish stream.
|
||||
*/
|
||||
virtual void on_stream_publish(SrsRequest* req);
|
||||
/**
|
||||
* when close stream.
|
||||
*/
|
||||
virtual void on_stream_close(SrsRequest* req);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue