mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add bytes statistic for librtmp
This commit is contained in:
parent
a639eb0596
commit
cccc483ab3
3 changed files with 29 additions and 1 deletions
|
@ -451,6 +451,20 @@ int64_t srs_get_time_ms()
|
|||
return srs_get_system_time_ms();
|
||||
}
|
||||
|
||||
int64_t srs_get_nsend_bytes(srs_rtmp_t rtmp)
|
||||
{
|
||||
srs_assert(rtmp != NULL);
|
||||
Context* context = (Context*)rtmp;
|
||||
return context->rtmp->get_send_bytes();
|
||||
}
|
||||
|
||||
int64_t srs_get_nrecv_bytes(srs_rtmp_t rtmp)
|
||||
{
|
||||
srs_assert(rtmp != NULL);
|
||||
Context* context = (Context*)rtmp;
|
||||
return context->rtmp->get_recv_bytes();
|
||||
}
|
||||
|
||||
struct FlvContext
|
||||
{
|
||||
SrsFileStream fs;
|
||||
|
|
|
@ -157,6 +157,8 @@ int srs_version_revision();
|
|||
* utilities
|
||||
*/
|
||||
int64_t srs_get_time_ms();
|
||||
int64_t srs_get_nsend_bytes(srs_rtmp_t rtmp);
|
||||
int64_t srs_get_nrecv_bytes(srs_rtmp_t rtmp);
|
||||
|
||||
/**
|
||||
* flv codec
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue