NAME
Netx::WebRadio::Station::Shoutcast - receive one shoutcast-stream
SYNOPSIS
see Netx::WebRadio
DESCRIPTION
Netx::WebRadio::Station::Shoutcast-objects can be used with Netx::WebRadio to receive a Shoutcast-stream.
USAGE
You can overload some methods to change the behaviour of the module.
The default implementation does not process the received mp3-data in any way. Overload some of the methods to process the sound-data.
METHODS
host
Usage : $station->host( $host )
Purpose : set the hostname of the server
Returns : the actual hostname if called without arguments
Argument : hostname
Throws : nothing
See Also :
port
Usage : $station->port( $port )
Purpose : set the port of the server
Returns : the actual port if called without arguments
Argument : portnumber
Throws : nothing
See Also :
path
Usage : $station->path( $path )
Purpose : set the path of the stream on the server
Returns : the actual path if called without arguments
Argument : path
Throws : nothing
See Also :
useragent
Usage : $station->useragent( 'Winamp...' )
Purpose : set the useragent. the value is sent to the server on connect
Returns : the actual useragent if called without arguments
Argument : useragent-string
Throws : nothing
See Also :
stationname
Usage : $stationname = $station->stationname()
Purpose : get the stationname
Returns : the stationname
Argument : nothing
Throws : nothing
See Also :
receive
Usage : $station->receive( )
Purpose :
Receives next chunk from the station.
You have to call it everytime the socket is ready for the next operation.
This is done from Netx::WebRadio in most cases.
Returns : 1 for 'ok', other values can be specified in the overloadable method 'disconnected'
Argument : nothing
Throws : nothing
See Also :
connect
Usage : $station->connect( $host, $port );
Purpose :
connects the station-object with the radio-station
Returns : 1 for 'ok',other values can be specified in the overloadable method 'disconnected'
Argument : host, port
Throws : nothing
See Also :
init
Usage : init is called from new
Purpose :
Initializes some values, create socket
Always call SUPER::init if you overload this method.
Returns : nothing
Argument : nothing
Throws : nothing
See Also :
process_chunk
Usage : process_chunk is called from receive() for processing audio-data-chunks
Purpose :
overload it
Returns : nothing
Argument : audio-data
Throws : nothing
See Also :
process_new_title
Usage : process_new_title is called everytime the station sends a new song-title
Purpose :
overload it
Returns : nothing
Argument : new song title
Throws : nothing
See Also :
disconnected
Usage : is called when there is a write error on a socket
Purpose :
overload it.
The return value of this method is the value the failed method will return.
If you can 'fix' the error in this method you normaly return 1, otherwise 0.
You can also change the behaviour of Netx::WebRadio for a '0' return value.
Returns : what you want
Argument : nothing
Throws : nothing
See Also :
BUGS
SUPPORT
AUTHOR
Nathanael Obermayer
CPAN ID: nathanael
natom-pause@smi2le.net
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
perl(1). Netx::WebRadio
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 327:
=pod directives shouldn't be over one line long! Ignoring all 2 lines of content