added all codecs from totem, only using gst-libav for now tho; added gst-vaapi, further research required

This commit is contained in:
SpiritCS
2020-09-12 14:06:08 +02:00
parent f973f15444
commit c7be556e6e
18 changed files with 439 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
--- a52dec-0.7.4/configure~ 2002-07-28 06:50:42.000000000 +0300
+++ a52dec-0.7.4/configure 2006-02-16 23:03:07.000000000 +0200
@@ -5839,7 +5839,7 @@
shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
case $host_os in
--- a52dec-0.7.4/aclocal.m4~ 2002-07-28 06:50:38.000000000 +0300
+++ a52dec-0.7.4/aclocal.m4 2006-02-16 23:02:38.000000000 +0200
@@ -2141,7 +2141,7 @@
shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
+sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
case $host_os in

View File

@@ -0,0 +1,23 @@
--- ./configure~ 2002-07-28 06:50:42.000000000 +0300
+++ ./configure 2003-04-13 17:20:53.000000000 +0300
@@ -2857,13 +2857,13 @@
case "$host" in
i?86-* | k?-*)
- case "$host" in
- i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
- i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
- i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
- i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
- k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
- esac
+# case "$host" in
+# i386-*) OPT_CFLAGS="$CFLAGS -mcpu=i386";;
+# i486-*) OPT_CFLAGS="$CFLAGS -mcpu=i486";;
+# i586-*) OPT_CFLAGS="$CFLAGS -mcpu=pentium";;
+# i686-*) OPT_CFLAGS="$CFLAGS -mcpu=pentiumpro";;
+# k6-*) OPT_CFLAGS="$CFLAGS -mcpu=k6";;
+# esac
echo "$as_me:$LINENO: checking if $CC supports $OPT_CFLAGS flags" >&5
echo $ECHO_N "checking if $CC supports $OPT_CFLAGS flags... $ECHO_C" >&6
SAVE_CFLAGS="$CFLAGS"

View File

@@ -0,0 +1,49 @@
{
"name": "ffmpeg",
"config-opts": [
"--prefix=/app/lib/codecs/",
"--libdir=/app/lib/codecs/lib",
"--disable-debug",
"--disable-doc",
"--disable-static",
"--enable-optimizations",
"--enable-shared",
"--disable-ffplay",
"--disable-ffprobe",
"--disable-everything",
"--enable-gnutls",
"--enable-libaom",
"--enable-libdav1d",
"--enable-libfdk-aac",
"--enable-libmp3lame",
"--enable-libfontconfig",
"--enable-libfreetype",
"--enable-libopenh264",
"--enable-libopus",
"--enable-libpulse",
"--enable-libspeex",
"--enable-libtheora",
"--enable-libvorbis",
"--enable-libvpx",
"--enable-libwebp",
"--enable-openal",
"--enable-opengl",
"--enable-sdl2",
"--enable-decoder=ac3,alac,flac,g723_1,g729,libfdk_aac,libopus,mp2,mp3,m4a,pcm_alaw,pcm_mulaw,pcm_f32le,pcm_s16be,pcm_s24be,pcm_s16le,pcm_s24le,pcm_s32le,pcm_u8,tta,vorbis,wavpack,ape,dca,eac3,mlp,tak,truehd,wmav1,wmav2,wmapro",
"--enable-decoder=ass,ffv1,libaom_av1,libdav1d,libopenh264,libvpx_vp8,libvpx_vp9,rawvideo,theora,vp8,vp9,cinepak,flv,hevc,h263,h264,indeo2,indeo3,indeo4,indeo5,mpeg2video,mpeg4,msmpeg4,msmpeg4v1,msmpeg4v2,msmpeg4v3,vp6,vp6a,vp6f,wmv1,wmv2,wmv3,wmv3image",
"--enable-decoder=gif,png,tiff,webp",
"--enable-hwaccel=h264_vaapi,h264_vdpau,hevc_vaapi,hevc_vdpau",
"--enable-parser=aac,ac3,flac,mpegaudio,mpeg4video,opus,vp3,vp8,vorbis,hevc,h264,dca",
"--enable-demuxer=aac,ac3,ass,flac,gif,matroska,mov,mp3,mpegvideo,ogg,wav,avi,h264,m4v",
"--enable-filter=crop,scale",
"--enable-protocol=file"
],
"sources": [
{
"type": "git",
"url": "https://git.ffmpeg.org/ffmpeg.git",
"tag": "n4.2.4",
"commit": "f9f95ceebfbd7b7f43c1b7ad34e25d366e6e2d2b"
}
]
}

