You are here

public function PHPVideoToolkit::registerPostProcess in Video 7.2

Same name and namespace in other branches
  1. 7 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:

object|boolean $class The name of the callback class. If left as FALSE the callback will be treated as a standalone function.:

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.
PHPVideoToolkit::setFormatToFLV in libraries/phpvideotoolkit/phpvideotoolkit.php5.php
A shortcut for converting video to FLV.

File

libraries/phpvideotoolkit/phpvideotoolkit.php5.php, line 3253
Libary to access FFmpeg

Class

PHPVideoToolkit

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;
  }
}