Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: arut/nginx-rtmp-module
base: 101b43a478
...
head fork: arut/nginx-rtmp-module
compare: c65e51d61b
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on Oct 20, 2012
@arut removed legacy constants cb4623a
Commits on Oct 24, 2012
@arut fixed rtmp constants c65e51d
View
44 ngx_rtmp_cmd_module.c
@@ -214,7 +214,7 @@ ngx_rtmp_cmd_connect(ngx_rtmp_session_t *s, ngx_rtmp_connect_t *v)
s->connected = 1;
ngx_memzero(&h, sizeof(h));
- h.csid = NGX_RTMP_CMD_CSID_AMF_INI;
+ h.csid = NGX_RTMP_CSID_AMF_INI;
h.type = NGX_RTMP_MSG_AMF_CMD;
@@ -321,10 +321,10 @@ ngx_rtmp_cmd_create_stream(ngx_rtmp_session_t *s, ngx_rtmp_create_stream_t *v)
};
trans = v->trans;
- stream = NGX_RTMP_CMD_MSID;
+ stream = NGX_RTMP_MSID;
ngx_memzero(&h, sizeof(h));
- h.csid = NGX_RTMP_CMD_CSID_AMF_INI;
+ h.csid = NGX_RTMP_CSID_AMF_INI;
h.type = NGX_RTMP_MSG_AMF_CMD;
ngx_log_error(NGX_LOG_INFO, s->connection->log, 0,
@@ -369,7 +369,7 @@ ngx_rtmp_cmd_close_stream_init(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
static ngx_int_t
ngx_rtmp_cmd_close_stream(ngx_rtmp_session_t *s, ngx_rtmp_close_stream_t *v)
{
- ngx_rtmp_send_user_stream_eof(s, NGX_RTMP_CMD_MSID);
+ ngx_rtmp_send_user_stream_eof(s, NGX_RTMP_MSID);
/* Whatever happens return OK
* since we should be careful with destruction */
@@ -537,8 +537,8 @@ ngx_rtmp_cmd_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
/* send onStatus reply */
memset(&h, 0, sizeof(h));
h.type = NGX_RTMP_MSG_AMF_CMD;
- h.csid = NGX_RTMP_CMD_CSID_AMF;
- h.msid = NGX_RTMP_CMD_MSID;
+ h.csid = NGX_RTMP_CSID_AMF;
+ h.msid = NGX_RTMP_MSID;
if (ngx_rtmp_send_amf(s, &h, out_elts,
sizeof(out_elts) / sizeof(out_elts[0])) != NGX_OK)
@@ -630,8 +630,8 @@ ngx_rtmp_cmd_fcpublish(ngx_rtmp_session_t *s, ngx_rtmp_fcpublish_t *v)
/* send onFCPublish reply */
memset(&h, 0, sizeof(h));
h.type = NGX_RTMP_MSG_AMF_CMD;
- h.csid = NGX_RTMP_CMD_CSID_AMF;
- h.msid = NGX_RTMP_CMD_MSID;
+ h.csid = NGX_RTMP_CSID_AMF;
+ h.msid = NGX_RTMP_MSID;
if (ngx_rtmp_send_amf(s, &h, out_elts,
sizeof(out_elts) / sizeof(out_elts[0])) != NGX_OK)
@@ -818,15 +818,15 @@ ngx_rtmp_cmd_play(ngx_rtmp_session_t *s, ngx_rtmp_play_t *v)
/* send onStatus reply */
memset(&h, 0, sizeof(h));
h.type = NGX_RTMP_MSG_AMF_CMD;
- h.csid = NGX_RTMP_CMD_CSID_AMF;
- h.msid = NGX_RTMP_CMD_MSID;
+ h.csid = NGX_RTMP_CSID_AMF;
+ h.msid = NGX_RTMP_MSID;
/*
- if (ngx_rtmp_send_user_recorded(s, NGX_RTMP_CMD_MSID) != NGX_OK) {
+ if (ngx_rtmp_send_user_recorded(s, NGX_RTMP_MSID) != NGX_OK) {
return NGX_ERROR;
}*/
- if (ngx_rtmp_send_user_stream_begin(s, NGX_RTMP_CMD_MSID) != NGX_OK) {
+ if (ngx_rtmp_send_user_stream_begin(s, NGX_RTMP_MSID) != NGX_OK) {
return NGX_ERROR;
}
@@ -943,8 +943,8 @@ ngx_rtmp_cmd_fcsubscribe(ngx_rtmp_session_t *s, ngx_rtmp_fcsubscribe_t *v)
/* send onFCSubscribe reply */
memset(&h, 0, sizeof(h));
h.type = NGX_RTMP_MSG_AMF_CMD;
- h.csid = NGX_RTMP_CMD_CSID_AMF;
- h.msid = NGX_RTMP_CMD_MSID;
+ h.csid = NGX_RTMP_CSID_AMF;
+ h.msid = NGX_RTMP_MSID;
if (ngx_rtmp_send_amf(s, &h, out_elts,
sizeof(out_elts) / sizeof(out_elts[0])) != NGX_OK)
@@ -1048,13 +1048,13 @@ ngx_rtmp_cmd_pause(ngx_rtmp_session_t *s, ngx_rtmp_pause_t *v)
/* send onStatus reply */
ngx_memzero(&h, sizeof(h));
h.type = NGX_RTMP_MSG_AMF_CMD;
- h.csid = NGX_RTMP_CMD_CSID_AMF;
- h.msid = NGX_RTMP_CMD_MSID;
+ h.csid = NGX_RTMP_CSID_AMF;
+ h.msid = NGX_RTMP_MSID;
if (v->pause) {
out_inf[0].data = "NetStream.Pause.Notify";
out_inf[2].data = "Paused.";
- return ngx_rtmp_send_user_stream_eof(s, NGX_RTMP_CMD_MSID) != NGX_OK
+ return ngx_rtmp_send_user_stream_eof(s, NGX_RTMP_MSID) != NGX_OK
|| ngx_rtmp_send_amf(s, &h, out_elts,
sizeof(out_elts) / sizeof(out_elts[0])) != NGX_OK
? NGX_ERROR
@@ -1063,7 +1063,7 @@ ngx_rtmp_cmd_pause(ngx_rtmp_session_t *s, ngx_rtmp_pause_t *v)
out_inf[0].data = "NetStream.Unpause.Notify";
out_inf[2].data = "Unpaused.";
- return ngx_rtmp_send_user_stream_begin(s, NGX_RTMP_CMD_MSID) != NGX_OK
+ return ngx_rtmp_send_user_stream_begin(s, NGX_RTMP_MSID) != NGX_OK
|| ngx_rtmp_send_amf(s, &h, out_elts,
sizeof(out_elts) / sizeof(out_elts[0])) != NGX_OK
? NGX_ERROR
@@ -1168,11 +1168,11 @@ ngx_rtmp_cmd_seek(ngx_rtmp_session_t *s, ngx_rtmp_seek_t *v)
/* send onStatus reply */
ngx_memzero(&h, sizeof(h));
h.type = NGX_RTMP_MSG_AMF_CMD;
- h.csid = NGX_RTMP_CMD_CSID_AMF;
- h.msid = NGX_RTMP_CMD_MSID;
+ h.csid = NGX_RTMP_CSID_AMF;
+ h.msid = NGX_RTMP_MSID;
- return (ngx_rtmp_send_user_stream_eof(s, NGX_RTMP_CMD_MSID) != NGX_OK
- || ngx_rtmp_send_user_stream_begin(s, NGX_RTMP_CMD_MSID) != NGX_OK
+ return (ngx_rtmp_send_user_stream_eof(s, NGX_RTMP_MSID) != NGX_OK
+ || ngx_rtmp_send_user_stream_begin(s, NGX_RTMP_MSID) != NGX_OK
|| ngx_rtmp_send_amf(s, &h, out_elts,
sizeof(out_elts) / sizeof(out_elts[0])) != NGX_OK)
? NGX_ERROR
View
10 ngx_rtmp_codec_module.c
@@ -290,11 +290,11 @@ ngx_rtmp_codec_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
/* equal headers; timeout diff is zero */
ngx_memzero(&ch, sizeof(ch));
- ch.msid = NGX_RTMP_LIVE_MSID;
+ ch.msid = NGX_RTMP_MSID;
ch.type = h->type;
ch.csid = (h->type == NGX_RTMP_MSG_VIDEO
- ? NGX_RTMP_LIVE_CSID_VIDEO
- : NGX_RTMP_LIVE_CSID_AUDIO);
+ ? NGX_RTMP_CSID_VIDEO
+ : NGX_RTMP_CSID_AUDIO);
lh = ch;
*header = ngx_rtmp_append_shared_bufs(cscf, NULL, in);
*pheader = ngx_rtmp_append_shared_bufs(cscf, NULL, in);
@@ -428,8 +428,8 @@ ngx_rtmp_codec_update_meta(ngx_rtmp_session_t *s)
}
ngx_memzero(&h, sizeof(h));
- h.csid = NGX_RTMP_LIVE_CSID_META;
- h.msid = NGX_RTMP_LIVE_MSID;
+ h.csid = NGX_RTMP_CSID_AMF;
+ h.msid = NGX_RTMP_MSID;
h.type = NGX_RTMP_MSG_AMF_META;
ngx_rtmp_prepare_message(s, &h, NULL, ctx->meta);
View
6 ngx_rtmp_flv_module.c
@@ -343,8 +343,8 @@ ngx_rtmp_flv_read_meta(ngx_rtmp_session_t *s, ngx_file_t *f)
ngx_memzero(&h, sizeof(h));
h.type = NGX_RTMP_MSG_AMF_META;
- h.msid = NGX_RTMP_LIVE_MSID;
- h.csid = NGX_RTMP_LIVE_CSID_META;
+ h.msid = NGX_RTMP_MSID;
+ h.csid = NGX_RTMP_CSID_AMF;
size = 0;
ngx_rtmp_rmemcpy(&size, ngx_rtmp_flv_header + 1, 3);
@@ -431,7 +431,7 @@ ngx_rtmp_flv_send(ngx_rtmp_session_t *s, ngx_file_t *f)
/* parse header fields */
ngx_memzero(&h, sizeof(h));
- h.msid = NGX_RTMP_LIVE_MSID;
+ h.msid = NGX_RTMP_MSID;
h.type = ngx_rtmp_flv_header[0];
size = 0;
View
6 ngx_rtmp_live_module.c
@@ -362,18 +362,18 @@ ngx_rtmp_live_av(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
ngx_memzero(&ch, sizeof(ch));
ngx_memzero(&lh, sizeof(lh));
ch.timestamp = timestamp;
- ch.msid = NGX_RTMP_LIVE_MSID;
+ ch.msid = NGX_RTMP_MSID;
ch.type = h->type;
lh.msid = ch.msid;
if (h->type == NGX_RTMP_MSG_VIDEO) {
prio = ngx_rtmp_get_video_frame_type(in);
- ch.csid = NGX_RTMP_LIVE_CSID_VIDEO;
+ ch.csid = NGX_RTMP_CSID_VIDEO;
lh.timestamp = ctx->last_video;
ctx->last_video = ch.timestamp;
last_offset = offsetof(ngx_rtmp_live_ctx_t, last_video);
} else {
prio = 0;
- ch.csid = NGX_RTMP_LIVE_CSID_AUDIO;
+ ch.csid = NGX_RTMP_CSID_AUDIO;
lh.timestamp = ctx->last_audio;
ctx->last_audio = ch.timestamp;
last_offset = offsetof(ngx_rtmp_live_ctx_t, last_audio);
View
10 ngx_rtmp_streams.h
@@ -15,14 +15,4 @@
#define NGX_RTMP_CSID_VIDEO 7
-/*legacy*/
-#define NGX_RTMP_CMD_CSID_AMF_INI NGX_RTMP_CSID_AMF_INI
-#define NGX_RTMP_CMD_CSID_AMF NGX_RTMP_CSID_AMF
-#define NGX_RTMP_CMD_MSID NGX_RTMP_MSID
-#define NGX_RTMP_LIVE_CSID_META NGX_RTMP_CSID_AMF
-#define NGX_RTMP_LIVE_CSID_AUDIO NGX_RTMP_CSID_AUDIO
-#define NGX_RTMP_LIVE_CSID_VIDEO NGX_RTMP_CSID_VIDEO
-#define NGX_RTMP_LIVE_MSID NGX_RTMP_MSID
-
-
#endif /* _NGX_RTMP_STREAMS_H_INCLUDED_ */

No commit comments for this range

Something went wrong with that request. Please try again.