From 5c779989c3a7cd22f758bff0d468cb6669a711fe Mon Sep 17 00:00:00 2001 From: Maxim Lihachev Date: Tue, 12 Jul 2016 15:22:06 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doc/masterindex.html | 2 +- doc/robo_files.html | 2 +- doc/robo_functions.html | 2 +- doc/robo_sourcefiles.html | 2 +- doc/robo_variables.html | 2 +- doc/streamsaver.html | 171 +++++++++++++++++++++++----------------------- doc/tobo_toplevel.html | 2 +- doc/toc_index.html | 2 +- 8 files changed, 94 insertions(+), 91 deletions(-) diff --git a/doc/masterindex.html b/doc/masterindex.html index d893e89..7f5faef 100644 --- a/doc/masterindex.html +++ b/doc/masterindex.html @@ -40,7 +40,7 @@

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

diff --git a/doc/robo_files.html b/doc/robo_files.html index 4020bad..d774566 100644 --- a/doc/robo_files.html +++ b/doc/robo_files.html @@ -32,7 +32,7 @@

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

diff --git a/doc/robo_functions.html b/doc/robo_functions.html index da0bc33..1f41a99 100644 --- a/doc/robo_functions.html +++ b/doc/robo_functions.html @@ -35,7 +35,7 @@

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

diff --git a/doc/robo_sourcefiles.html b/doc/robo_sourcefiles.html index 07cb4c3..274bd9e 100644 --- a/doc/robo_sourcefiles.html +++ b/doc/robo_sourcefiles.html @@ -37,7 +37,7 @@ streamsaver diff --git a/doc/robo_variables.html b/doc/robo_variables.html index 72f828a..f83fdfc 100644 --- a/doc/robo_variables.html +++ b/doc/robo_variables.html @@ -33,7 +33,7 @@

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

diff --git a/doc/streamsaver.html b/doc/streamsaver.html index ff0ecfc..099f088 100644 --- a/doc/streamsaver.html +++ b/doc/streamsaver.html @@ -171,7 +171,7 @@ -segment_list_type "csv" \ -segment_list_flags "live" \ -segment_atclocktime 1 \ - -acodec "$FORMAT" -map 0 -f segment \ + -acodec "$FORMAT" -f segment \ -segment_time "$ARCHIVE_TIME" \ -segment_format "$FORMAT" \ -strftime 1 "$ARCHIVE_DIR/$FILE_NAME" @@ -181,7 +181,7 @@ -segment_list_type "csv" \ -segment_list_flags "live" \ -segment_atclocktime 1 \ - -acodec "$FORMAT" -map 0 -f segment \ + -acodec "$FORMAT" -f segment \ -segment_time "$SLICES_TIME" \ -segment_format "$FORMAT" \ -strftime 1 "$SLICES_DIR/$FILE_NAME" @@ -196,13 +196,13 @@ 150 FILE_NAME="${config[filename_prefix]}-${config[channel_name]}.${config[filename_suffix]}" 151 152 #Минимальная команда -153 CMD="${config[cmd]} -reconnect 1 -i ${config[stream]} -f mp2" -154 # " -f ${config[input_format]}" -155 -156 #КОДИРОВАНИЕ -157 # enableOption output_format -c %% -158 -159 #ICECAST +153 CMD="${config[cmd]} -i ${config[stream]} -f ${config[output_format]}" +154 +155 #КОДИРОВАНИЕ +156 # enableOption output_format -c %% +157 +158 #ICECAST +159 enableOption input_channel -map %% 160 enableOption channel_name \ 161 -legacy_icecast 1 \ 162 -content_type audio/mpeg \ @@ -215,39 +215,41 @@ 169 icecast://source:${config[password]}@${config[icecast]}/${config[mountpoint]} 170 171 # АРХИВ -172 enableOption archive_log \ -173 -segment_list %% \ -174 -segment_list_entry_prefix "${config[archive_dir]}" \ -175 -segment_list_type csv \ -176 -segment_list_flags live -177 -178 # +СЕГМЕНТИРОВАНИЕ -179 enableOption archive_dir \ -180 -segment_atclocktime 1 \ -181 -acodec "${config[output_format]}" -map 0 \ -182 -fi segment \ -183 -segment_time "${config[archive_time]}" \ -184 -segment_format "${config[output_format]}" \ -185 -strftime 1 "${config[archive_dir]}/$FILE_NAME" -186 -187 # АНАЛИЗ -188 enableOption slices_log \ -189 -segment_list %% \ -190 -segment_list_entry_prefix "${config[slices_dir]}" \ -191 -segment_list_type csv \ -192 -segment_list_flags live -193 -194 # +СЕГМЕНТИРОВАНИЕ -195 enableOption slices_dir \ -196 -segment_atclocktime 1 \ -197 -acodec "${config[output_format]}" -map 0 \ -198 -fi segment \ -199 -segment_time "${config[slices_time]}" \ -200 -segment_format "${config[output_format]}" \ -201 -strftime 1 "${config[slices_dir]}/$FILE_NAME" -202 -203 echo "$CMD" -204 } +172 enableOption input_channel -map %% +173 enableOption archive_log \ +174 -segment_list %% \ +175 -segment_list_entry_prefix "${config[archive_dir]}" \ +176 -segment_list_type csv \ +177 -segment_list_flags live +178 +179 # +СЕГМЕНТИРОВАНИЕ +180 enableOption archive_dir \ +181 -segment_atclocktime 1 \ +182 -acodec "${config[output_format]}" \ +183 -fi segment \ +184 -segment_time "${config[archive_time]}" \ +185 -segment_format "${config[output_format]}" \ +186 -strftime 1 "${config[archive_dir]}/$FILE_NAME" +187 +188 # АНАЛИЗ +189 enableOption input_channel -map %% +190 enableOption slices_log \ +191 -segment_list %% \ +192 -segment_list_entry_prefix "${config[slices_dir]}" \ +193 -segment_list_type csv \ +194 -segment_list_flags live +195 +196 # +СЕГМЕНТИРОВАНИЕ +197 enableOption slices_dir \ +198 -segment_atclocktime 1 \ +199 -acodec "${config[output_format]}" \ +200 -fi segment \ +201 -segment_time "${config[slices_time]}" \ +202 -segment_format "${config[output_format]}" \ +203 -strftime 1 "${config[slices_dir]}/$FILE_NAME" +204 +205 echo "$CMD" +206 }
@@ -263,28 +265,29 @@
    enableOption, readOption, readXML, makeCMD
 

