public function PHPVideoToolkit::registerPostProcess in Video 7
Same name and namespace in other branches
- 7.2 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::registerPostProcess()
* This function registers a post process after the internal handling of the ffmpeg output has been cleaned and checked. * Each function that is set will be called in the order it is set unless an index is specified. All callbacks will be * supplied with one argument with is an array of the outputted files. * * NOTE1: If a post process function is being applied to an outputted video or audio then the process will be applied * before it has been moved to it's final destination, however if the output is an image sequence the post process * function will be called after the images have been moved to their final destinations. * * NOTE2: Also it is important to return a boolean 'true' if the post process has been carried out ok. If the process is not * a true value then the value will be treated/returned as an error and if applicable logged. * * @access public *
Parameters
string $function The name of a function: * @param object|boolean $class The name of the callback class. If left as false the callback will be treated as a standalone function. * @param integer|boolean $index The index of the callback array to put the callback into. If left as false it will be pushed to the end of the array.
2 calls to PHPVideoToolkit::registerPostProcess()
- PHPVideoToolkit::addGDWatermark in libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php - * Adds a watermark to the outputted image files using the PHP GD module. * This effects only image output. * * @access public *
- PHPVideoToolkit::setFormatToFLV in libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php - * A shortcut for converting video to FLV. * * @access public *
File
- libraries/
phpvideotoolkit/ phpvideotoolkit.php5.php, line 3568
Class
Code
public function registerPostProcess($function, $class = false, $index = false) {
// create the callback
$callback = $class === false ? $function : array(
&$class,
$function,
);
// add it to the post process array
if ($index === false) {
array_push($this->_post_processes, $callback);
}
else {
$this->_post_processes[$index] = $callback;
}
}