[vlc-commits] [Git][videolan/vlc][master] 7 commits: meson: fix faad2 detection

Steve Lhomme (@robUx4) gitlab at videolan.org
Sat Nov 16 10:34:01 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
5d1be3dc by Steve Lhomme at 2024-11-16T09:52:59+00:00
meson: fix faad2 detection

The faad2 pkg-config is the one used by autotools.

- - - - -
0aa6f111 by Steve Lhomme at 2024-11-16T09:52:59+00:00
meson: add gme module

- - - - -
557e942e by Steve Lhomme at 2024-11-16T09:52:59+00:00
meson: mpcdec demuxer

- - - - -
db7e130b by Steve Lhomme at 2024-11-16T09:52:59+00:00
contrib: sidplay2: don't depend on libtool to use libsidplay2

Meson doesn't understand this syntax.
That's the only contrib defining the "Libs" like that.

- - - - -
15efb78b by Steve Lhomme at 2024-11-16T09:52:59+00:00
meson: add sidplay demuxer

- - - - -
d5af5dd4 by Steve Lhomme at 2024-11-16T09:52:59+00:00
meson: include hw subdir after video_output

So we can use gl_common_dep

- - - - -
0d71a713 by Steve Lhomme at 2024-11-16T09:52:59+00:00
meson: add nvdec modules

- - - - -


8 changed files:

- config.h.meson
- contrib/src/sidplay2/rules.mak
- meson_options.txt
- modules/codec/meson.build
- modules/demux/meson.build
- modules/hw/meson.build
- + modules/hw/nvdec/meson.build
- modules/meson.build


Changes:

=====================================
config.h.meson
=====================================
@@ -274,6 +274,8 @@
 /* Define to 1 if you have the `mmap' function. */
 #mesondefine HAVE_MMAP
 
+/* Define to 1 if you have the <mpc/mpcdec.h> header file. */
+#mesondefine HAVE_MPC_MPCDEC_H
 
 /* Define to 1 if you have the NANF function */
 #mesondefine HAVE_NANF


=====================================
contrib/src/sidplay2/rules.mak
=====================================
@@ -34,6 +34,8 @@ sidplay-libs: sidplay-libs-$(SID_VERSION).tar.gz .sum-sidplay2
 	$(APPLY) $(SRC)/sidplay2/sidplay2-char-cast.patch
 	$(APPLY) $(SRC)/sidplay2/sidplay2-fix-overflow.patch
 	$(APPLY) $(SRC)/sidplay2/sidplay2-cxxtest.patch
+	# don't depend on libtool to use libsidplay2
+	sed -i.orig 's,$${libdir}/libsidplay2.la,-L$${libdir} -lsidplay2,' "$(UNPACK_DIR)/libsidplay/unix/libsidplay2.pc.in"
 	$(MOVE)
 
 .sidplay2: sidplay-libs


=====================================
meson_options.txt
=====================================
@@ -710,14 +710,29 @@ option('aribcaption',
     value: 'auto',
     description: 'ARIB caption decoder/renderer support')
 
+option('gme',
+    type: 'feature',
+    value: 'auto',
+    description: 'Game Music Emu support')
+
+option('mpc',
+    type: 'feature',
+    value: 'auto',
+    description: 'libmpcdec support')
+
+option('sid',
+    type: 'feature',
+    value: 'auto',
+    description: 'C64 sid demux support')
+
+option('nvdec',
+    type: 'feature',
+    value: 'auto',
+    description: 'NVDEC decoder support')
 
 # TODO: Missing live555
 # TODO: Missing v4l2
-# TODO: Missing nvdec
 # TODO: Missing decklink
-# TODO: Missing gme
-# TODO: Missing sid
-# TODO: Missing mpc
 # TODO: Missing rpi-omxil
 # TODO: Missing gst-decode
 # TODO: Missing merge-ffmpeg
