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

Merge branch '2.0release' into develop

This commit is contained in:
winlin 2016-08-10 22:30:05 +08:00
commit 31a1b7bed2
2 changed files with 43 additions and 17 deletions

View file

@ -102,29 +102,34 @@ extern int srs_version_revision();
// the RTMP handler.
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.
*/