RTSP-Server
view release on metacpan or search on metacpan
lib/RTSP/Server.pm view on Meta::CPAN
$self->source_server($server);
$self->info("Source server started");
return $server;
}
sub build_logger {
my ($self) = @_;
return RTSP::Server::Logger->new(
log_level => $self->log_level
);
}
__PACKAGE__->meta->make_immutable;
__END__
=head1 NAME
RTSP::Server - Lightweight RTSP/RTP server. Like icecast, for
audio/video streams.
=head1 SYNOPSIS
use AnyEvent;
use RTSP::Server;
# defaults:
my $srv = new RTSP::Server(
log_level => 2, # 0 = no output, 5 = most verbose
max_clients => 100,
client_listen_port => 554,
source_listen_port => 5545,
rtp_start_port => 20000,
client_listen_address => '0.0.0.0',
source_listen_address => '0.0.0.0',
);
# listen and accept incoming connections asynchronously
# (returns immediately)
$srv->listen;
# main loop
my $cv = AnyEvent->condvar;
# ...
$cv->recv;
undef $srv; # when the server goes out of scope, all sockets will
# be cleaned up
=head1 DESCRIPTION
This server is designed to enable to rebroadcasting of RTP media
streams to clients, controlled by RTSP. Please see README for more
information.
=head1 USAGE
After starting the server, stream sources may send an ANNOUNCE for a
desired mountpoint, followed by a RECORD request to begin streaming.
Clients can then connect on the client port at the same mountpoint and
send a PLAY request to receive the RTP data streamed from the source.
=head1 BUNDLED APPLICATIONS
Includes rtsp-server.pl, which basically contains the synopsis.
=head2 COMING SOON
Priv dropping, authentication, client encoder, stats, tests
=head1 SEE ALSO
L<RTSP::Proxy>, L<RTSP::Client>, L<AnyEvent::Socket>
=head1 AUTHOR
Mischa Spiegelmock, E<lt>revmischa@cpan.orgE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2010 by Mischa Spiegelmock
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.
=cut
( run in 1.404 second using v1.01-cache-2.11-cpan-39bf76dae61 )