Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Net::RTSP and checking for remote files

by geektron (Curate)
on Jul 18, 2005 at 20:27 UTC ( [id://475879]=perlquestion: print w/replies, xml ) Need Help??

geektron has asked for the wisdom of the Perl Monks concerning the following question:

today's my day of research, it seems.

another task for this same client is to test whether or not a media file exists on a remote server. i've tried to use the "example" out of the perldoc for Net::RTSP (cargo-cult, i know, but it's a start), but there's a subroutine that's not exported referenced in the example:

use Net::RTSP; my $rtsp = new Net::RTSP; my $presentation = $rtsp->initialize($uri); my $stream_uri; $presentation->describe( SuccessCallback => sub { my $response = shift; my ($stream_uri, $transport_method) = + extract_sdp_info($response->content); my $session = $presentation->setup_session($stream_uri); $session->play; } ); $rtsp->run;
and that's the only code sample in the entire perldoc ... the extract_sdp_info() method/sub isn't in the exportables. (i get a "sub not found" warning trying to run that as-is. and i just get back a "1" from $presentation->describe(), even if i feed it a bogus media loction.

i did search the monestary, and RTSP/RTP streaming server in Perl! is about the most helpful node. i did grab the rtsp-ping script mentioned, but it's returning failures, though if i create the SMI files needed, i *can* stream the media in question.

i've not found anything seemingly relevant on the Helix Community site ...

i'm just looking for some analogue to LWP::head() to check for the existence of a media file on the server, but rtsp doesn't work like http.

UPDATE: looks like RTSP::Lite will do the job.

Replies are listed 'Best First'.
Re: Net::RTSP and checking for remote files
by Anonymous Monk on Jul 18, 2005 at 22:58 UTC
    extract_sdp_info is a function you need to write.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://475879]
Approved by Old_Gray_Bear
Front-paged by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-19 22:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found