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


Video-PlaybackMachine documentation Contained in the Video-PlaybackMachine distribution.

Index


Code Index:

NAME

Top

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

DESCRIPTION

Top

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.


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;