SDL::Video - a SDL perl extension
$video = new SDL::Video ( -name => 'pr0n.mpg' );
SDL::Video adds support for MPEG video to your SDL Perl application. Videos are objects bound to surfaces, whose playback is controled through the object's interface.
SDL::Video
SDL::Video::error() returns any error messages associated with playback
SDL::Video::error()
SDL::Video::audio(bool) enables or disables audio playback, (on by default)
SDL::Video::audio(bool)
SDL::Video::video(bool) enables or disable video playback, (on by default)
SDL::Video::video(bool)
SDL::Video::loop(bool) enables or disable playback looping (off by default)
SDL::Video::loop(bool)
SDL::Video::volume(int) set the volume as per the mixer volume
SDL::Video::volume(int)
SDL::Video:display(surface) binds the clip to a display surface
SDL::Video:display(surface)
SDL::Video::scale([x,y]|[surface]|int) scales the clip by either x,y factors, scales to the image dimensions, or a single scalar.
SDL::Video::scale([x,y]|[surface]|int)
SDL::Video::play() plays the video clip, call SDL::Video::display() before playing
SDL::Video::play()
SDL::Video::display()
SDL::Video::pause() pauses video playback
SDL::Video::pause()
SDL::Video::stop() stops video playback
SDL::Video::stop()
SDL::Video::rewind() resets the clip to the beginning
SDL::Video::rewind()
SDL::Video::seek(offset) seeks to a particular byte offset
SDL::Video::seek(offset)
SDL::Video::skip(time) skips to a particular time
SDL::Video::skip(time)
SDL::Video::region(rect) takes a SDL::Rect and defines the display area
SDL::Video::region(rect)
SDL::Video::frame(int) renders a specific frame to the screen
SDL::Video::frame(int)
SDL::Video::info() returns a new SDL::MPEG object reflecting the current status
SDL::Video::info()
SDL::MPEG
SDL::Video::status() returns either SMPEG_PLAYING or SMPEG_STOPPED or SMPEG_ERROR
SDL::Video::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.