Updated Worker Plugin interface

Added init and name methods, which will be common to all Plugins.
Removed HandBrake specific methods.
This commit is contained in:
2010-08-25 22:36:17 +01:00
parent 89ddcba363
commit de04fb5978
2 changed files with 12 additions and 7 deletions

View File

@@ -2,15 +2,14 @@
interface RippingCluster_Worker_IPlugin { interface RippingCluster_Worker_IPlugin {
public static function init();
public static function name();
public static function workerFunctions(); public static function workerFunctions();
public static function rip(GearmanJob $job); public static function rip(GearmanJob $job);
public function evaluateOption($name, $option = null);
public function callbackStdout($id, $data);
public function callbackStderr($id, $data);
} }
?> ?>

View File

@@ -2,6 +2,8 @@
class RippingCluster_Worker_Plugin_HandBrake implements RippingCluster_Worker_IPlugin { class RippingCluster_Worker_Plugin_HandBrake implements RippingCluster_Worker_IPlugin {
const PLUGIN_NAME = 'HandBrake';
const DEINTERLACE_ALWAYS = 1; const DEINTERLACE_ALWAYS = 1;
const DEINTERLACE_SELECTIVELY = 2; const DEINTERLACE_SELECTIVELY = 2;
@@ -24,7 +26,11 @@ class RippingCluster_Worker_Plugin_HandBrake implements RippingCluster_Worker_IP
} }
public static function init() { public static function init() {
// Nothing to do
}
public static function name() {
return self::PLUGIN_NAME;
} }
public static function workerFunctions() { public static function workerFunctions() {