Ogg::Vorbis::Header::PurePerl(3pm)

Ogg::Vorbis::Header::PurePerl3pm

Access ogg vorbis info and comment fields

Usage

        use Ogg::Vorbis::Header::PurePerl;
        my $ogg = Ogg::Vorbis::Header::PurePerl->new("song.ogg");
        while (my ($k, $v) = each %{$ogg->info}) {
                print "$k: $v\n";
        }
        foreach my $com ($ogg->comment_tags) {
                print "$com: $_\n" foreach $ogg->comment($com);
        }

Overview

This module is intended to be a drop in replacement for Ogg::Vorbis::Header, implemented entirely in Perl. It provides an object-oriented interface to Ogg Vorbis information and comment fields. (NOTE: This module currently supports only read operations).

Unlike Ogg::Vorbis::Header, this module will go ahead and fill in all of the information fields as soon as you construct the object.

Constructors

"new ($filename)"

Opens an Ogg Vorbis file, ensuring that it exists and is actually an Ogg Vorbis stream. This method does not actually read any of the information or comment fields, and closes the file immediately.

Instance methods

"info ([$key])"

Returns a hashref containing information about the Ogg Vorbis file from the file's information header. Hash fields are: version, channels, rate, bitrate_upper, bitrate_nominal, bitrate_lower, bitrate_window, and length. The bitrate_window value is not currently used by the vorbis codec, and will always be -1.

The optional parameter, key, allows you to retrieve a single value from the object's hash. Returns "undef" if the key is not found.

"comment_tags ()"

Returns an array containing the key values for the comment fields. These values can then be passed to "comment" to retrieve their values.

"comment ($key)"

Returns an array of comment values associated with the given key.

"add_comments ($key, $value, [$key, $value, ...])"

Unimplemented.

"edit_comment ($key, $value, [$num])"

Unimplemented.

"delete_comment ($key, [$num])"

Unimplemented.

"clear_comments ([@keys])"

Unimplemented.

"write_vorbis ()"

Unimplemented.

"path ()"

Returns the path/filename of the file the object represents.

Repository

<https://github.com/dsully/perl-ogg-vorbis-header-pureperl>

Releases

11 releases since Debian 3.1 (Sarge); the text changed 5 times.

  1. 3.1–4.0
  2. 5.0
  3. 6.0
  4. 7–8
  5. 9–10
  6. 11–13

Author

Andrew Molloy <[email protected]>

Dan Sully <daniel | at | cpan.org>

From libogg-vorbis-header-pureperl-perl 1.05-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.