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:
@@ -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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user