@echo off
REM SLTA Helper Batch Script
REM version 1.0 2001/08/17

echo SLTA.EXE - Live Broadcast Simulation Utility
echo.
goto INIT

:INIT
REM
REM setting environment variables
REM
set SLTA_PLUGIN_PATH=c:\Helix Server\Plugins
set SLTA_SUPPORT_PATH=c:\Helix Server\Lib
goto START

:START
REM
REM checking which mode we are in
REM
if "%1%" == "-c"  goto ADVANCED
goto BASIC

:ADVANCED
REM
REM Advanced Mode
REM checking for missing command line options
REM
if "%2%" == ""  goto OPTIONS
if "%3%" == ""  goto OPTIONS
if "%4%" == ""  goto OPTIONS

echo Executing SLTA with
echo config_file=%2, live_file=%3, playlist_file=%4
echo.
goto RUN

:BASIC
REM
REM Basic Mode
REM checking for missing command line options
REM
if "%1%" == ""  goto OPTIONS
if "%2%" == ""  goto OPTIONS
if "%3%" == ""  goto OPTIONS
if "%4%" == ""  goto OPTIONS
if "%5%" == ""  goto OPTIONS
if "%6%" == ""  goto OPTIONS

echo Executing SLTA with
echo host=%1, port=%2, userid=%3, password=%4,
echo live_file=%5, playlist_file=%6
echo.
goto RUN

:OPTIONS
REM
REM displaying command line options
REM
echo SLTA (c) 2001-2002 RealNetworks, Inc. All rights reserved.
echo.
echo Usage:
echo        Basic mode:
echo        host port userid password live_file playlist_file [-t] [-r] [-nN] [-bN] [-e] [-f] [-w]
echo.
echo        Advanced mode:
echo        -c config_file live_file playlist_file [-r] [-nN] [-bN] [-e] [-f] [-w]
echo.
echo        -t: tcp.
echo        -r: random.
echo        -nN: play N files, then exit.
echo        -bN: target stream bandwidth of n bps
echo        -e: disable event stream for title, author and copyright updates
echo        -f: force event stream for title, author and copyright updates
echo        -w: enable wallclock synchronization with other streams
echo        Playlist file has the format:
echo        file1
echo        file2
echo.
echo SLTA requires that two environment variables, SLTA_PLUGIN_PATH and
echo SLTA_SUPPORT_PATH, be set.  These variables reference the Plugins and
echo the LibrarySupportPath variables specified in your Helix Server
echo configuration file (i.e. rmserver.cfg).  If you change these values in
echo your server configuration file, you must also modify them in this script.
echo.
echo Refer to Helix Server Administration Guide for more information
echo regarding SLTA.
echo.
goto END

:RUN
REM
REM executing SLTA.EXE utility with command line options
REM
call "c:\Helix Server\Bin\slta.exe"  %*
goto END

:END
REM done with script