View File

@@ -0,0 +1,30 @@
From 2c371f17af1695bd42f572d5ccdb837152b8b67a Mon Sep 17 00:00:00 2001
From: Thomas Coldrick <othko97@gmail.com>
Date: Thu, 8 Nov 2018 17:46:53 +0000
Subject: [PATCH] gst-libav-stop-caching-codecs
---
ext/libav/gstav.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/ext/libav/gstav.c b/ext/libav/gstav.c
index 2a88230..bfd19a1 100644
--- a/ext/libav/gstav.c
+++ b/ext/libav/gstav.c
@@ -155,6 +155,13 @@ plugin_init (GstPlugin * plugin)
/* build global ffmpeg param/property info */
gst_ffmpeg_cfg_init ();
+ gst_plugin_add_dependency_simple (plugin, NULL,
+ "/app/lib/codecs/lib",
+ "libavcodec.so.58,"
+ "libavformat.so.58,"
+ "libswscale.so.5",
+ GST_PLUGIN_DEPENDENCY_FLAG_NONE);
+
gst_ffmpegaudenc_register (plugin);
gst_ffmpegvidenc_register (plugin);
gst_ffmpegauddec_register (plugin);
--
2.19.1

View File

@@ -0,0 +1,23 @@
{
"name": "gst-libav",
"buildsystem": "meson",
"config-opts": [
"-Ddoc=disabled"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.freedesktop.org/gstreamer/gst-libav.git",
"tag": "1.16.2",
"commit": "090cfd40aad49ad645a9bf4bdd62e65b739c95f3"
},
{
"type": "patch",
"path": "gst-libav-stop-caching-codecs.patch"
}
],
"post-install": [
"mkdir -p /app/lib/codecs/lib/gstreamer-1.0",
"mv /app/lib/gstreamer-1.0/*.so /app/lib/codecs/lib/gstreamer-1.0"
]
}

View File

@@ -0,0 +1,28 @@
From 40ab4538575dffc7791c7d289d60d30153723307 Mon Sep 17 00:00:00 2001
From: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Date: Thu, 19 Dec 2019 15:19:29 -0500
Subject: [PATCH] autoconvert: Fix lock-less exchange or free condition
Before this change, we would free the list we just have saved.
Fixes #1158
---
gst/autoconvert/gstautoconvert.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst/autoconvert/gstautoconvert.c b/gst/autoconvert/gstautoconvert.c
index 46bec1314..7bf7cac3c 100644
--- a/gst/autoconvert/gstautoconvert.c
+++ b/gst/autoconvert/gstautoconvert.c
@@ -895,7 +895,7 @@ gst_auto_convert_load_factories (GstAutoConvert * autoconvert)
g_assert (all_factories);
- if (g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL,
+ if (!g_atomic_pointer_compare_and_exchange (&autoconvert->factories, NULL,
all_factories)) {
gst_plugin_feature_list_free (all_factories);
}
--
2.22.2

View File

@@ -0,0 +1,25 @@
{
"name": "gst-plugins-bad",
"buildsystem": "meson",
"cleanup": [ "/bin/*webrtc*", "/bin/crossfade", "/bin/tsparser", "/bin/playout" ],
"config-opts": [
"-Dopenh264=disabled",
"-Dvdpau=disabled"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad.git",
"tag": "1.16.2",
"commit": "a6f26408f74a60d02ce6b4f0daee392ce847055f"
},
{
"type": "patch",
"path": "gst-plugins-bad-927.patch"
}
],
"post-install": [
"mkdir -p /app/lib/codecs/lib/gstreamer-1.0",
"mv /app/lib/gstreamer-1.0/*.so /app/lib/codecs/lib/gstreamer-1.0"
]
}

