Net-Icecast-Source
view release on metacpan or search on metacpan
--- #YAML:1.0
name: Net-Icecast-Source
version: 1.1
abstract: Icecast streaming source
author:
- Mischa Spiegelmock <revmischa@cpan.org>
license: unknown
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
build_requires:
ExtUtils::MakeMaker: 0
requires:
IO::Handle:
lib/Net/Icecast/Source.pm view on Meta::CPAN
######################
our $VERSION = '1.1';
our $BUF_SIZE = 1460; # how many bytes to read/transmit at a time
######################
=head1 NAME
Net::Icecast::Source - Icecast streaming source
=head1 SYNOPSIS
use Net::Icecast::Source;
my $source = new Net::Icecast::Source(
username => 'revmischa',
password => 'hackthegibson',
server => '128.128.64.64',
port => '8000',
mount_point => '/source',
mime_type => 'audio/mpeg',
meta => {
name => 'lol dongs radio fun land',
description => 'party time all day',
aim => 'lindenstacker',
url => 'http://icecast.org',
},
);
# attempt to connect to the streaming server
$source->connect
or die "Unable to connect to server: $!\n";
# attempt to log in to the specified mountpoint
$source->login
or die "Incorrect username/password\n";
# stream mp3
my $sample;
open $sample, "sample.mp3" or die $!;
( run in 0.315 second using v1.01-cache-2.11-cpan-05444aca049 )