|
File::Format::RIFF::Container - RIFF Container |
File::Format::RIFF::Container - RIFF Container (Lists and RIFFs)
You should not instantiate a File::Format::RIFF::Container directly;
instead, you should instantiate one of its subclasses: either a
the File::Format::RIFF manpage object, or a the File::Format::RIFF::List manpage object.
File::Format::RIFF::Container is a base class for both RIFF objects
and RIFF lists. It is, essentially, an array of other RIFF lists and/or
RIFF chunks, and you can add, change, delete, and read them.
$container.
$container. $type must be a four character code, which
represents what data will be found in $container.
$container. $container must be either a RIFF object
or a List object, so $id will be 'RIFF' or 'LIST', respectively.
$container.
$container and replaces
them with $data. $data must be an array reference containing some
number of RIFF lists and/or RIFF chunks.
$container.
$container's data, when written to a file.
$container will take up when
written out to a file. Total size is the size of the data, plus 12 bytes
for the header.
splice, push, pop, unshift, and shift operate analogously
to the same-named functions in core perl, acting on $container's array
of RIFF lists and/or RIFF chunks. All items added must be RIFF lists or
RIFF chunks.
$ith position in
$container's array.
$ith position in $container's array to $chunk, replacing
the previous item. $chunk must be a RIFF list or a RIFF chunk.
$id and $data, appending
it to $container's array. Returns the just-created RIFF chunk.
$type and $data, appending
it to $container's array. Returns the just-created RIFF list.
$container to STDOUT, recursively
printing contained items. If a RIFF chunk's data is larger than $max bytes,
prints '[...]' instead of the actual data. If $max is not specified or
undef, it defaults to 64.
A RIFF chunk is rendered as:
id: <id> size: <size> (<total size>): <data>
A RIFF container is rendered as:
id: <id> (<type>) size: <size> (<total size>)
Items contained in the RIFF list are recursively printed on subsequent lines, and are indented in one additional tab level.
Paul Sturm <sturm@branewave.com>
|
File::Format::RIFF::Container - RIFF Container |