The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Audio::Daemon::Shout - Audio::Daemon backend for libshout (icecast)

SYNOPSIS

  use Audio::Daemon::Shout;

  # set things up
  my $daemon = new Audio::Daemon::Shout( 
               Port => 9101, Allow => '10.1.1.0/24, 127.0.0.1',
               Pass => { bitrate => 64, ip => '10.10.10.1',
                         name => 'Jay\'s List',
                         port => 18000, mountpoint => 'admin',
                         password => 'secret', chunk => 4096} );

  # this should never return... it is a daemon after all.
  $daemon->mainloop;
  

DESCRIPTION

This is a Audio::Daemon module for interfacing with libshout and consequently, icecast servers. It uses the same client as all Audio::Daemon modules, except the volume has no effect.

CONSTRUCTORS

There is but one method to contruct a new Audio::Daemon::MPG123::Server object:

Audio::Daemon::Shout->new( Port => $port, [Log => \&logsub], [Allow => <allowips>], [Deny => <denyips>], Pass => { (whole slew of parameters for libshout connection) });

The new method can take the following arguments:

Port

The local port to start listening and accepting commands on.

Log

This takes a reference to a function that's called for logging purposes, the format passed in is:

    <type>, <msg>, [caller(1)]

    where <type> is one of debug, info, error, crit, warn. <msg> is the text message, and [caller] is the array returned by the second form of the perlfunc caller(). This will give you the method, line number, etc. of where the messagee is coming from. With this logging feature, I don't have to worry about syslog, stdout, or how to report errors or debug info... you do!

Allow, Deny

Access Control. If you specify something for the Allow variable, it assumes everything not allowed will be denied. If you specify something to denied it assumes everything else is allowed. Wither neither set, everything is allowed. It accepts multple formats all seperated by a comma for multiple entries:

<ip>/mask

Either set to full 255.255.255.0 format or bitmask format: /24

<ip>

just an IP specified

<low ip>-<high ip>

For example: 192.168.10.15-192.168.10.44 so anythine between those two addresses would match the rule.

Pass <hash of parameters>

Pass takes special meaning for whichever module you're working with. In the case of Audio::Daemon::Shout, there are a whole bunch of variable that can/should be set: (These are from and for the libshout module:) ip, port, mount, password, icy_compat, aim, icq, irc, dumpfile, name, url, genre, description, bitrate, ispublic

Custom fields for Audio::Daemon::Shout: lame, chunk.

lame is the location of the application "lame", used to downsample the stream as it goes out (usefull for low bandwidth use). If specified it tries to downsample, otherwise it just pipes the straight file through. chunk is the block size to read, in bytes, if you get choppy sound, you may want to try tweaking this.

METHODS

mainloop

Never returns, and in theory, should never exit.

AUTHOR

Jay Jacobs jayj@cpan.org First exposure to icecast, still picking things up if you have any advice or experience and you'd like to share, please do so.

SEE ALSO

Audio::Daemon Audio::Client libshout (www.icecast.org)

perl(1).

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 496:

=back doesn't take any parameters, but you said =back 4

Around line 522:

=back doesn't take any parameters, but you said =back 4

Around line 543:

You forgot a '=back' before '=head1'

You forgot a '=back' before '=head1'