Skip to content

Commit b9fcf7d

Browse files
committed
removed trailing spaces
1 parent 96e60a4 commit b9fcf7d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+791
-792
lines changed

LICENSE

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ Copyright (c) 2012-2013, Roman Arutyunyan
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without
5-
modification, are permitted provided that the following conditions are met:
5+
modification, are permitted provided that the following conditions are met:
66

77
1. Redistributions of source code must retain the above copyright notice, this
8-
list of conditions and the following disclaimer.
8+
list of conditions and the following disclaimer.
99
2. Redistributions in binary form must reproduce the above copyright notice,
1010
this list of conditions and the following disclaimer in the documentation
11-
and/or other materials provided with the distribution.
11+
and/or other materials provided with the distribution.
1212

1313
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1414
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
* Proved to work with Wirecast,FMS,Wowza,
5353
JWPlayer,FlowPlayer,StrobeMediaPlayback,
54-
ffmpeg,avconv,rtmpdump,flvstreamer
54+
ffmpeg,avconv,rtmpdump,flvstreamer
5555
and many more
5656

5757
* Statistics in XML/XSL in machine- & human-
@@ -165,7 +165,7 @@ rtmp_auto_push directive.
165165
live on;
166166

167167
# Every stream published here
168-
# is automatically pushed to
168+
# is automatically pushed to
169169
# these two machines
170170
push rtmp1.example.com;
171171
push rtmp2.example.com:1934;
@@ -178,7 +178,7 @@ rtmp_auto_push directive.
178178
# and play locally
179179
pull rtmp://rtmp3.example.com pageUrl=www.example.com/index.html;
180180
}
181-
181+
182182
application mystaticpull {
183183
live on;
184184

@@ -201,8 +201,8 @@ rtmp_auto_push directive.
201201

202202
live on;
203203

204-
# The following notifications receive all
205-
# the session variables as well as
204+
# The following notifications receive all
205+
# the session variables as well as
206206
# particular call arguments in HTTP POST
207207
# request
208208

@@ -218,7 +218,7 @@ rtmp_auto_push directive.
218218
on_done http://localhost:8080/done;
219219

220220
# All above mentioned notifications receive
221-
# standard connect() arguments as well as
221+
# standard connect() arguments as well as
222222
# play/publish ones. If any arguments are sent
223223
# with GET-style syntax to play & publish
224224
# these are also included.
@@ -247,8 +247,8 @@ rtmp_auto_push directive.
247247
# profile (see ffmpeg example).
248248
# This example creates RTMP stream from movie ready for HLS:
249249
#
250-
# ffmpeg -loglevel verbose -re -i movie.avi -vcodec libx264
251-
# -vprofile baseline -acodec libmp3lame -ar 44100 -ac 1
250+
# ffmpeg -loglevel verbose -re -i movie.avi -vcodec libx264
251+
# -vprofile baseline -acodec libmp3lame -ar 44100 -ac 1
252252
# -f flv rtmp://localhost:1935/hls/movie
253253
#
254254
# If you need to transcode live stream use 'exec' feature.

config

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ngx_addon_name="ngx_rtmp_module"
22

3-
CORE_MODULES="$CORE_MODULES
3+
CORE_MODULES="$CORE_MODULES
44
ngx_rtmp_module \
55
ngx_rtmp_core_module \
66
ngx_rtmp_cmd_module \

dash/ngx_rtmp_dash_module.c

+29-29
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static ngx_rtmp_stream_eof_pt next_stream_eof;
1616

1717
static ngx_int_t ngx_rtmp_dash_postconfiguration(ngx_conf_t *cf);
1818
static void * ngx_rtmp_dash_create_app_conf(ngx_conf_t *cf);
19-
static char * ngx_rtmp_dash_merge_app_conf(ngx_conf_t *cf,
19+
static char * ngx_rtmp_dash_merge_app_conf(ngx_conf_t *cf,
2020
void *parent, void *child);
2121
static ngx_int_t ngx_rtmp_dash_write_init_segments(ngx_rtmp_session_t *s);
2222

@@ -230,7 +230,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
230230
static u_char buffer[NGX_RTMP_DASH_BUFSIZE];
231231
static u_char start_time[sizeof("1970-09-28T12:00:00+06:00")];
232232
static u_char end_time[sizeof("1970-09-28T12:00:00+06:00")];
233-
233+
234234
dacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_dash_module);
235235
ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_dash_module);
236236
codec_ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_codec_module);
@@ -243,7 +243,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
243243
ngx_rtmp_dash_write_init_segments(s);
244244
}
245245

