-
-
14 Mar 2009 03:08:34 UTC
- Distribution: FLV-Info
- Module version: 0.24
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (3)
- Testers (1066 / 0 / 12)
- Kwalitee
Bus factor: 0- 88.32% Coverage
- License: perl_5
- Perl: v5.8.0
- Activity
24 month- Tools
- Download (1.22MB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Clotho Advanced Media, Inc.
- Dependencies
- AMF::Perl
- Digest::MD5
- List::MoreUtils
- List::Util
- Readonly
- SWF::File
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
FLV::File - Parse Flash Video files
LICENSE
See FLV::Info
METHODS
This is a subclass of FLV::Base.
READ/WRITE METHODS
- $self->empty()
-
Prepare an empty FLV. This is only needed if you do not plan to call the parse() method.
- $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->clone()
-
Create an independent copy of this instance.
- $self->populate_meta()
-
Fill in various
onMetadata
fields if they are not already present. - $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.
ACCESSORS
- $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_meta($key);
- $self->set_meta($key, $value, ...);
-
These are convenience functions for interacting with an
onMetadata
tag at time 0, which is a common convention in FLV files. If the zeroth tag is not an FLV::MetaTag instance, one is created and prepended to the tag list.See also
get_meta
andset_meta
in FLV::Body. - $self->get_header()
- $self->get_body()
-
These methods return the FLV::Header and FLV::Body instance, respectively. Those will be
undef
until you call either empty() or parse().
PARSING UTILITIES
The following methods are only used during the parsing phase.
- $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
See FLV::Info
Module Install Instructions
To install FLV::Info, copy and paste the appropriate command in to your terminal.
cpanm FLV::Info
perl -MCPAN -e shell install FLV::Info
For more information on module installation, please visit the detailed CPAN module installation guide.