protected function createConversionInDb($entry_id, $full_file_name, $conv_cmd = null) { try { $conversion = new conversion(); $entry_id = self::getEntryIdFromFileName($full_file_name); $conversion->setEntryId($entry_id); $conversion->setInFileName($full_file_name); $conversion->setInFileExt(pathinfo($full_file_name, PATHINFO_EXTENSION)); $conversion->setInFileSize(filesize($full_file_name)); $conversion->setStatus(conversion::CONVERSION_STATUS_PRECONVERT); if ($conv_cmd) { // TODO - find a better way to serialize the params ! $conversion->setConversionParams(print_r($conv_cmd->conversion_params_list, true)); } $conversion->save(); } catch (Exception $ex) { // Do NOT fail the actual conversion KalturaLog::debug("Problem reporting conversion details to DB (part I) " . $ex->getTraceAsString()); } }