mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine srs-librtmp, set the schema, rather that connect app3
This commit is contained in:
parent
4e96c443d8
commit
89a5fa69d1
5 changed files with 65 additions and 61 deletions
|
@ -79,10 +79,13 @@ extern "C"{
|
|||
* srs_url_schema_vis : rtmp://ip:port/app/stream?vhost=xxx
|
||||
* srs_url_schema_vis2 : rtmp://ip:port/app/stream?domain=xxx
|
||||
*/
|
||||
enum srs_url_schema{
|
||||
enum srs_url_schema
|
||||
{
|
||||
// Forbidden.
|
||||
srs_url_schema_forbidden = 0,
|
||||
// Normal RTMP URL, the vhost put in host field, using DNS to resolve the server ip.
|
||||
// For example, rtmp://vhost:port/app/stream
|
||||
srs_url_schema_normal = 0,
|
||||
srs_url_schema_normal,
|
||||
// VIA(vhost in app), the vhost put in app field.
|
||||
// For example, rtmp://ip:port/vhost/app/stream
|
||||
srs_url_schema_via,
|
||||
|
@ -225,16 +228,13 @@ extern int srs_rtmp_connect_app2(srs_rtmp_t rtmp,
|
|||
char srs_primary[128], char srs_authors[128],
|
||||
char srs_version[32], int* srs_id, int* srs_pid
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* connect to rtmp vhost/app
|
||||
* category: publish/play
|
||||
* previous: handshake
|
||||
* next: publish or play
|
||||
*
|
||||
* @return 0, success; otherswise, failed.
|
||||
*/
|
||||
extern int srs_rtmp_connect_app3(srs_rtmp_t rtmp, enum srs_url_schema sus);
|
||||
* Set the schema of URL when connect to server.
|
||||
* @param schema, The schema of URL, @see srs_url_schema.
|
||||
* @return 0, success; otherswise, failed.
|
||||
*/
|
||||
extern int srs_rtmp_set_schema(srs_rtmp_t rtmp, enum srs_url_schema schema);
|
||||
|
||||
/**
|
||||
* play a live/vod stream.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue