Rats Class Reference

Class containing interface methods for RATS API. More...

Inherits Raws.

List of all members.

Public Member Functions

 __construct ($user=null, $pwd=null, $base_uri=null, $path=null, $client=null, $applicationId= 'MyCompany-MyApp-1.0', $ssl=False)
 Instantiate a Rats object.
 createSrc ($filename, $src_location)
 Upload a src file, creating a RATS src instance (POST /src).
 getSrcEntry ($uri)
 Retrieve an existing src entry (GET /src/{username}/{filename}).
 getSrcEntryFromFilename ($filename)
 Retrieve an existing src entry (GET /src/{username}/{filename}).
 getSrcFeed ($query=null)
 Retrieve a feed of existing src entries (GET /src).
 deleteSrc ($uri)
 Delete an existing src entry (DELETE /src/{username}/{filename}).
 deleteSrcFromFilename ($filename)
 Delete an existing src entry (DELETE /src/{username}/{filename}).
 getTranscEntry ($uri)
 Retrieve an existing transc entry (GET /transc/{username}/{filename}).
 getTranscFeed ($query=null)
 Retrieve a feed of existing transc entries (GET /transc).
 deleteTransc ($uri)
 Delete an existing transc entry (DELETE /transc/{username}/{filename}).
 deleteTranscFromFilename ($filename)
 Delete an existing transc entry (DELETE /transc/{username}/{filename}).
 createOverlay ($filename, $overlay_location)
 Upload a overlay file, creating a RATS overlay instance (POST /overlay).
 getOverlayEntry ($uri)
 Retrieve an existing overlay entry (GET /overlay/{username}/{filename}).
 getOverlayEntryFromId ($id)
 Retrieve an existing overlay entry (GET /overlay/{id}).
 getOverlayFeed ($query=null)
 Retrieve a feed of existing overlay entries (GET /overlay).
 deleteOverlay ($uri)
 Delete an existing overlay entry (DELETE /overlay/{username}/{id}).
 deleteOverlayFromId ($id)
 Delete an existing src entry (DELETE /overlay/{username}/{id}).
 createJob ($input, $output, $format, $src_location=null, $tgt_location=null, $startpos=null, $endpos=null, $client_passthru=null, $client_input=null, $import_location=null, $proc=null)
 Launch a new transcoding job, by creating a new RATS job instance (POST /job).
 createJobForExistingSrc ($output, $format, $src_location, $tgt_location=null, $startpos=null, $endpos=null, $video_bitrate=null, $audio_bitrate=null, $client_passthru=null, $client_input=null, $proc=null, $video_height=null, $video_width=null)
 Launch a new transcoding job, by creating a new RATS job instance (POST /job) for a src present on the RATS server.
 createJobForImportSrc ($input, $output, $format, $import_location, $tgt_location=null, $startpos=null, $endpos=null, $video_bitrate=null, $audio_bitrate=null, $client_passthru=null, $client_input=null, $proc=null, $video_height=null, $video_width=null)
 Launch a new transcoding job, by creating a new RATS job instance (POST /job) for a src that needs to be imported first.
 getJobEntry ($uri)
 Retrieve an existing job entry (GET /job/{id}).
 getJobEntryFromId ($id)
 Retrieve an existing job entry (GET /job/{id}).
 getJobFeed ($query=null)
 Retrieve a feed of existing job entries (GET /job).
 createInput ($name, $description, $method, $cdn=null, $base_uri=null, $max_size=null, $params=null)
 Launch a new transcoding input, by creating a new RATS input instance (POST /input).
 getInputEntry ($uri)
 Retrieve an existing input entry (GET /input/{id}).
 getInputEntryFromId ($id)
 Retrieve an existing input entry (GET /input/{id}).
 getInputFeed ($query=null)
 Retrieve a feed of existing input entries (GET /input).
 deleteInput ($uri)
 Delete an existing input profile.
 deleteInputFromId ($id)
 Delete an existing input profile.
 createOutput ($name, $description, $method, $cdn=null, $base_uri=null, $public_uri=null, $max_size=null, $params=null)
 Launch a new transcoding output, by creating a new RATS output instance (POST /output).
 getOutputEntry ($uri)
 Retrieve an existing output entry (GET /output/{id}).
 getOutputEntryFromId ($id)
 Retrieve an existing output entry (GET /output/{id}).
 getOutputFeed ($query=null)
 Retrieve a feed of existing output entries (GET /output).
 deleteOutput ($uri)
 Delete an existing output profile.
 deleteOutputFromId ($id)
 Delete an existing output profile.
 createFormat ($name, $description, $container, $category="formats", $video_params=array(), $audio_params=array(), $hinting=0, $input=null, $output=null, $overlay=null)
 Launch a new transcoding format, by creating a new RATS format instance (POST /format).
 getFormatEntry ($uri)
 Retrieve an existing format entry (GET /format/{id}).
 getFormatEntryFromId ($id)
 Retrieve an existing format entry (GET /format/{id}).
 getFormatFeed ($query=null)
 Retrieve a feed of existing format entries (GET /format).
 deleteFormat ($uri)
 Delete an existing transcoding format.
 deleteFormatFromId ($id)
 Delete an existing transcoding format.
 getUserEntry ()
 Retrieve the user profile (GET /user).


