1
0
Fork 0
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:
winlin 2014-06-10 17:39:12 +08:00
parent a639eb0596
commit cccc483ab3
3 changed files with 29 additions and 1 deletions

View file

@ -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;

View file

@ -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