View File

@@ -0,0 +1,19 @@
{
"name": "gst-plugins-ugly",
"buildsystem": "meson",
"config-opts": [
"-Dmpeg2dec=enabled"
],
"sources": [
{
"type": "git",
"url": "https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly.git",
"tag": "1.16.2",
"commit": "4b2943ee2788331e4000f0f7e226cd5ce2c135a4"
}
],
"post-install": [
"mkdir -p /app/lib/codecs/lib/gstreamer-1.0",
"mv /app/lib/gstreamer-1.0/*.so /app/lib/codecs/lib/gstreamer-1.0"
]
}

View File

@@ -0,0 +1,39 @@
From 4c18c43b4d4ccb1d05ae73b813f26ba193fbeee3 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Fri, 18 Jan 2019 17:37:13 +0100
Subject: [PATCH] Prefer PIC
---
configure | 2 +-
liba52/configure.incl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index b81fdff..bc0267c 100755
--- a/configure
+++ b/configure
@@ -9640,7 +9640,7 @@ _ACEOF
-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
+LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-pic"
# Check whether --enable-double or --disable-double was given.
if test "${enable_double+set}" = set; then
diff --git a/liba52/configure.incl b/liba52/configure.incl
index 4dbbcea..5eb69ee 100644
--- a/liba52/configure.incl
+++ b/liba52/configure.incl
@@ -2,7 +2,7 @@ AC_SUBST([LIBA52_CFLAGS])
AC_SUBST([LIBA52_LIBS])
dnl avoid -fPIC when possible
-LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-non-pic"
+LIBA52_CFLAGS="$LIBA52_CFLAGS -prefer-pic"
AC_ARG_ENABLE([double],
[ --enable-double use double-precision samples])
--
2.20.1

View File

@@ -0,0 +1,17 @@
diff -ru a52dec.orig/liba52/imdct.c a52dec/liba52/imdct.c
--- a52dec.orig/liba52/imdct.c 2012-02-06 19:40:21.000000000 +0200
+++ a52dec/liba52/imdct.c 2012-02-06 19:40:53.000000000 +0200
@@ -419,13 +419,11 @@
#ifdef LIBA52_DJBFFT
if (mm_accel & MM_ACCEL_DJBFFT) {
- fprintf (stderr, "Using djbfft for IMDCT transform\n");
ifft128 = (void (*) (complex_t *)) fftc4_un128;
ifft64 = (void (*) (complex_t *)) fftc4_un64;
} else
#endif
{
- fprintf (stderr, "No accelerated IMDCT transform found\n");
ifft128 = ifft128_c;
ifft64 = ifft64_c;
}

View File

@@ -0,0 +1,36 @@
{
"name": "liba52",
"config-opts": [ "--enable-shared", "--disable-static" ],
"rm-configure": true,
"cleanup": [ "/bin/*a52*" ],
"sources": [
{
"type": "archive",
"url": "http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz",
"sha256": "a21d724ab3b3933330194353687df82c475b5dfb997513eef4c25de6c865ec33"
},
{
"type": "patch",
"path": "a52dec-0.7.4-rpath64.patch"
},
{
"type": "patch",
"path": "a52dec-configure-optflags.patch"
},
{
"type": "patch",
"path": "liba52-silence.patch"
},
{
"type": "patch",
"path": "liba52-prefer-pic.patch"
},
{
"type":"script",
"commands":[
"autoreconf -fiv"
],
"dest-filename":"autogen.sh"
}
]
}

View File

