| Video-PlaybackMachine documentation | Contained in the Video-PlaybackMachine distribution. |
Video::PlaybackMachine::PlayerBackEnd -- interface for different kinds of players
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.
Creates a PlayerBackEnd object. The config object will come from the appropriate configuration file and will be a (sub)class of AppConfig.
Do whatever initialization is required to show movies.
Start playing $movie $offset seconds after the beginning. Return true if the movie played successfully, or return false if there was an error.
Returns some kind of error message or code indicating the last error which happened.
Returns the length of the movie in seconds, ceilinged.
| Video-PlaybackMachine documentation | Contained in the Video-PlaybackMachine distribution. |
package Video::PlaybackMachine::PlayerBackEnd; use strict; use warnings; use diagnostics;
######################## Class Methods #########################
sub new { my $type = shift; my %in = @_; my $self = { name => $in{'name'}, config => $in{'config'} }; bless $self, $type; }
######################### Object Methods #######################
sub initialize { }
sub play_movie { }
sub get_error { }
sub movie_length { } 1;