version bumps
This commit is contained in:
parent
b5b7fe7d9e
commit
4ba3af7926
6 changed files with 284 additions and 293 deletions
465
composer.lock
generated
465
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -85,20 +85,20 @@ class Media extends Extension
|
||||||
{
|
{
|
||||||
$sb = $event->panel->create_new_block("Media Engines");
|
$sb = $event->panel->create_new_block("Media Engines");
|
||||||
|
|
||||||
// if (self::imagick_available()) {
|
// if (self::imagick_available()) {
|
||||||
// try {
|
// try {
|
||||||
// $image = new Imagick(realpath('tests/favicon.png'));
|
// $image = new Imagick(realpath('tests/favicon.png'));
|
||||||
// $image->clear();
|
// $image->clear();
|
||||||
// $sb->add_label("ImageMagick detected");
|
// $sb->add_label("ImageMagick detected");
|
||||||
// } catch (ImagickException $e) {
|
// } catch (ImagickException $e) {
|
||||||
// $sb->add_label("<b style='color:red'>ImageMagick not detected</b>");
|
// $sb->add_label("<b style='color:red'>ImageMagick not detected</b>");
|
||||||
// }
|
// }
|
||||||
// } else {
|
// } else {
|
||||||
$sb->start_table();
|
$sb->start_table();
|
||||||
$sb->add_table_header("Commands");
|
$sb->add_table_header("Commands");
|
||||||
|
|
||||||
$sb->add_text_option(MediaConfig::CONVERT_PATH, "convert", true);
|
$sb->add_text_option(MediaConfig::CONVERT_PATH, "convert", true);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
$sb->add_text_option(MediaConfig::FFMPEG_PATH, "ffmpeg", true);
|
$sb->add_text_option(MediaConfig::FFMPEG_PATH, "ffmpeg", true);
|
||||||
$sb->add_text_option(MediaConfig::FFPROBE_PATH, "ffprobe", true);
|
$sb->add_text_option(MediaConfig::FFPROBE_PATH, "ffprobe", true);
|
||||||
|
@ -202,8 +202,8 @@ class Media extends Extension
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case MediaEngine::IMAGICK:
|
case MediaEngine::IMAGICK:
|
||||||
// if (self::imagick_available()) {
|
// if (self::imagick_available()) {
|
||||||
// } else {
|
// } else {
|
||||||
self::image_resize_convert(
|
self::image_resize_convert(
|
||||||
$event->input_path,
|
$event->input_path,
|
||||||
$event->input_mime,
|
$event->input_mime,
|
||||||
|
@ -227,9 +227,9 @@ class Media extends Extension
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Get output optimization tools working better
|
// TODO: Get output optimization tools working better
|
||||||
// if ($config->get_bool("thumb_optim", false)) {
|
// if ($config->get_bool("thumb_optim", false)) {
|
||||||
// exec("jpegoptim $outname", $output, $ret);
|
// exec("jpegoptim $outname", $output, $ret);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public const CONTENT_SEARCH_TERM_REGEX = "/^content[=|:]((video)|(audio)|(image)|(unknown))$/i";
|
public const CONTENT_SEARCH_TERM_REGEX = "/^content[=|:]((video)|(audio)|(image)|(unknown))$/i";
|
||||||
|
|
|
@ -63,12 +63,12 @@ abstract class VideoCodecs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// public static function is_input_supported(string $engine, string $mime): bool
|
// public static function is_input_supported(string $engine, string $mime): bool
|
||||||
// {
|
// {
|
||||||
// return MimeType::matches_array(
|
// return MimeType::matches_array(
|
||||||
// $mime,
|
// $mime,
|
||||||
// MediaEngine::INPUT_SUPPORT[$engine]
|
// MediaEngine::INPUT_SUPPORT[$engine]
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,9 +251,11 @@ class MimeType
|
||||||
$output = MimeType::PPM;
|
$output = MimeType::PPM;
|
||||||
break;
|
break;
|
||||||
// TODO: There is no uniquely defined Mime type for the cursor format. Need to figure this out.
|
// TODO: There is no uniquely defined Mime type for the cursor format. Need to figure this out.
|
||||||
// case FileExtension::CUR:
|
/*
|
||||||
// $output = MimeType::CUR;
|
case FileExtension::CUR:
|
||||||
// break;
|
$output = MimeType::CUR;
|
||||||
|
break;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,37 +65,37 @@ class TranscodeVideo extends Extension
|
||||||
$sb->end_table();
|
$sb->end_table();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public function onDataUpload(DataUploadEvent $event)
|
public function onDataUpload(DataUploadEvent $event)
|
||||||
{
|
{
|
||||||
// global $config;
|
global $config;
|
||||||
//
|
|
||||||
// if ($config->get_bool(TranscodeVideoConfig::UPLOAD) == true) {
|
if ($config->get_bool(TranscodeVideoConfig::UPLOAD) == true) {
|
||||||
// $ext = strtolower($event->type);
|
$ext = strtolower($event->type);
|
||||||
//
|
|
||||||
// $ext = Media::normalize_format($ext);
|
$ext = Media::normalize_format($ext);
|
||||||
//
|
|
||||||
// if ($event->type=="gif"&&Media::is_animated_gif($event->tmpname)) {
|
if ($event->type=="gif"&&Media::is_animated_gif($event->tmpname)) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// if (in_array($ext, array_values(self::INPUT_FORMATS))) {
|
if (in_array($ext, array_values(self::INPUT_FORMATS))) {
|
||||||
// $target_format = $config->get_string(TranscodeVideoConfig::UPLOAD_PREFIX.$ext);
|
$target_format = $config->get_string(TranscodeVideoConfig::UPLOAD_PREFIX.$ext);
|
||||||
// if (empty($target_format)) {
|
if (empty($target_format)) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
// try {
|
try {
|
||||||
// $new_image = $this->transcode_image($event->tmpname, $ext, $target_format);
|
$new_image = $this->transcode_image($event->tmpname, $ext, $target_format);
|
||||||
// $event->set_tmpname($new_image, Media::determine_ext($target_format));
|
$event->set_tmpname($new_image, Media::determine_ext($target_format));
|
||||||
// } catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
// log_error("transcode_video", "Error while performing upload transcode: ".$e->getMessage());
|
log_error("transcode_video", "Error while performing upload transcode: ".$e->getMessage());
|
||||||
// // We don't want to interfere with the upload process,
|
// We don't want to interfere with the upload process,
|
||||||
// // so if something goes wrong the untranscoded image jsut continues
|
// so if something goes wrong the untranscoded image jsut continues
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
public function onPageRequest(PageRequestEvent $event)
|
public function onPageRequest(PageRequestEvent $event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@ class CustomUploadTheme extends UploadTheme
|
||||||
// public function display_block(Page $page) {
|
// public function display_block(Page $page) {
|
||||||
// $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
// $page->add_block(new Block("Upload", $this->build_upload_block(), "left", 20));
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// public function display_full(Page $page) {
|
// public function display_full(Page $page) {
|
||||||
// $page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "left", 20));
|
// $page->add_block(new Block("Upload", "Disk nearly full, uploads disabled", "left", 20));
|
||||||
// }
|
// }
|
||||||
|
|
Reference in a new issue