The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

FLV::File - Parse Flash Video files

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($filename)
$self->parse($filehandle)

Reads the specified file. If the file does not exist or is an invalid FLV stream, an exception will be thrown via croak().

There is no return value.

$self->serialize($filehandle)

Serializes the in-memory FLV data. If that representation is not complete, this throws an exception via croak(). Returns a boolean indicating whether writing to the file handle was successful.

$self->get_info()

Returns a hash of FLV metadata. See File::Info for more details.

$self->get_filename()

Returns the filename, if any.

$self->get_bytes($n)

Reads $n bytes off the active filehandle and returns them as a string. Throws an exception if the filehandle is closed or hits EOF before all the bytes can be read.

$self->get_pos()
$self->get_pos($offset)

Returns a string representing the current position in the filehandle. This is intended for use in debugging or exceptions. An example of use: indicate that an input value five bytes behind the read head is erroneous.

die 'Error parsing version number at byte '.$self->get_pos(-5);
$self->at_end()

Returns a boolean indicating if the FLV stream is exhausted. Throws an exception if the filehandle is closed.

AUTHOR

Clotho Advanced Media Inc., cpan@clotho.com

Primary developer: Chris Dolan