| 1 | package File::Headerinfo::SWF; | ||
| 2 | |||
| 3 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use base qw(File::Headerinfo); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use SWF::Header; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | =head1 NAME | ||
| 8 | |||
| 9 | File::Headerinfo::SWF - an extractor of useful information from shockwave files. | ||
| 10 | |||
| 11 | =head1 DESCRIPTION | ||
| 12 | |||
| 13 | I<File::Headerinfo::SWF> uses SWF::Header to read the headers of .swf files and extract useful information like their duration, dimensions and framerate. | ||
| 14 | |||
| 15 | =cut | ||
| 16 | |||
| 17 | 1 | ▶ | sub parse_file { |
|
Subroutine
parse_file: called CC=1 SCAR=0.0
Pod
documented
| |||
| 18 | 1 | my $self = shift; | |
| 19 | 1 | my $header = SWF::Header->read_file( $self->path ); | |
| 20 | 1 | $self->filetype('swf'); | |
| 21 | 1 | $self->width($header->{width}); | |
| 22 | 1 | $self->height($header->{height}); | |
| 23 | 1 | $self->duration($header->{duration}); | |
| 24 | 1 | $self->fps($header->{rate}); | |
| 25 | 1 | $self->filesize($header->{filelen}); | |
| 26 | 1 | $self->version($header->{version}); | |
| 27 | } | ||
| 28 | |||
| 29 | =head1 COPYRIGHT | ||
| 30 | |||
| 31 | Copyright 2004 William Ross (wross@cpan.org) | ||
| 32 | |||
| 33 | This library is free software; you can redistribute it | ||
| 34 | and/or modify it under the same terms as Perl itself. | ||
| 35 | |||
| 36 | =head1 SEE ALSO | ||
| 37 | |||
| 38 | L<File::Headerinfo>, L<SWF::Header> | ||
| 39 | |||
| 40 | =cut | ||
| 41 | |||
| 42 | 1 | 1; | |