246-
fd = ngx_open_file(ctx->playlist_bak.data, NGX_FILE_WRONLY,
246+
fd = ngx_open_file(ctx->playlist_bak.data, NGX_FILE_WRONLY,
247247
NGX_FILE_TRUNCATE, NGX_FILE_DEFAULT_ACCESS);
248248

249249
if (fd == NGX_INVALID_FILE) {
@@ -343,7 +343,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
343343

344344
ngx_libc_localtime(ctx->start_time.sec +
345345
ngx_rtmp_dash_get_frag(s, 0)->timestamp / 1000, &tm);
346-
346+
347347
*ngx_sprintf(start_time, "%4d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
348348
tm.tm_year + 1900, tm.tm_mon + 1,
349349
tm.tm_mday, tm.tm_hour,
@@ -354,9 +354,9 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
354354

355355
ngx_libc_localtime(ctx->start_time.sec +
356356
(ngx_rtmp_dash_get_frag(s, ctx->nfrags - 1)->timestamp +
357-
ngx_rtmp_dash_get_frag(s, ctx->nfrags - 1)->duration) /
357+
ngx_rtmp_dash_get_frag(s, ctx->nfrags - 1)->duration) /
358358
1000, &tm);
359-
359+
360360
*ngx_sprintf(end_time, "%4d-%02d-%02dT%02d:%02d:%02d%c%02d:%02d",
361361
tm.tm_year + 1900, tm.tm_mon + 1,
362362
tm.tm_mday, tm.tm_hour,
@@ -383,14 +383,14 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
383383

384384
if (ctx->has_video) {
385385
p = ngx_slprintf(buffer, last, NGX_RTMP_DASH_MANIFEST_VIDEO,
386-
codec_ctx->width,
386+
codec_ctx->width,
387387
codec_ctx->height,
388388
codec_ctx->frame_rate,
389389
&ctx->name,
390390
codec_ctx->avc_profile,
391391
codec_ctx->avc_compat,
392392
codec_ctx->avc_level,
393-
codec_ctx->width,
393+
codec_ctx->width,
394394
codec_ctx->height,
395395
codec_ctx->frame_rate,
396396
(ngx_uint_t) (codec_ctx->video_data_rate * 1000),
@@ -402,10 +402,10 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
402402
p = ngx_slprintf(p, last, NGX_RTMP_DASH_MANIFEST_TIME,
403403
f->timestamp, f->duration);
404404
}
405-
405+
406406
p = ngx_slprintf(p, last, NGX_RTMP_DASH_MANIFEST_VIDEO_FOOTER);
407407

408-
n = ngx_write_fd(fd, buffer, p - buffer);
408+
n = ngx_write_fd(fd, buffer, p - buffer);
409409
}
410410

411411
if (ctx->has_audio) {
@@ -425,13 +425,13 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
425425
}
426426

427427
p = ngx_slprintf(p, last, NGX_RTMP_DASH_MANIFEST_AUDIO_FOOTER);
428-
428+
429429
n = ngx_write_fd(fd, buffer, p - buffer);
430430
}
431431

432432
p = ngx_slprintf(buffer, last, NGX_RTMP_DASH_MANIFEST_FOOTER);
433433
n = ngx_write_fd(fd, buffer, p - buffer);
434-
434+
435435
if (n < 0) {
436436
ngx_log_error(NGX_LOG_ERR, s->connection->log, ngx_errno,
437437
"dash: write failed: '%V'", &ctx->playlist_bak);
@@ -445,7 +445,7 @@ ngx_rtmp_dash_write_playlist(ngx_rtmp_session_t *s)
445445
== NGX_FILE_ERROR)
446446
{
447447
ngx_log_error(NGX_LOG_ERR, s->connection->log, ngx_errno,
448-
"dash: rename failed: '%V'->'%V'",
448+
"dash: rename failed: '%V'->'%V'",
449449
&ctx->playlist_bak, &ctx->playlist);
450450
return NGX_ERROR;
451451
}
@@ -493,7 +493,7 @@ ngx_rtmp_dash_write_init_segments(ngx_rtmp_session_t *s)
493493
NGX_RTMP_MP4_VIDEO_TRACK);
494494
ngx_rtmp_mp4_write_moov(s, &b, NGX_RTMP_MP4_VIDEO_TRACK);
495495

496-
rc = ngx_write_fd(fd, b.start, (size_t) (b.last - b.start));
496+
rc = ngx_write_fd(fd, b.start, (size_t) (b.last - b.start));
497497
if (rc == NGX_ERROR) {
498498
ngx_log_error(NGX_LOG_ERR, s->connection->log, ngx_errno,
499499
"dash: writing video init failed");
@@ -528,7 +528,7 @@ ngx_rtmp_dash_write_init_segments(ngx_rtmp_session_t *s)
528528

529529
ngx_close_file(fd);
530530

531-
return NGX_OK;
531+
return NGX_OK;
532532
}
533533

534534

@@ -640,7 +640,7 @@ ngx_rtmp_dash_close_fragment(ngx_rtmp_session_t *s, ngx_rtmp_dash_track_t *t)
640640
}
641641

642642

