Ejemplo n.º 1
0
 public function index()
 {
     $username = Session::getUsername();
     $start_url = APP_CWD . "/../files/Q8_best.mov";
     $output_url = APP_CWD . "/../files/Ciao";
     $prova = JambonCoreFactory::getInstance();
     $prova->initTranscodeOperation("X264", false, '200X200', 2, $start_url, $output_url);
     $res = $prova->performTranscodeOperation();
     return $res;
 }
Ejemplo n.º 2
0
 /**
  * Crea un Job per un customer
  * @param $data
  * @return JobModel
  */
 public function createJob($data)
 {
     if (empty($data)) {
         throw new \Exception("Error in parsing data");
     }
     $this->parseInputData($data);
     $jobModel = $this->dbTrans(function () {
         $input = $this->jobEntity->getInput();
         $callback = $this->jobEntity->getCallback();
         $output = $this->jobEntity->getOutput();
         $customer = Session::getUsername();
         $job = JobModel::create($customer)->setSource($input['url'], $input['fileName'], @$input['md5Hash'], @$input['headers'], @$input['verb'], @$input['keyRegexp'], @$input['tokenRegexp'])->setCallback($input['url'], @$input['headers'], @$input['additionalInfo'], @$input['verb'], @$input['keyRegexp'], @$input['tokenRegexp']);
         foreach ($output as $out) {
             $task = TaskModel::create($job, $out['format'], $out['resolution'], $out['extra']);
         }
         return $job;
     });
     return $jobModel;
 }