Detailed Description

Class containing interface methods for RATS API.
Examples:

rats_job.php, and rats_quicktest.php.


Constructor & Destructor Documentation

Rats.__construct ( user = null,
pwd = null,
base_uri = null,
path = null,
client = null,
applicationId = 'MyCompany-MyApp-1.0',
ssl = False 
)

Instantiate a Rats object.

Parameters:
string $user The Rambla username.
string $pwd The Rambla pwd.
string $base_uri URI of the RATS server; use 'http://rats.enc01.rambla.be/' or leave null unless you have a custom setup.
string $path Currently not being used; leave null.
Zend_Http_Client $client Leave null, unless the caller has instantiated his own Zend_Http_Client object.
string $applicationId Identification string for your client, to be sent in the HTTP headers.

Reimplemented from Raws.


Member Function Documentation

Rats.createSrc ( filename,
src_location 
)

Upload a src file, creating a RATS src instance (POST /src).

Parameters:
string $filename The filename for the src instance on the RATS server.
string $src_location Local path to the file that needs to be uploaded.
Returns:
Rats_SrcEntry

Rats.getSrcEntry ( uri  ) 

Retrieve an existing src entry (GET /src/{username}/{filename}).

Parameters:
string $uri The URI that is pointing to the src instance.
Returns:
Rats_SrcEntry

Rats.getSrcEntryFromFilename ( filename  ) 

Retrieve an existing src entry (GET /src/{username}/{filename}).

Parameters:
string $filename The src filename, by which it is known on the RATS server.
Returns:
Rats_SrcEntry

Rats.getSrcFeed ( query = null  ) 

Retrieve a feed of existing src entries (GET /src).

Parameters:
Rats_SrcQuery $query A Rats_SrcQuery that allows passing query-string parameters.
Returns:
Rats_SrcFeed

Rats.deleteSrc ( uri  ) 

Delete an existing src entry (DELETE /src/{username}/{filename}).

Parameters:
string $uri The URI that is pointing to the src instance.

Rats.deleteSrcFromFilename ( filename  ) 

Delete an existing src entry (DELETE /src/{username}/{filename}).

Parameters:
string $filename The src filename, by which it is known on the RATS server.

Rats.getTranscEntry ( uri  ) 

Retrieve an existing transc entry (GET /transc/{username}/{filename}).

Parameters:
string $uri The URI that is pointing to the transc instance.
Returns:
Rats_TranscEntry

Rats.getTranscFeed ( query = null  ) 

Retrieve a feed of existing transc entries (GET /transc).

Parameters:
Rats_TranscQuery $query A Rats_TranscQuery that allows passing query-string parameters.
Returns:
Rats_TranscFeed

Rats.deleteTransc ( uri  ) 

Delete an existing transc entry (DELETE /transc/{username}/{filename}).

Parameters:
string $uri The URI that is pointing to the transc instance.

Rats.deleteTranscFromFilename ( filename  ) 

Delete an existing transc entry (DELETE /transc/{username}/{filename}).

Parameters:
string $filename The transc filename, by which it is known on the RATS server.

Rats.createOverlay ( filename,
overlay_location 
)

Upload a overlay file, creating a RATS overlay instance (POST /overlay).

Parameters:
string $filename The filename for the overlay instance on the RATS server.
string $overlay_location Local path to the file that needs to be uploaded.
Returns:
Rats_OverlayEntry

Rats.getOverlayEntry ( uri  ) 

Retrieve an existing overlay entry (GET /overlay/{username}/{filename}).

Parameters:
string $uri The URI that is pointing to the overlay instance.
Returns:
Rats_OverlayEntry

Rats.getOverlayEntryFromId ( id  ) 

Retrieve an existing overlay entry (GET /overlay/{id}).

Parameters:
string $id The overlay's ID on the RATS server.
Returns:
Rats_OverlayEntry

Rats.getOverlayFeed ( query = null  ) 

Retrieve a feed of existing overlay entries (GET /overlay).

Parameters:
Rats_OverlayQuery $query A Rats_OverlayQuery that allows passing query-string parameters.
Returns:
Rats_OverlayFeed

