These classes makes up the basic set of class used for communication.
This identifies the client.
This is called to tell the client that we have changed their queue.
Clients should now call remote_getJobs() to see what has changed.
Note
It is possiable to compare referance objects and get a meaningful result. To using == to work out what jobs have been added or removed is viable.
Note
This is achived by twisted using the .luid attribute.
This is called to get a client to stop working on a job.
Parameters: | Job (HBJob) – The job to stop working on. |
---|
The server is shutting down. All clients should stop work and exit.
This is the root server object. This gets sent by twisted when a client connects.
This holds a load of HBJob‘s and is passed to the clients so they know what to do.
This tells the client to do a specific task. These should have some sort of hierarchy to allow jobs to happen simultaneously. e.g. download one raw file while transcoding another.
Instructs the server to make the files nessary for the job avilable in an FTP location.
The location returned will be a folder location, all files contained within are nessary for the job.
Read Sending files for more info.
Returns: | A URL to the FTP location of the format ftp://server:port/location |
---|---|
Return type: | string |
Instructs the server to open up an FTP location to return the file to.
Read Sending files for more info.
Returns: | A URL to the FTP location of the format ftp://server:port/location |
---|---|
Return type: | string |
Gets the list of arguments that need to be passed to handbrake. The list just needs to be prepended with a process name after which it can be pass stright to reactor.spawnProcess() as the arg keyword argument.
Returns: | reactor.spawnProcess() arg list |
---|---|
Return type: | list |
This method sets the state of the job. The stage is an interger number between 1 and 5 which have the following meaning:
Number | Short Description | Long Description |
---|---|---|
1 | Queued | Nothing has happened to it, this is a jobs initial state |
2 | Transfering to client | The jobs files are currently being transfered to a client |
3 | Transcoding | The job is currenlty being transcoded and is in progress |
4 | Transfering to server | The jobs files are being transfered back after transcoding |
5 | Complete | The job is complete. All resulting files are back at the server |
Parameters: | Stage (int) – The current stage of the job |
---|
This sets the percentage complete of the jobs current stage.
Parameters: | Percentage (int) – Percent complete (0 - 100) |
---|
Set the time till completion of the current stage.
Parameters: | Time (int) – Time till completion in seconds. |
---|
Set the speed of the current stage. The unit of speed changes depending on the stage.
Stage | Unit |
---|---|
2 and 4 | MB/s |
3 | FPS |
Parameters: | Speed (int) – Speed of current stage |
---|