@@ -742,5 +757,4 @@ option('aribcaption',
 # TODO: Missing osx_notifications
 # TODO: Missing dsm
 # TODO: Missing asdcplib
-# TODO: Missing faad2
 # TODO: Missing chromecast


=====================================
modules/codec/meson.build
=====================================
@@ -41,7 +41,7 @@ vlc_modules += {
 }
 
 # faad decoder plugin
-faad_lib = cc.find_library('faad', required: get_option('faad'))
+faad_lib = dependency('faad2', required: get_option('faad'))
 vlc_modules += {
     'name' : 'faad',
     'sources' : files('faad.c'),


=====================================
modules/demux/meson.build
=====================================
@@ -368,6 +368,50 @@ if libdvbpsi_dep.found()
     }
 endif
 
+# GME
+gme_dep = dependency('libgme', required: get_option('gme'))
+vlc_modules += {
+    'name' : 'gme',
+    'sources' : files('gme.c'),
+    'dependencies' : [gme_dep],
+    'enabled': gme_dep.found(),
+}
+
+# mpc
+if get_option('mpc').allowed()
+mpc_dep = disabler()
+if cc.check_header('mpc/mpcdec.h')
+    mpc_dep = cc.find_library('mpcdec')
+    cdata.set('HAVE_MPC_MPCDEC_H', 1)
+elif cc.check_header('mpc/mpcdec.h', include_directories: include_directories( contrib_incdir ) )
+    if cc.find_library('mpcdec', dirs: contrib_libdir).found()
+        mpc_dep = declare_dependency(
+            dependencies: [cc.find_library('mpcdec', dirs: contrib_libdir)],
+            include_directories: [include_directories( contrib_incdir )])
+        cdata.set('HAVE_MPC_MPCDEC_H', 1)
+    endif
+endif
+endif
+vlc_modules += {
+    'name' : 'mpc',
+    'sources' : files('mpc.c'),
+    'dependencies' : [mpc_dep, m_lib],
+    'enabled' : mpc_dep.found(),
+}
+
+# sid
+sid_dep = dependency('libsidplay2', required: get_option('sid'))
+if cpp.check_header('sidplay/builders/resid.h', dependencies: sid_dep)
+resid_dep = cpp.find_library('resid-builder', dirs: contrib_libdir)
+vlc_modules += {
+    'name' : 'sid',
+    'sources' : files('sid.cpp'),
+    'dependencies' : [sid_dep, resid_dep],
+    'enabled': sid_dep.found() and resid_dep.found()
+}
+endif
+
+
 # Adaptive streams demuxer
 
 vlc_modules += {


=====================================
modules/hw/meson.build
=====================================
@@ -1,5 +1,8 @@
 # Hardware/GPU modules
 
+# nvdec hw module
+subdir('nvdec')
+
 if host_system == 'windows'
     # d3d11 interface module
     subdir('d3d11')


=====================================
modules/hw/nvdec/meson.build
=====================================
@@ -0,0 +1,30 @@
+if get_option('nvdec').allowed()
+nvdec_dep = disabler()
+if cc.check_header('ffnvcodec/dynlink_loader.h')
+    nvdec_dep = enabler()
+elif cc.check_header('ffnvcodec/dynlink_loader.h', include_directories: include_directories( contrib_incdir ) )
+    nvdec_dep = declare_dependency(
+        include_directories: [include_directories( contrib_incdir )])
+endif
+endif
+vlc_modules += {
+    'name' : 'nvdec',
+    'sources' : files('nvdec.c', 'hw_pool.c'),
+    'link_with' : [hxxxhelper_lib],
+    'dependencies' : [nvdec_dep, dl_lib],
+    'enabled' : nvdec_dep.found(),
+}
+
+vlc_modules += {
+    'name' : 'nvdec_chroma',
+    'sources' : files('chroma.c'),
+    'dependencies' : [nvdec_dep],
+    'enabled' : nvdec_dep.found(),
+}
+
+vlc_modules += {
+    'name' : 'glinterop_nvdec',
+    'sources' : files('nvdec_gl.c'),
+    'dependencies' : [ nvdec_dep, gl_common_dep, dl_lib ],
+    'enabled' : nvdec_dep.found() and gl_common_dep.found(),
+}


=====================================
modules/meson.build
=====================================
@@ -269,9 +269,6 @@ subdir('audio_output')
 # control modules
 subdir('control')
 
-# hardware modules
-subdir('hw')
-
 # gui modules
 subdir('gui')
 
@@ -314,6 +311,9 @@ subdir('video_filter')
 # video output modules
 subdir('video_output')
 
+# hardware modules
+subdir('hw')
+
 # video splitter modules
 subdir('video_splitter')
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d86a61ec1340eda4729c89ffdd51782a0aba843a...0d71a71377fb71b63cead302ac114d212546aad8

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/d86a61ec1340eda4729c89ffdd51782a0aba843a...0d71a71377fb71b63cead302ac114d212546aad8
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list