Rats.deleteOverlay ( uri  ) 

Delete an existing overlay entry (DELETE /overlay/{username}/{id}).

Parameters:
string $uri The URI that is pointing to the overlay instance.

Rats.deleteOverlayFromId ( id  ) 

Delete an existing src entry (DELETE /overlay/{username}/{id}).

Parameters:
string $id The overlay ID.

Rats.createJob ( input,
output,
format,
src_location = null,
tgt_location = null,
startpos = null,
endpos = null,
client_passthru = null,
client_input = null,
import_location = null,
proc = null 
)

Launch a new transcoding job, by creating a new RATS job instance (POST /job).

This method is deprecated since RATS v1.40, preferably use createJobForExistingSrc() or createJobForImportSrc() instead.

Parameters:
string $input ID of the input profile or null.
string $output ID of the output profile or null.
string $format ID of the transcoding format profile.
string $src_location Filename of an existing src (if applicable).
string $tgt_location Filename to be given to the transcoded file.
string $startpos Offset in seconds from the beginning of the src file, where transcoding must start.
string $endpos Offset in seconds from the end of the src file, where transcoding must end.
string $client_passthru Placeholder for data to receive back in the job's report.
string $client_input Custom data to be sent to RATS.
string $import_location Path to a src file that needs to be imported (if applicable).
string $proc Processing action to be done as part of the job (optional).
Returns:
Rats_JobEntry

Rats.createJobForExistingSrc ( output,
format,
src_location,
tgt_location = null,
startpos = null,
endpos = null,
video_bitrate = null,
audio_bitrate = null,
client_passthru = null,
client_input = null,
proc = null,
video_height = null,
video_width = null 
)

Launch a new transcoding job, by creating a new RATS job instance (POST /job) for a src present on the RATS server.

Parameters:
string $output ID of the output profile or null.
string $format ID of the transcoding format profile.
string $src_location Filename of an existing src (if applicable).
string $tgt_location Filename to be given to the transcoded file.
string $startpos Offset in seconds from the beginning of the src file, where transcoding must start.
string $endpos Offset in seconds from the end of the src file, where transcoding must end.
string $video_bitrate Overrides format setting.
string $audio_bitrate Overrides format setting.
string $client_passthru Placeholder for data to receive back in the job's report.
string $client_input Custom data to be sent to RATS.
string $proc Processing action to be done as part of the job (optional).
string $video_height Overrides format setting.
string $video_width Overrides format setting.
Returns:
Rats_JobEntry

Rats.createJobForImportSrc ( input,
output,
format,
import_location,
tgt_location = null,
startpos = null,
endpos = null,
video_bitrate = null,
audio_bitrate = null,
client_passthru = null,
client_input = null,
proc = null,
video_height = null,
video_width = null 
)

Launch a new transcoding job, by creating a new RATS job instance (POST /job) for a src that needs to be imported first.

Parameters:
string $input ID of the input profile or null.
string $output ID of the output profile or null.
string $format ID of the transcoding format profile.
string $import_location Path to a src file that needs to be imported (if applicable).
string $tgt_location Filename to be given to the transcoded file.
string $startpos Offset in seconds from the beginning of the src file, where transcoding must start.
string $endpos Offset in seconds from the end of the src file, where transcoding must end.
string $video_bitrate Overrides format setting.
string $audio_bitrate Overrides format setting.
string $client_passthru Placeholder for data to receive back in the job's report.
string $client_input Custom data to be sent to RATS.
string $proc Processing action to be done as part of the job (optional).
string $video_height Overrides format setting.
string $video_width Overrides format setting.
Returns:
Rats_JobEntry

Rats.getJobEntry ( uri  ) 

Retrieve an existing job entry (GET /job/{id}).

Parameters:
string $uri The URI that is pointing to the job instance.
Returns:
Rats_JobEntry

Rats.getJobEntryFromId ( id  ) 

Retrieve an existing job entry (GET /job/{id}).

Parameters:
string $id The job's ID on the RATS server.
Returns:
Rats_JobEntry

Rats.getJobFeed ( query = null  ) 

Retrieve a feed of existing job entries (GET /job).

Parameters:
Rats_JobQuery $query A Rats_JobQuery that allows passing query-string parameters.
Returns:
Rats_JobFeed

Rats.createInput ( name,
description,
method,
cdn = null,
base_uri = null,
max_size = null,
params = null 
)

Launch a new transcoding input, by creating a new RATS input instance (POST /input).

Parameters:
string $name Unique name for this profile.
string $description Description of what the profile does.
string $method One of the input methods (eg. rass, ftp).
string $base_uri : Base URI to which the job's filename or target location must be added when determining the export location (if applicable)
string $cdn the name of the Rambla CDN to export to (if applicable)
string $max_size maximum size allowed for source files (in Mb)
string $params Additional params to be sent to the export daemon.
Returns:
Rats_InputEntry