SOURCE

-
220 typeset -A config
-221 
-222 config=(
-223         [stream]=""
-224         [icecast]="http://localhost:8000/"
-225         [password]="hackme"
-226         [channel_name]=""
-227         [channel_descr]=""
-228         [mountpoint]=""
-229         [cmd]="ffmpeg"
-230         [input_format]="mpegts"
-231         [archive_dir]=""
-232         [archive_time]="3600"
-233         [archive_log]="/var/log/tuc01_archive.log"
-234         [slices_dir]=""
-235         [slices_time]=10
-236         [slices_log]="/var/log/tuc01_slices.log"
-237         [filename_prefix]="%Y-%m-%d_%H:%M:%S"
-238         [filename_suffix]="mp2"
-239         [output_format]="mp2"
-240         [audio_bitrate]="256k"
-241 )
+
222 typeset -A config
+223 
+224 config=(
+225         [stream]=""
+226         [icecast]="http://localhost:8000/"
+227         [password]="hackme"
+228         [channel_name]=""
+229         [channel_descr]=""
+230         [mountpoint]=""
+231         [cmd]="ffmpeg"
+232         [input_format]="mpegts"
+233         [input_channel]="0"
+234         [archive_dir]=""
+235         [archive_time]="3600"
+236         [archive_log]="/var/log/tuc01_archive.log"
+237         [slices_dir]=""
+238         [slices_time]=10
+239         [slices_log]="/var/log/tuc01_slices.log"
+240         [filename_prefix]="%Y-%m-%d_%H:%M:%S"
+241         [filename_suffix]="mp2"
+242         [output_format]="mp2"
+243         [audio_bitrate]="256k"
+244 )
 

@@ -365,7 +368,7 @@

SOURCE

-
305 SETTINGS="$1"
+
308 SETTINGS="$1"
 

@@ -377,30 +380,30 @@
    streamsaver
 

SOURCE

-
316 #Проверка на наличие файла настроек
-317 if [ -z "$SETTINGS" ]; then
-318         echo "USAGE: $(basename $0) <settings.xml>" >&2
-319         exit 1
-320 elif [ ! -r "$SETTINGS" ]; then
-321         echo "Unable open file $1." >&2
-322         echo "USAGE: $(basename $0) <settings.xml>" >&2
-323         exit 1
-324 fi
-325 
-326 #Чтение настроек
-327 readXML "$SETTINGS"
+
319 #Проверка на наличие файла настроек
+320 if [ -z "$SETTINGS" ]; then
+321         echo "USAGE: $(basename $0) <settings.xml>" >&2
+322         exit 1
+323 elif [ ! -r "$SETTINGS" ]; then
+324         echo "Unable open file $1." >&2
+325         echo "USAGE: $(basename $0) <settings.xml>" >&2
+326         exit 1
+327 fi
 328 
-329 #Создание директорий хранения файлов, если требуется
-330 mkdir -p ${config[archive_dir]}
-331 mkdir -p ${config[slices_dir]}
-332 
-333 #Создание команды оцифровки сигнала
-334 makeCMD
+329 #Чтение настроек
+330 readXML "$SETTINGS"
+331 
+332 #Создание директорий хранения файлов, если требуется
+333 mkdir -p ${config[archive_dir]}
+334 mkdir -p ${config[slices_dir]}
+335 
+336 #Создание команды оцифровки сигнала
+337 makeCMD
 
diff --git a/doc/tobo_toplevel.html b/doc/tobo_toplevel.html index 400214a..6f2df95 100644 --- a/doc/tobo_toplevel.html +++ b/doc/tobo_toplevel.html @@ -32,7 +32,7 @@

A - B - C - D - E - F - G - H - I - J - K - L - M - N - O - P - Q - R - S - T - U - V - W - X - Y - Z - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9

diff --git a/doc/toc_index.html b/doc/toc_index.html index c865f56..526eb2c 100644 --- a/doc/toc_index.html +++ b/doc/toc_index.html @@ -41,7 +41,7 @@