ffencoderd::Queue Class Reference

List of all members.

Public Class Methods

ffencoderd::Queue new (hash params)

Public Object Methods

array update ()
array readProcessFile (scalar file)
int createProcess (ffencoderd::Process process)
int append_xml (hash data)


Detailed Description

Implementation of a queue, mainly scanning a directory looking for xml files with encoding processes definition also publishes some methods to read these enc. procs definitions.

Member Function Documentation

ffencoderd::Queue ffencoderd::Queue::new ( hash  params  ) 

Parameters:
hash params with three possible keys
  • queueDir String with the path where enc. procs files reside
  • xmlFile String with the path of the xml file where enc. processes are stored once are finished and definition is removed
  • dtd String with the path where a public dtd file is accessible (optional)

array ffencoderd::Queue::update (  ) 

Reads the processes files directory and returns an array with files that match the conditions

Returns:
Array an array with new files in process dir

array ffencoderd::Queue::readProcessFile ( scalar  file  ) 

Reads a encoding session defintion file and returns an array of hashes with its information

Parameters:
String $file Path to file with enc. session definition
Returns:
array Array of hashes with information of the enc. session definition, each element of the array will have at least two keys id and profile, alternatively may have more that define the parameters used

int ffencoderd::Queue::createProcess ( ffencoderd::Process  process  ) 

Create a encoding session defintion file with parameters given

Parameters:
ffencoderd::Process $process Encoding session definition, contains next keys
  • id User defined identifier
  • profile Profile name to use for encoding in this session
  • file Server's filesystem filename
  • parameters A hash with key value pairs to define encoding parameters that must match those in the profile
Returns:
Boolean

int ffencoderd::Queue::append_xml ( hash  data  ) 

Add an entry to the XML control file

Parameters:
Hash $data with the following keys
  • id A user defined identifier
  • filename The original filename in the server filesystem
  • description A description for the encoded file
  • size The size in wxh of the encoded file
  • format The encoded file format
  • source The uinque identifier used to identify the resource in the server filesystem
Returns:
boolean


The documentation for this class was generated from the following file:

Generated on Mon May 12 16:23:47 2008 for ffencoderd framework API by  doxygen 1.5.5