VLM: VideoLAN (Media) Manager

VLM is a little media manager originally designed to launch multiple
streams with only one VLC.

I - Interfaces
 1) Telnet interface
    You can launch it as a common interface.
    Default port is 4212, default password is "admin". These are common
    options of the interface, so you can modify them as you wish.
    Once you are connected on telnet interface, just type a command
    line.

 2) HTTP interface
    You can launch it as a common interface
    Default port is 8080.
    Access it from http://127.0.0.1:8080/vlm.html

II - VLM Elements

    A media is composed with a list of inputs (the videos and audios you
    want to stream), an output (where you want to stream them), and some
    options. It is very close to a TV program, or channel: it is launched,
    stopped, paused by the administrator, may be repeated several times etc.

III - Command line syntax:
Note: the only type of element in this version is media.
 1) Command lines:
    help
        Displays an exhaustive commmand lines list.

    new (name) broadcast|schedule [properties]
        Creates a new element. You must specify if a broadcast media, or
        a schedule (there is no default type).
        "media" and "schedule" are reserved names, and element names
        must be unique.
        Properties are optional: you can use the "setup" command to set
        it.
    setup (name) (properties)
        Set the property of the (name) element.
        See Properties section for more information.
    show [(name)|media|schedule]
        Displays current element states and configurations.
        "show (name)" displays all information about the (name) element.
        "show media" displays a summary of medias states.
        "show schedule" displays a summary of schedules states.
        "show" is a the same as "show media show schedule".
    del (name)|all|media|schedule
        Destroys an element, or a group of elements. If the element is
        at a non-stop state, it stops it (media or schedule).
        "del (name)" destroys the (name) element.
        "del all" destroys all elements.
        "del media" destroys all medias.
    control (name) [instance_name] (command)
        Changes the state of the (instance_name) instance of (name) media.
        If (instance_name) is not specified, the control command affects the
        default instance.
        See Commands section for more information.
    save (config_file)
        Saves all media configurations in the (config_file)
        configuration file. the "save" command overwrites the file if it
        already exists. States (playing, paused, stop) are not saved.
        See Configuration File section for more information.
    load (config_file)
        Loads the (config_file) configuration file.
        See Configuration File section for more information.

 2) Properties:
 Note: except the "append" property, all property can be followed by
 another one, recursively.For example:
 "setup pouet input file://arf.avi output udp:127.0.0.1 enabled loop"
 is a valid command line.
    Media Properties Syntax:
        input (input_name)
            Adds (input_name) at the end of the media input list.
        inputdel (input_name)|all
            Deletes (input_name) or all items from the media input list.
        inputdeln (input_number)
            Deletes the item #(input_number) from the media input list.
        output (output_name)
            Defines the output of the media.
            The syntax is equivalent to the ":sout=..." option , but you
            do not have to put the ":sout=" string.
        option (option_name)[=value]
            Adds the (option_name) to the media option list.
            The syntax is equivalent to the ":(option)=..." option , but you
            do not have to put the ":" string.
            Options are global: they are applied to all inputs of the
            media.
        enabled|disabled
            Enable or Disable the media.
            If a media is disabled, it can not be streamed, paused.
        loop|unloop
            Used for broadcast only.
            If a media with "loop" option receives the "play" command
            and finally finishes to play the last input of the list, it
            will automatically restart to play the input list.

 3) Control Commands Syntax:
    play
        Starts a broadcast media. The media begins to launch the first
        item of the input list, then launches the next one, and so on
        (like a playlist).
    pause
        Puts the broadcast media in paused status.
    stop
        Stops the broadcast media.
    seek (percentage)
        Seeks in the current playing item of input list.

IV - The configuration file
  A VLM configuration file is very simple: it is only a list of command
  lines: one line corresponds to one command line.
  If you want to create a configuration file, just edit a text file and
  type a list of VLM command lines. But beware of recursive calls: you
  can put a "load (file)" command in a configuration file, so for
  example, if you put a "load pouet" in a pouet file, and you launch the
  "load pouet" command, then pouet will be loaded endlessly, and VLC
  will crash (at least).
  The load command converts the medias configurations into command lines,
  and writes them into a file.
  Any line where the first non white space character is a '#' is considered
  as a comment.
