| FFmpeg documentation | Contained in the FFmpeg distribution. |
FFmpeg::ImageFormat - Image formats supported by FFmpeg's image codecs.
$ff = FFmpeg->new(); #see FFmpeg
$if = $ff->image_format('jpeg');
#...do something with $if
Objects of this class are not intended to be instantiated directly by the end user. Access FFmpeg::ImageFormat objects using image_format() in FFmpeg or image_formats() in FFmpeg.
Instances of this class represent a image formats supported by FFmpeg-C. If an image format exists, it means that FFmpeg-C can use it to do at least one of:
Call can_read() and can_write() to see what functionality is supported for a given image format.
See FEEDBACK in FFmpeg for details.
Allen Day <allenday@ucla.edu>
Copyright (c) 2003-2004 Allen Day
This library is released under GPL, the Gnu Public License
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a '_'. Methods are in alphabetical order for the most part.
my $obj = new FFmpeg::ImageFormat();
Builds a new FFmpeg::ImageFormat object
an instance of FFmpeg::ImageFormat
All optional, refer to the documentation of new() in FFmpeg, this constructor operates in the same way.
$obj->init(%arg);
Internal method to initialize a new FFmpeg::ImageFormat object
true on success
Arguments passed to new
$obj->can_read(); #get existing value
FFmpeg-C can use this format for input?
a boolean
none, read-only
$obj->can_write(); #get existing value
FFmpeg-C can use this format for output?
a boolean
none, read-only
$obj->name(); #get existing value
image format's name
value of name (a scalar)
none, read-only
| FFmpeg documentation | Contained in the FFmpeg distribution. |
# Let the code begin... package FFmpeg::ImageFormat; use strict; use base qw(); our $VERSION = '0.01';
sub new { my($class,%arg) = @_; my $self = bless {}, $class; $self->init(%arg); return $self; }
sub init { my($self,%arg) = @_; foreach my $arg (keys %arg){ $self->{$arg} = $arg{$arg}; } return 1; }
sub can_read { my $self = shift; return $self->{'can_read'}; }
sub can_write { my $self = shift; return $self->{'can_write'}; }
sub name { my $self = shift; return $self->{'name'}; } 1;