Pavel Zhitomirsky > Net-Icecast2-0.004 > Net::Icecast2::Mount

Download:
Net-Icecast2-0.004.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.004   Source   Latest Release: Net-Icecast2-0.005

NAME ^

Net::Icecast2::Mount - Icecast2 Server Mount API

SYNOPSIS ^

  use Net::Icecast2::Mount;

  my $icecast_mount = Net::Icecast2::Mount->new(
      host => 192.168.1.10,
      port => 8008,
      protocol => 'https',
      login    => 'source',
      password => 'hackme',
      mount    => '/my_mount.ogg',
  );

  $icecast_mount->metadata_update( song => 'New song' );
  $icecast_mount->fallback_update( '/new_fallback.ogg' );
  $icecast_mount->list_clients;
  $icecast_mount->move_client( '/new_mount_point.ogg' );
  $icecast_mount->kill_client( 23444 );
  $icecast_mount->kill_source;

DESCRIPTION

Make request for Icecast2 Server Mount API

ATTRIBUTES ^

host

  Description : Icecast2 Server hostname
  Default     : localhost
  Required    : 0

port

  Description : Icecast2 Server port
  Default     : 8000
  Required    : 0

protocol Description : Icecast2 Server protocol ( scheme ) Default : http Required : 0

login

  Description : Icecast2 Server Mount username
  Default     : source
  Required    : 0

password

  Description : Icecast2 Server Mount password
  Required    : 1

mount

  Description : Icecast2 Server Mountpoint
  Required    : 1

METHODS ^

metadata_update

  Usage       : $icecast_mount->metadata_update( song => 'New song' );
  Arguments   : List or HashRef of data parameters must update

  Description : This function provides the ability for either a source client
                or any external program to update the metadata information for
                a particular mountpoint.

fallback_update

  Usage       : $icecast_mount->fallback_update( '/new_fallback.ogg' );
  Arguments   : New fallback mount point

  Description : This function provides the ability for either a source client
                or any external program to update the "fallback mountpoint"
                for a particular mountpoint. Fallback mounts are those that are
                used in the even of a source client disconnection. If a source
                client disconnects for some reason that all currently connected
                clients are sent immediately to the fallback mountpoint.

list_clients

  Usage       : $icecast_mount->list_clients;
  Arguments   : No Arguments

  Description : This function lists all the clients currently connected to a
                specific mountpoint. The results are sent back in XML form.

  Return      : HashRef like
                  mount => mount point
                  listeners => listeners number
                  listener => Array with info per each listener

move_clients

  Usage       : $icecast_mount->move_client( '/new_mount_point.ogg' );
  Arguments   : New mount point

  Description : This function provides the ability to migrate currently
                connected listeners from one mountpoint to another. This
                function requires 2 mountpoints to be passed in: mount
                (the *from* mountpoint) and destination (the *to* mountpoint).
                After processing this function all currently connected
                listeners on mount will be connected to destination. Note that
                the destination mountpoint must exist and have a sounce client
                already feeding it a stream.

  Return      : 1 on success and 0 on failure

kill_client

  Usage       : $icecast_mount->kill_client( 23444 );
  Arguments   : User ID can get from 'list_client' method

  Description : This function provides the ability to disconnect a specific
                listener of a currently connected mountpoint. Listeners are
                identified by a unique id that can be retrieved by via the
                "List Clients" admin function. This id must be passed in to
                the request. After processing this request, the listener will
                no longer be connected to the mountpoint.

  Return      : 1 on success and 0 on failure

kill_source

  Usage       : $icecast_mount->kill_source;
  Arguments   : No Argements

  Description : This function will provide the ability to disconnect a specific
                mountpoint from the server. The mountpoint to be disconnected is
                specified via the variable "mount".

SEE ALSO ^

Icecast2 server: http://www.icecast.org Icecast2 API Docs: http://www.icecast.org/docs/icecast-trunk/icecast2_admin.html

Related modules Net::Icecast2 Net::Icecast2::Admin

AUTHOR ^

Pavel R3VoLuT1OneR Zhytomirsky <r3volut1oner@gmail.com>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2012 by Pavel R3VoLuT1OneR Zhytomirsky.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: