You are here

public function PHPVideoToolkit::fileHasVideo in Video 7

Same name and namespace in other branches
  1. 7.2 libraries/phpvideotoolkit/phpvideotoolkit.php5.php \PHPVideoToolkit::fileHasVideo()

* Determines if the input media has a video stream. * * @access public *

Parameters

string $file The absolute path of the file that is required to be manipulated.: * @return bool *

File

libraries/phpvideotoolkit/phpvideotoolkit.php5.php, line 1067

Class

PHPVideoToolkit

Code

public function fileHasVideo($file = false) {

  // 			check to see if this is a static call
  if ($file !== false && isset($this) === false) {
    $toolkit = new PHPVideoToolkit();
    $data = $toolkit
      ->getFileInfo($file);
  }
  else {
    if ($file === false) {
      if (!$this->_input_file) {

        //					input file not valid
        return $this
          ->_raiseError('inputFileHasVideo_no_input');

        //<-				exits
      }
      $file = $this->_input_file;
      $data = $this
        ->getFileInfo($file);
    }
  }
  return isset($data['video']);
}