Stephen Nelson > Video-PlaybackMachine-0.06 > Video::PlaybackMachine::PlayerBackEnd

Download:
Video-PlaybackMachine-0.06.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Video::PlaybackMachine::PlayerBackEnd -- interface for different kinds of players

DESCRIPTION ^

This file defines the interface for PlayerBackEnds, which provide the actual playback ability of the Playback Machine. A BackEnd must be able to play movies, show stills, and play music files.

The PlayerBackEnd should implement the initialize(), play_movie(), play_still(), play_music(), and stop() methods for playing content. It should also implement check_event() and get_status(). A movie_length() function is optional but strongly suggested.

CLASS METHODS

new( name => $name, config => $config )

Creates a PlayerBackEnd object. The config object will come from the appropriate configuration file and will be a (sub)class of AppConfig.

OBJECT METHODS

initialize()

Do whatever initialization is required to show movies.

play_movie( $movie , $offset )

Start playing $movie $offset seconds after the beginning. Return true if the movie played successfully, or return false if there was an error.

get_error()

Returns some kind of error message or code indicating the last error which happened.

movie_length( $movie )

Returns the length of the movie in seconds, ceilinged.