|
|
|
@ -104,27 +104,32 @@ typedef void* srs_rtmp_t;
|
|
|
|
|
typedef void* srs_amf0_t;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* create/destroy a rtmp protocol stack.
|
|
|
|
|
* @url rtmp url, for example:
|
|
|
|
|
* rtmp://localhost/live/livestream
|
|
|
|
|
*
|
|
|
|
|
* @return a rtmp handler, or NULL if error occured.
|
|
|
|
|
*/
|
|
|
|
|
* create/destroy a rtmp protocol stack.
|
|
|
|
|
* @url rtmp url, for example:
|
|
|
|
|
* rtmp://localhost/live/livestream
|
|
|
|
|
* @remark default timeout to 30s if not set by srs_rtmp_set_timeout.
|
|
|
|
|
*
|
|
|
|
|
* @return a rtmp handler, or NULL if error occured.
|
|
|
|
|
*/
|
|
|
|
|
extern srs_rtmp_t srs_rtmp_create(const char* url);
|
|
|
|
|
/**
|
|
|
|
|
* create rtmp with url, used for connection specified application.
|
|
|
|
|
* @param url the tcUrl, for exmple:
|
|
|
|
|
* rtmp://localhost/live
|
|
|
|
|
* @remark this is used to create application connection-oriented,
|
|
|
|
|
* for example, the bandwidth client used this, no stream specified.
|
|
|
|
|
*
|
|
|
|
|
* @return a rtmp handler, or NULL if error occured.
|
|
|
|
|
*/
|
|
|
|
|
* create rtmp with url, used for connection specified application.
|
|
|
|
|
* @param url the tcUrl, for exmple:
|
|
|
|
|
* rtmp://localhost/live
|
|
|
|
|
* @remark this is used to create application connection-oriented,
|
|
|
|
|
* for example, the bandwidth client used this, no stream specified.
|
|
|
|
|
* @remark default timeout to 30s if not set by srs_rtmp_set_timeout.
|
|
|
|
|
*
|
|
|
|
|
* @return a rtmp handler, or NULL if error occured.
|
|
|
|
|
*/
|
|
|
|
|
extern srs_rtmp_t srs_rtmp_create2(const char* url);
|
|
|
|
|
/**
|
|
|
|
|
* set socket timeout
|
|
|
|
|
* @param recv_timeout_ms the timeout for receiving messages in ms.
|
|
|
|
|
* @param send_timeout_ms the timeout for sending message in ms.
|
|
|
|
|
* @remark user can set timeout once srs_rtmp_create/srs_rtmp_create2,
|
|
|
|
|
* or before srs_rtmp_handshake or srs_rtmp_dns_resolve to connect to server.
|
|
|
|
|
* @remark default timeout to 30s if not set by srs_rtmp_set_timeout.
|
|
|
|
|
*
|
|
|
|
|
* @return 0, success; otherswise, failed.
|
|
|
|
|
*/
|
|
|
|
|