SDL::SMPEG - a SDL perl extension
TODO
$video = SDL::SMPEG->new( -name => 'pr0n.mpg' );
SDL::SMPEG adds support for MPEG video to your SDL Perl application. SMPEGs are objects bound to surfaces, whose playback is controlled through the object's interface.
SDL::SMPEG
SDL::SMPEG::error() returns any error messages associated with playback
SDL::SMPEG::error()
SDL::SMPEG::audio(bool) enables or disables audio playback, (on by default)
SDL::SMPEG::audio(bool)
SDL::SMPEG::video(bool) enables or disable video playback, (on by default)
SDL::SMPEG::video(bool)
SDL::SMPEG::loop(bool) enables or disable playback looping (off by default)
SDL::SMPEG::loop(bool)
SDL::SMPEG::volume(int) set the volume as per the mixer volume
SDL::SMPEG::volume(int)
SDL::SMPEG:display(surface) binds the clip to a display surface
SDL::SMPEG:display(surface)
SDL::SMPEG::scale([x,y]|[surface]|int) scales the clip by either x,y factors, scales to the image dimensions, or a single scalar.
SDL::SMPEG::scale([x,y]|[surface]|int)
SDL::SMPEG::play() plays the video clip, call SDL::SMPEG::display() before playing
SDL::SMPEG::play()
SDL::SMPEG::display()
SDL::SMPEG::pause() pauses video playback
SDL::SMPEG::pause()
SDL::SMPEG::stop() stops video playback
SDL::SMPEG::stop()
SDL::SMPEG::rewind() resets the clip to the beginning
SDL::SMPEG::rewind()
SDL::SMPEG::seek(offset) seeks to a particular byte offset
SDL::SMPEG::seek(offset)
SDL::SMPEG::skip(time) skips to a particular time
SDL::SMPEG::skip(time)
SDL::SMPEG::region(rect) takes a SDL::Rect and defines the display area
SDL::SMPEG::region(rect)
SDL::SMPEG::frame(int) renders a specific frame to the screen
SDL::SMPEG::frame(int)
SDL::SMPEG::info() returns a new SDL::MPEG object reflecting the current status
SDL::SMPEG::info()
SDL::MPEG
SDL::SMPEG::status() returns either SMPEG_PLAYING or SMPEG_STOPPED or SMPEG_ERROR
SDL::SMPEG::status()
David J. Goehrig
perl(1) SDL::Surface(3) SDL::MPEG(3)
To install SDL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SDL
CPAN shell
perl -MCPAN -e shell install SDL
For more information on module installation, please visit the detailed CPAN module installation guide.