643-
static ngx_int_t
643+
static ngx_int_t
644644
ngx_rtmp_dash_close_fragments(ngx_rtmp_session_t *s)
645645
{
646646
ngx_rtmp_dash_ctx_t *ctx;
@@ -698,7 +698,7 @@ ngx_rtmp_dash_open_fragment(ngx_rtmp_session_t *s, ngx_rtmp_dash_track_t *t,
698698
t->sample_count = 0;
699699
t->earliest_pres_time = 0;
700700
t->latest_pres_time = 0;
701-
t->mdat_size = 0;
701+
t->mdat_size = 0;
702702
t->opened = 1;
703703

704704
if (type == 'v') {
@@ -895,7 +895,7 @@ ngx_rtmp_dash_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
895895

896896
ctx->name.len = ngx_strlen(v->name);
897897
ctx->name.data = ngx_palloc(s->connection->pool, ctx->name.len + 1);
898-
898+
899899
if (ctx->name.data == NULL) {
900900
return NGX_ERROR;
901901
}
@@ -916,8 +916,8 @@ ngx_rtmp_dash_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
916916

917917
p = ngx_cpymem(p, ctx->name.data, ctx->name.len);
918918

919-
/*
920-
* ctx->stream holds initial part of stream file path
919+
/*
920+
* ctx->stream holds initial part of stream file path
921921
* however the space for the whole stream path
922922
* is allocated
923923
*/
@@ -942,9 +942,9 @@ ngx_rtmp_dash_publish(ngx_rtmp_session_t *s, ngx_rtmp_publish_t *v)
942942

943943
/* playlist bak (new playlist) path */
944944

945-
ctx->playlist_bak.data = ngx_palloc(s->connection->pool,
945+
ctx->playlist_bak.data = ngx_palloc(s->connection->pool,
946946
ctx->playlist.len + sizeof(".bak"));
947-
p = ngx_cpymem(ctx->playlist_bak.data, ctx->playlist.data,
947+
p = ngx_cpymem(ctx->playlist_bak.data, ctx->playlist.data,
948948
ctx->playlist.len);
949949
p = ngx_cpymem(p, ".bak", sizeof(".bak") - 1);
950950

@@ -992,7 +992,7 @@ ngx_rtmp_dash_close_stream(ngx_rtmp_session_t *s, ngx_rtmp_close_stream_t *v)
992992

993993

994994
static void
995-
ngx_rtmp_dash_update_fragments(ngx_rtmp_session_t *s, ngx_int_t boundary,
995+
ngx_rtmp_dash_update_fragments(ngx_rtmp_session_t *s, ngx_int_t boundary,
996996
uint32_t timestamp)
997997
{
998998
ngx_int_t hit;
@@ -1028,7 +1028,7 @@ ngx_rtmp_dash_update_fragments(ngx_rtmp_session_t *s, ngx_int_t boundary,
10281028

10291029
f->duration = (timestamp - f->timestamp);
10301030

1031-
if (boundary) {
1031+
if (boundary) {
10321032
ngx_rtmp_dash_close_fragments(s);
10331033
ngx_rtmp_dash_open_fragments(s);
10341034

@@ -1100,7 +1100,7 @@ ngx_rtmp_dash_append(ngx_rtmp_session_t *s, ngx_chain_t *in,
11001100

11011101

11021102
static ngx_int_t
1103-
ngx_rtmp_dash_audio(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
1103+
ngx_rtmp_dash_audio(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
11041104
ngx_chain_t *in)
11051105
{
11061106
u_char htype;
@@ -1111,9 +1111,9 @@ ngx_rtmp_dash_audio(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
11111111
dacf = ngx_rtmp_get_module_app_conf(s, ngx_rtmp_dash_module);
11121112
ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_dash_module);
11131113
codec_ctx = ngx_rtmp_get_module_ctx(s, ngx_rtmp_codec_module);
1114-
1114+
11151115
if (dacf == NULL || !dacf->dash || ctx == NULL ||
1116-
codec_ctx == NULL || h->mlen < 2)
1116+
codec_ctx == NULL || h->mlen < 2)
11171117
{
11181118
return NGX_OK;
11191119
}
@@ -1148,7 +1148,7 @@ ngx_rtmp_dash_audio(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
11481148

11491149

11501150
static ngx_int_t
1151-
ngx_rtmp_dash_video(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
1151+
ngx_rtmp_dash_video(ngx_rtmp_session_t *s, ngx_rtmp_header_t *h,
11521152
ngx_chain_t *in)
11531153
{
11541154
u_char *p;
@@ -1296,7 +1296,7 @@ ngx_rtmp_dash_cleanup_dir(ngx_str_t *ppath, ngx_msec_t playlen)
12961296
ngx_log_debug1(NGX_LOG_DEBUG_RTMP, ngx_cycle->log, 0,
12971297
"dash: cleanup dir '%V'", &name);
12981298

1299-
/*
1299+
/*
13001300
* null-termination gets spoiled in win32
13011301
* version of ngx_open_dir
13021302
*/

0 commit comments

Comments
 (0)