1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

refine the srs-librtmp, add hijack get the object.

This commit is contained in:
winlin 2014-12-02 14:02:28 +08:00
parent a94dbecdc4
commit b28dc7364e
4 changed files with 38 additions and 5 deletions

View file

@ -534,7 +534,10 @@ srs_rtmp_t srs_rtmp_create2(const char* url)
void srs_rtmp_destroy(srs_rtmp_t rtmp)
{
srs_assert(rtmp != NULL);
if (!rtmp) {
return;
}
Context* context = (Context*)rtmp;
srs_freep(context);
@ -2424,6 +2427,23 @@ const char* srs_human_format_time()
return buf;
}
#ifdef SRS_HIJACK_IO
srs_hijack_io_t srs_hijack_io_get(srs_rtmp_t rtmp)
{
if (!rtmp) {
return NULL;
}
Context* context = (Context*)rtmp;
if (!context->skt) {
return NULL;
}
return context->skt->hijack_io();
}
#endif
#ifdef __cplusplus
}
#endif