
Netx::WebRadio::Station::Shoutcast - receive one shoutcast-stream

see Netx::WebRadio

Netx::WebRadio::Station::Shoutcast-objects can be used with Netx::WebRadio to receive a Shoutcast-stream.

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.

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 :
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 :
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 :
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 :
Usage : $stationname = $station->stationname() Purpose : get the stationname Returns : the stationname Argument : nothing Throws : nothing See Also :
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 :
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 :
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 :
Usage : process_chunk is called from receive() for processing audio-data-chunks
Purpose :
overload it
Returns : nothing
Argument : audio-data
Throws : nothing
See Also :
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 :
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 :



Nathanael Obermayer
CPAN ID: nathanael
natom-pause@smi2le.net

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.

perl(1). Netx::WebRadio