Rats.getInputEntry ( uri  ) 

Retrieve an existing input entry (GET /input/{id}).

Parameters:
string $uri The URI that is pointing to the input instance.
Returns:
Rats_InputEntry

Rats.getInputEntryFromId ( id  ) 

Retrieve an existing input entry (GET /input/{id}).

Parameters:
string $id The input's ID on the RATS server.
Returns:
Rats_InputEntry

Rats.getInputFeed ( query = null  ) 

Retrieve a feed of existing input entries (GET /input).

Parameters:
Rats_InputQuery $query A Rats_InputQuery that allows passing query-string parameters.
Returns:
Rats_InputFeed

Rats.deleteInput ( uri  ) 

Delete an existing input profile.

Parameters:
string $uri The URI that is pointing to the input instance.

Rats.deleteInputFromId ( id  ) 

Delete an existing input profile.

Parameters:
string $id The input ID.

Rats.createOutput ( name,
description,
method,
cdn = null,
base_uri = null,
public_uri = null,
max_size = null,
params = null 
)

Launch a new transcoding output, by creating a new RATS output instance (POST /output).

Parameters:
string $name Unique name for this profile.
string $description Description of what the profile does.
string $method One of the output methods (eg. rass, ftp).
string $base_uri : Base URI to which the job's filename or target location must be added when determining the export location (if applicable)
string $public_uri Base URI to which the job's filename or target location needs to be added when determining the final http location, at which the file will be available after export (if applicable).
string $cdn the name of the Rambla CDN to export to (if applicable)
string $max_size maximum size allowed for source files (in Mb)
string $params Additional params to be sent to the export daemon.
Returns:
Rats_OutputEntry

Rats.getOutputEntry ( uri  ) 

Retrieve an existing output entry (GET /output/{id}).

Parameters:
string $uri The URI that is pointing to the output instance.
Returns:
Rats_OutputEntry

Rats.getOutputEntryFromId ( id  ) 

Retrieve an existing output entry (GET /output/{id}).

Parameters:
string $id The output's ID on the RATS server.
Returns:
Rats_OutputEntry

Rats.getOutputFeed ( query = null  ) 

Retrieve a feed of existing output entries (GET /output).

Parameters:
Rats_OutputQuery $query A Rats_OutputQuery that allows passing query-string parameters.
Returns:
Rats_OutputFeed

Rats.deleteOutput ( uri  ) 

Delete an existing output profile.

Parameters:
string $uri The URI that is pointing to the output instance.

Rats.deleteOutputFromId ( id  ) 

Delete an existing output profile.

Parameters:
string $id The output ID.

Rats.createFormat ( name,
description,
container,
category = "formats",
video_params = array(),
audio_params = array(),
hinting = 0,
input = null,
output = null,
overlay = null 
)

Launch a new transcoding format, by creating a new RATS format instance (POST /format).

Parameters:
string $name Unique name for this profile.
string $description Description of what the profile does.
string $container : Container being used for this format.
string $category : 'formats' or 'devices'
array $video_params : Associative array of video parameters (key = param name, value = string containing the param data)
array $audio_params : Associative array of audio parameters (key = param name, value = string containing the param data)
int $hinting : 1 or 0
string $input : ID of an input profile attached to this format.
string $output : ID of an output profile attached to this format.
string $overlay : ID of an overlay profile to be used for this format.
Returns:
Rats_FormatEntry

Rats.getFormatEntry ( uri  ) 

Retrieve an existing format entry (GET /format/{id}).

Parameters:
string $uri The URI that is pointing to the format instance.
Returns:
Rats_FormatEntry

Rats.getFormatEntryFromId ( id  ) 

Retrieve an existing format entry (GET /format/{id}).

Parameters:
string $id The format's ID on the RATS server.
Returns:
Rats_FormatEntry

Rats.getFormatFeed ( query = null  ) 

Retrieve a feed of existing format entries (GET /format).

Parameters:
Rats_FormatQuery $query A Rats_FormatQuery that allows passing query-string parameters.
Returns:
Rats_FormatFeed

Rats.deleteFormat ( uri  ) 

Delete an existing transcoding format.

Parameters:
string $uri The URI that is pointing to the format instance.

Rats.deleteFormatFromId ( id  ) 

Delete an existing transcoding format.

Parameters:
string $id The format ID.

Rats.getUserEntry (  ) 

Retrieve the user profile (GET /user).

Returns:
Rats_UserEntry


Generated on Mon Mar 28 15:03:21 2011 for RawsClient PHP by  doxygen 1.5.3