3 WWW::Quvi - Perl extension interface for libquvi
9 my $q = new WWW::Quvi::Query;
10 my $m = $query->parse($url);
12 croak "error: $q->{errmsg}\n" unless $m->{ok};
16 WWW::Quvi provides a Perl interface to libquvi, a small C library for
17 parsing Flash media stream URLs.
21 This module provides a Perl interface to libquvi. This documentation
22 contains the Perl specific details and some sample code. The libquvi
23 documentation should be consulted for the API details at
24 L<http://quvi.sourceforge.net/>.
26 =head1 WWW::Quvi::version
28 A wrapper function that returns WWW::Quvi version and libquvi version
31 WWW::Quvi::version; # Module version
32 WWW::Quvi::version(WWW::Quvi::ModuleVersion); # Ditto.
33 WWW::Quvi::version(WWW::Quvi::libquviVersion);
34 WWW::Quvi::version(WWW::Quvi::libquviVersionLong);
36 =head1 WWW::Quvi::Options
38 A container hash for the options used with libquvi that would normally
39 (using the C API) be set with C<quvi_setopt(3)>.
41 $opts->{verbose_libcurl} = 1; # Default: 0
42 $opts->{user_agent} = 'Foo/1.0'; # Default: ""
43 $opts->{http_proxy} = 'http://foo:1234'; # Default: ""
44 $opts->{category} = WWW::Quvi::ProtoHttp; # Default: ProtoAll
45 $opts->{resolve} = 0; # Default: 1
46 $opts->{format} = 'best'; # Default: "default"
47 $opts->{verify} = 0; # Default: 1
49 =head1 WWW::Quvi::Media
51 A container hash that holds the parsed media details accessible using
54 $media->{content_length} - Content length as returned by the server
55 $media->{thumbnail_url} - Thumbnail URL (if any)
56 $media->{content_type} - Content-type as returned by the server
57 $media->{file_suffix} - File suffix parsed from the content-type
58 $media->{start_time} - Start time for media (if any)
59 $media->{page_title} - Media title
60 $media->{page_url} - Page URL
61 $media->{duration} - Duration in msec (if any)
62 $media->{host} - Host string
63 $media->{url} - Media stream URL
64 $media->{id} - Media ID
65 $media->{ok} - Non-zero value if parsing succeeded
67 =head1 WWW::Quvi::Query
73 Parse media details for URL. Returns WWW::Quvi::Media object.
75 my $m = $q->parse($url);
77 =item ($rc, $domain, $formats) next_website()
79 Return next supported website. The returned tuple will hold return code
80 ($rc), domain string and the formats string.
82 Please note that the formats string has very little use as of
83 libquvi 0.2.17. This function is best suited for getting a list of the
86 Use the C<formats> function (below) instead if you need to know which
87 formats are available to an URL.
90 my ($done, $domain) = $q->next_website;
95 =item ($rc, $formats) formats($url)
97 Return a list of formats available to an URL.
99 my ($rc, $formats) = q->formats($url);
100 croak "error: $q->{errmsg}\n" unless $rc == WWW::Quvi::OK;
101 print "$_\n" foreach (split /\|/, $formats);
103 =item set_opts($opts)
105 Set Query options (see also L</WWW::Quvi::Options>).
107 =item supported($url)
109 Returns a non-zero value if the URL is not supported.
113 =head1 NOT IMPLEMENTED
117 =item B<Linked list interface>
119 =item B<Network interface>
121 =item B<Media segments>
129 Home : http://www-quvi.sourceforge.net/
130 gitweb: http://repo.or.cz/w/www-quvi.git
134 WWW::Quvi is free software, licensed under the LGPLv2.1+.
142 Toni Gundogdu <legatvs at sign gmail com>