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

refine hijack io for srslibrtmp

This commit is contained in:
winlin 2017-01-18 16:23:59 +08:00
parent e8c48ac8f8
commit 7acc3aca16
6 changed files with 14 additions and 13 deletions

View file

@ -992,7 +992,7 @@ typedef void* srs_hijack_io_t;
extern srs_hijack_io_t srs_hijack_io_get(srs_rtmp_t rtmp);
#endif
// define the following macro and functions in your module to hijack the io.
// the example @see https://github.com/winlinvip/st-load
// the example @see https://github.com/ossrs/srs-bench
// which use librtmp but use its own io(use st also).
#ifdef SRS_HIJACK_IO
/**
@ -1006,9 +1006,10 @@ typedef void* srs_hijack_io_t;
extern void srs_hijack_io_destroy(srs_hijack_io_t ctx);
/**
* create socket, not connect yet.
* @param owner, the rtmp context which create this socket.
* @return 0, success; otherswise, failed.
*/
extern int srs_hijack_io_create_socket(srs_hijack_io_t ctx);
extern int srs_hijack_io_create_socket(srs_hijack_io_t ctx, srs_rtmp_t owner);
/**
* connect socket at server_ip:port.
* @return 0, success; otherswise, failed.