NAME

FLV::Tag - Flash video file data structure

LICENSE

Copyright 2006 Clotho Advanced Media, Inc., <cpan@clotho.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

METHODS

This is a subclass of FLV::Base.

$self->parse($fileinst)
$self->parse($fileinst, {opt => $optvalue, ...})

Takes a FLV::File instance and extracts an FLV tag from the file stream. This method then multiplexes that tag into one of the subtypes: video, audio or meta. This method throws exceptions if the stream is not a valid FLV v1.0 or v1.1 file.

At the end, this method stores the subtag instance, which can be retrieved with get_payload().

There is no return value.

An option of record_positions = 1> causes the byte offset of the tag to be stored in the instance. This is intended for testing and/or debugging, so there is no public accessor for that property.

$self->get_payload()

Returns the subtag instance found by parse(). This will be instance of FLV::VideoTag, FLV::AudioTag or FLV::MetaTag.

$pkg->serialize($tag, $filehandle)
$self->serialize($tag, $filehandle)

Serializes the specified video, audio or meta tag. If that representation is not complete, this throws an exception via croak(). Returns a boolean indicating whether writing to the file handle was successful.

AUTHOR

Clotho Advanced Media Inc., cpan@clotho.com

Primary developer: Chris Dolan