mirror of
https://github.com/zotanmew/nginx-rtmp-module.git
synced 2024-05-08 22:01:07 +02:00
added transaction support to RTMP connect command
This commit is contained in:
parent
427614a35a
commit
b063daecdb
|
@ -96,10 +96,9 @@ ngx_rtmp_cmd_connect_init(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
|
|||
|
||||
static ngx_rtmp_amf_elt_t in_elts[] = {
|
||||
|
||||
/* transaction in always 1 */
|
||||
{ NGX_RTMP_AMF_NUMBER,
|
||||
ngx_null_string,
|
||||
NULL, 0 },
|
||||
&v.trans, 0 },
|
||||
|
||||
{ NGX_RTMP_AMF_OBJECT,
|
||||
ngx_null_string,
|
||||
|
@ -128,7 +127,7 @@ ngx_rtmp_cmd_connect(ngx_rtmp_session_t *s, ngx_rtmp_connect_t *v)
|
|||
size_t len;
|
||||
ngx_rtmp_header_t h;
|
||||
|
||||
static double trans = 1;
|
||||
static double trans;
|
||||
static double capabilities = NGX_RTMP_CAPABILITIES;
|
||||
|
||||
static ngx_rtmp_amf_elt_t out_obj[] = {
|
||||
|
@ -190,6 +189,8 @@ ngx_rtmp_cmd_connect(ngx_rtmp_session_t *s, ngx_rtmp_connect_t *v)
|
|||
v->app, v->flashver, v->swf_url, v->tc_url, v->page_url,
|
||||
(uint32_t)v->acodecs, (uint32_t)v->vcodecs);
|
||||
|
||||
trans = v->trans;
|
||||
|
||||
/* fill session parameters */
|
||||
s->connected = 1;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
/* TODO: improve string sizes */
|
||||
|
||||
typedef struct {
|
||||
double trans;
|
||||
u_char app[128];
|
||||
u_char flashver[32];
|
||||
u_char swf_url[256];
|
||||
|
|
Loading…
Reference in a new issue