mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 11:40:06 +02:00
Cine-Encoder: add recipe
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
minor = 0,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "Cine-Encoder",
|
||||
long_info = "@LONG_INFO@"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource("QT:QPA_FLAGS") "Q_REF_TO_ARGV|Q_REF_TO_FORK";
|
||||
|
||||
resource file_types message {
|
||||
"types" = "application/x-asf",
|
||||
"types" = "video",
|
||||
"types" = "audio"
|
||||
};
|
||||
|
||||
resource vector_icon {
|
||||
$"6E6369660602000602BAB91CBC02063D0011BC08D248ACB74A1E7A004F4E55FF"
|
||||
$"A7A7A7020016023D630C2C6DABACADEF3DBCAF4B3FE84960710041FF26051105"
|
||||
$"0105FF04015E060A043D2456443E5C263C0A043D2443225D4156440A043D5C56"
|
||||
$"445E4045580606B60D393B382F3E2F312FC3C0394844323E324832370A0C3C38"
|
||||
$"3C4A474C47493F483F43444444413F403F3C473D473A0605EA02475E505D5C56"
|
||||
$"524C524D524B3F5E070A050105000A03030201001001178313040A010101000A"
|
||||
$"020102000A000100000A0300000A0402030402402AAA0000000000003FD20EBC"
|
||||
$"00003FE570"
|
||||
};
|
||||
76
media-video/cine_encoder/cine_encoder-3.3.recipe
Normal file
76
media-video/cine_encoder/cine_encoder-3.3.recipe
Normal file
@@ -0,0 +1,76 @@
|
||||
SUMMARY="An application that allow to convert media files while preserving HDR metadata"
|
||||
DESCRIPTION="Cine Encoder is an application, uses the FFmpeg, MKVToolNix and MediaInfo utilities, \
|
||||
that allows to convert media files while preserving HDR metadata. Supported hardware encoding \
|
||||
NVENC for codecs H265, H264 and Intel QSV (for Windows and experimental for Linux) for codecs \
|
||||
H264, MPEG-2. The following encoding modes are implemented: H265, H264, VP9, MPEG-2, XDCAM, \
|
||||
DNxHR, ProRes."
|
||||
HOMEPAGE="https://github.com/CineEncoder/cine-encoder/"
|
||||
COPYRIGHT="Oleg Kozhukharenko"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/CineEncoder/cine-encoder/archive/refs/tags/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="fcabefd308132b249566500e29a01b9355bcfc47a345b5f50d52da8883c09681"
|
||||
SOURCE_DIR="cine-encoder-$portVersion"
|
||||
PATCHES="cine_encoder-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="cine_encoder.rdef.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
PROVIDES="
|
||||
cine_encoder$secondaryArchSuffix = $portVersion
|
||||
app:CineEncoder$secondaryArchSuffix = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
cmd:ffmpeg
|
||||
cmd:mediainfo
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libmediainfo$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
lib:libzen$secondaryArchSuffix
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libmediainfo$secondaryArchSuffix
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
devel:libzen$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:qmake$secondaryArchSuffix >= 5
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cd app
|
||||
qmake .
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/CineEncoder
|
||||
cp app/cine_encoder $appsDir/CineEncoder/CineEncoder
|
||||
cp share/cine-encoder.wav $appsDir/CineEncoder
|
||||
|
||||
local APP_SIGNATURE="application/x-vnd.cine-encoder"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
$portDir/additional-files/cine_encoder.rdef.in > cine_encoder.rdef
|
||||
|
||||
addResourcesToBinaries cine_encoder.rdef $appsDir/CineEncoder/CineEncoder
|
||||
addAppDeskbarSymlink $appsDir/CineEncoder/CineEncoder "Cine-Encoder"
|
||||
}
|
||||
81
media-video/cine_encoder/patches/cine_encoder-3.3.patchset
Normal file
81
media-video/cine_encoder/patches/cine_encoder-3.3.patchset
Normal file
@@ -0,0 +1,81 @@
|
||||
From 45529d3461d9cfc18fada9e4d3654e3977a77276 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Mon, 28 Jun 2021 22:41:30 +1000
|
||||
Subject: Fix for Haiku
|
||||
|
||||
|
||||
diff --git a/app/dialog.cpp b/app/dialog.cpp
|
||||
index 49ae585..a1915b4 100644
|
||||
--- a/app/dialog.cpp
|
||||
+++ b/app/dialog.cpp
|
||||
@@ -25,7 +25,7 @@ void Dialog::setMessage(const QString &_message, bool *_acceptFlag) /*** Set p
|
||||
QFont font;
|
||||
font.setPointSize(10);
|
||||
ui_dialog->label_title->setFont(font);
|
||||
-#ifdef Q_OS_WIN
|
||||
+#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU)
|
||||
QSound::play("./cine-encoder.wav");
|
||||
#else
|
||||
QSound::play("/usr/share/sounds/cine-encoder.wav");
|
||||
diff --git a/app/main.cpp b/app/main.cpp
|
||||
index 79d8b58..1e5a2b5 100644
|
||||
--- a/app/main.cpp
|
||||
+++ b/app/main.cpp
|
||||
@@ -12,10 +12,11 @@ int main(int argc, char *argv[])
|
||||
QCoreApplication::setOrganizationName("CineEncoder");
|
||||
QCoreApplication::setApplicationName("CineEncoder");
|
||||
QCoreApplication::setAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles, true);
|
||||
+#ifndef Q_OS_HAIKU
|
||||
QFont font = app.font();
|
||||
font.setPointSize(8);
|
||||
app.setFont(font);
|
||||
-
|
||||
+#endif
|
||||
QPixmap pixmap(":/resources/images/splash.png");
|
||||
QSplashScreen *splash = new QSplashScreen(pixmap);
|
||||
splash->show();
|
||||
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
|
||||
index 445adc9..94a0f2d 100644
|
||||
--- a/app/mainwindow.cpp
|
||||
+++ b/app/mainwindow.cpp
|
||||
@@ -32,6 +32,13 @@
|
||||
using namespace MediaInfoDLL;
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ #ifndef UNICODE
|
||||
+ #define UNICODE
|
||||
+ #endif
|
||||
+ #include <MediaInfo/MediaInfo.h>
|
||||
+ using namespace MediaInfoLib;
|
||||
+#endif
|
||||
|
||||
|
||||
Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
|
||||
@@ -1662,6 +1669,10 @@ void Widget::make_preset() /*** Make preset ***/
|
||||
QString intelQSVhwaccel = " -hwaccel vaapi -hwaccel_output_format vaapi";
|
||||
#endif
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ QString intelQSVhwaccel = " ";
|
||||
+#endif
|
||||
+
|
||||
/************************************* XDCAM presets **************************************/
|
||||
|
||||
QString xdcam_preset = "-pix_fmt yuv422p -c:v mpeg2video -profile:v 0 -flags ilme -top 1 "
|
||||
diff --git a/app/taskcomplete.cpp b/app/taskcomplete.cpp
|
||||
index 156e941..372fcce 100644
|
||||
--- a/app/taskcomplete.cpp
|
||||
+++ b/app/taskcomplete.cpp
|
||||
@@ -35,7 +35,7 @@ void Taskcomplete::setMessage(const QString &_message, const bool &_timer_mode)
|
||||
}
|
||||
else
|
||||
{
|
||||
-#ifdef Q_OS_WIN
|
||||
+#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU)
|
||||
QSound::play("./cine-encoder.wav");
|
||||
#else
|
||||
QSound::play("/usr/share/sounds/cine-encoder.wav");
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user