@@ -0,0 +1,18 @@
{
"name": "libass",
"sources": [
{
"type": "git",
"url": "https://github.com/libass/libass.git",
"tag": "0.14.0",
"commit": "73284b676b12b47e17af2ef1b430527299e10c17"
},
{
"type":"script",
"commands":[
"autoreconf -fiv"
],
"dest-filename":"autogen.sh"
}
]
}

View File

@@ -0,0 +1,18 @@
{
"name": "libdvdcss",
"sources": [
{
"type": "git",
"url": "https://code.videolan.org/videolan/libdvdcss.git",
"tag": "1.4.2",
"commit": "7b7c185704567398627ad0f9a0d948a63514394b"
},
{
"type":"script",
"commands":[
"autoreconf -fiv"
],
"dest-filename":"autogen.sh"
}
]
}

View File

@@ -0,0 +1,18 @@
{
"name": "libdvdnav",
"sources": [
{
"type": "git",
"url": "https://code.videolan.org/videolan/libdvdnav.git",
"tag": "6.1.0",
"commit": "4f48efd43efb2e3372cb494a8893342e1fb507ae"
},
{
"type":"script",
"commands":[
"autoreconf -fiv"
],
"dest-filename":"autogen.sh"
}
]
}

View File

@@ -0,0 +1,18 @@
{
"name": "libdvdread",
"sources": [
{
"type": "git",
"url": "https://code.videolan.org/videolan/libdvdread.git",
"tag": "6.1.0",
"commit": "d413571ce39acd404523b6742ba361215f6ada68"
},
{
"type":"script",
"commands":[
"autoreconf -fiv"
],
"dest-filename":"autogen.sh"
}
]
}

View File

@@ -0,0 +1,10 @@
--- libmpeg2/configure.ac 2016-01-20 15:31:37.933547037 +0100
+++ libmpeg2.new/configure.ac 2016-01-20 15:05:40.931231465 +0100
@@ -149,7 +149,6 @@
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
-AC_C_ALWAYS_INLINE
AC_C_RESTRICT
AC_C_BUILTIN_EXPECT
AC_C_BIGENDIAN

View File

@@ -0,0 +1,24 @@
{
"name": "libmpeg2",
"config-opts": [ "--enable-shared", "--disable-static" ],
"rm-configure": true,
"cleanup": [ "/bin/*mpeg2*" ],
"sources": [
{
"type": "archive",
"url": "http://libmpeg2.sourceforge.net/files/libmpeg2-0.5.1.tar.gz",
"sha256": "dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4"
},
{
"type": "patch",
"path": "libmpeg2-inline.patch"
},
{
"type":"script",
"commands":[
"autoreconf -fiv"
],
"dest-filename":"autogen.sh"
}
]
}

View File

@@ -11,13 +11,34 @@ finish-args:
- --filesystem=xdg-videos
- --socket=pulseaudio
- --share=network
- --env=GST_PLUGIN_PATH=/app/lib/codecs/lib/gstreamer-1.0
# maybe add additinal codecs?
modules:
# gstreamer from the gnome runtime is outdated, maybe upgrade all modules?
- name: gst-vaapi
buildsystem: meson
sources:
- type: git
url: git://anongit.freedesktop.org/gstreamer/gstreamer-vaapi
tag: 1.16.2
post-install:
- mkdir -p /app/lib/codecs/lib/gstreamer-1.0
- mv /app/lib/gstreamer-1.0/*.so /app/lib/codecs/lib/gstreamer-1.0
#- codecs/liba52.json
#- codecs/libmpeg2.json
#- codecs/gst-plugins-ugly.json
#- codecs/libdvdcss.json
#- codecs/libdvdread.json
#- codecs/libdvdnav.json
#- codecs/libass.json
#- codecs/ffmpeg.json
- codecs/gst-libav.json
#- codecs/gst-plugins-bad.json
- name: clapper
buildsystem: meson
sources:
- type: git
url: https://github.com/Rafostar/clapper.git
commit: 22e8e443162825f00666ca6898be3e868a3c0749
commit: 6938f014332562e1b7c8f22bf755338268b98d5f