[vlc-commits] [Git][videolan/vlc][master] 7 commits: meson: Ensure Qt subdirectory is included only if enabled and if dependencies are found
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu May 14 12:09:19 UTC 2026
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
b472e820 by Arthur Vasseur at 2026-05-14T11:54:40+00:00
meson: Ensure Qt subdirectory is included only if enabled and if dependencies are found
- - - - -
e4de8690 by Arthur Vasseur at 2026-05-14T11:54:40+00:00
meson: Add Android audio output modules and dependencies
- - - - -
b0feb8aa by Arthur Vasseur at 2026-05-14T11:54:40+00:00
meson: Add Android MediaCodec video/audio decoder module
- - - - -
0459c25d by Arthur Vasseur at 2026-05-14T11:54:40+00:00
meson: Add Android video output stack
Add android_window, android_display, egl_android, glinterop_asurface and glinterop_aimage modules. Build android_display with its own copy of the opengl sources against GLESv2, since gl_common_dep pulls in desktop -lGL which doesn't exist on Android. Also guard egl_surfacetexture behind host_system == 'android' so android_lib is only resolved on that platform.
- - - - -
b7be46b2 by Arthur Vasseur at 2026-05-14T11:54:40+00:00
meson: Add macOS window provider module
- - - - -
58daf2d6 by Arthur Vasseur at 2026-05-14T11:54:40+00:00
meson: Update iOS platform dependencies and configurations
- - - - -
8f80d9f7 by Arthur Vasseur at 2026-05-14T11:54:40+00:00
meson: rtp: avoid disabling the whole module when gcrypt is missing
Including a disabler() srtp_dep in the rtp module's dependencies list propagates and silently disables the entire rtp module, so librtp_plugin is never installed and VLC loses the ability to demux .sdp files (the sdp module alone only handles the sdp:// URL scheme). Keep srtp_dep as a disabler() and only add it to the rtp module's dependencies when found, matching the autotools --disable-gcrypt behaviour.
- - - - -
11 changed files:
- meson.build
- modules/access/rtp/meson.build
- + modules/audio_output/android/meson.build
- modules/audio_output/meson.build
- modules/codec/meson.build
- modules/meson.build
- modules/services_discovery/meson.build
- modules/video_filter/meson.build
- modules/video_output/apple/meson.build
- modules/video_output/meson.build
- src/meson.build
Changes:
=====================================
meson.build
=====================================
@@ -91,6 +91,10 @@ endif
cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
host_system = host_machine.system()
+# VLC uses 'darwin' for all Apple platforms; remap 'ios'/'tvos'/'visionos' accordingly.
+if host_system in ['ios', 'tvos', 'visionos']
+ host_system = 'darwin'
+endif
list_inc_dirs = ['.', 'include']
if cc.get_id() == 'msvc' or cc.get_id() == 'clang-cl'
@@ -204,8 +208,8 @@ if iconv_dep.found()
endif
if host_system == 'darwin'
- corefoundation_dep = dependency('CoreFoundation', required: true)
- foundation_dep = dependency('Foundation', required: true)
+ corefoundation_dep = declare_dependency(link_args: ['-framework', 'CoreFoundation'])
+ foundation_dep = declare_dependency(link_args: ['-framework', 'Foundation'])
else
corefoundation_dep = []
foundation_dep = []
=====================================
modules/access/rtp/meson.build
=====================================
@@ -18,6 +18,11 @@ else
srtp_dep = disabler()
endif
+rtp_deps = [socket_libs]
+if srtp_dep.found()
+ rtp_deps += srtp_dep
+endif
+
vlc_modules += {
'name': 'rtp',
'sources':
@@ -30,7 +35,7 @@ vlc_modules += {
'rtp.c',
'rtp.h',
),
- 'dependencies': [socket_libs, srtp_dep],
+ 'dependencies': rtp_deps,
'link_with': [rtp_lib],
}
=====================================
modules/audio_output/android/meson.build
=====================================
@@ -0,0 +1,34 @@
+android_env_c = files('../../video_output/android/env.c')
+
+android_audio_common = files(
+ 'audioformat_jni.c',
+ 'dynamicsprocessing_jni.c',
+)
+
+vlc_modules += {
+ 'name' : 'android_audiodev',
+ 'sources' : [android_audio_common, android_env_c, files('device.c')],
+ 'enabled' : host_system == 'android',
+}
+
+vlc_modules += {
+ 'name' : 'audiotrack',
+ 'sources' : [android_audio_common, android_env_c, files('audiotrack.c')],
+ 'enabled' : host_system == 'android',
+}
+
+opensles_lib = cc.find_library('OpenSLES', required: false)
+vlc_modules += {
+ 'name' : 'opensles',
+ 'sources' : files('opensles.c'),
+ 'dependencies' : [opensles_lib],
+ 'enabled' : host_system == 'android' and opensles_lib.found(),
+}
+
+aaudio_lib = cc.find_library('aaudio', required: false)
+vlc_modules += {
+ 'name' : 'aaudio',
+ 'sources' : [android_audio_common, android_env_c, files('aaudio.c')],
+ 'dependencies' : [aaudio_lib],
+ 'enabled' : host_system == 'android' and aaudio_lib.found(),
+}
=====================================
modules/audio_output/meson.build
=====================================
@@ -1,5 +1,7 @@
# Audio output modules
+subdir('android')
+
# Dummy audio output
vlc_modules += {
'name' : 'adummy',
=====================================
modules/codec/meson.build
=====================================
@@ -526,9 +526,14 @@ vlc_modules += {
if host_system == 'darwin'
libvlc_vtutils = static_library('vlc_vtutils',
- files('vt_utils.c', 'vt_utils.h'),
+ files('vt_utils.c', 'vt_utils.h', 'vt_utils_native.m'),
include_directories : vlc_include_dirs,
- dependencies : [corevideo_dep])
+ dependencies : [
+ corevideo_dep,
+ frameworks['Metal'],
+ frameworks['Foundation']
+ ]
+ )
vlc_modules += {
'name' : 'videotoolbox',
@@ -731,6 +736,28 @@ vlc_modules += {
'enabled' : get_option('omxil'),
}
+# Android MediaCodec video/audio decoder
+mediandk_lib = cc.find_library('mediandk', required: false)
+vlc_modules += {
+ 'name' : 'mediacodec',
+ 'sources' : files(
+ 'omxil/mediacodec.c',
+ 'omxil/mediacodec_ndk.c',
+ 'omxil/mediacodec_jni.c',
+ 'omxil/utils.c',
+ 'omxil/qcom.c',
+ ),
+ 'include_directories' : [include_directories('.'), include_directories('omxil')],
+ 'link_with' : [hxxxhelper_lib, chroma_copy_lib, libandroid_utils, libandroid_env],
+ 'dependencies' : [
+ mediandk_lib,
+ cc.find_library('android', required: host_system == 'android'),
+ cc.find_library('EGL', required: host_system == 'android'),
+ cc.find_library('GLESv2', required: host_system == 'android'),
+ ],
+ 'enabled' : host_system == 'android' and mediandk_lib.found(),
+}
+
## x26X encoders
# x265 encoder
=====================================
modules/meson.build
=====================================
@@ -96,6 +96,7 @@ framework_conditions = [
'CoreImage',
'CoreGraphics',
'AVKit',
+ 'Metal',
],
'condition': host_system == 'darwin'
},
@@ -377,7 +378,7 @@ endif
# This has to be declared here as it needs to end up
# in the modules folder, not in gui/qt/ subfolder as
# vlc-static would not find it there.
-if qt6_dep.found()
+if get_option('qt').allowed() and qt6_dep.found()
executable('vlc-qt-check',
files('gui/qt/vlc-qt-check.cpp'),
dependencies: [qt6_dep, qt_extra_deps],
=====================================
modules/services_discovery/meson.build
=====================================
@@ -44,7 +44,7 @@ if upnp_dep.found()
upnp_darwin_deps = []
if host_system == 'darwin'
- systemconfiguration_dep = dependency('SystemConfiguration', required: true)
+ systemconfiguration_dep = dependency('appleframeworks', modules: 'SystemConfiguration', required: true)
upnp_darwin_deps = [corefoundation_dep, systemconfiguration_dep]
endif
=====================================
modules/video_filter/meson.build
=====================================
@@ -95,7 +95,7 @@ vlc_modules += {
vlc_modules += {
'name' : 'egl_surfacetexture',
'sources' : files('egl_surfacetexture.c'),
- 'dependencies' : [egl_dep, opengles2_dep],
+ 'dependencies' : [android_lib, egl_dep, opengles2_dep],
'c_args' : ['-DUSE_OPENGL_ES2'],
'link_with' : [libandroid_env, libandroid_utils, libvlc_opengles],
'enabled' : host_system == 'android' and egl_dep.found(),
=====================================
modules/video_output/apple/meson.build
=====================================
@@ -48,6 +48,7 @@ vlc_modules += {
frameworks['QuartzCore'],
frameworks['CoreVideo'],
frameworks['CoreGraphics'],
+ frameworks['CoreImage'],
frameworks['VideoToolbox'],
],
}
@@ -72,6 +73,7 @@ if have_ios or have_tvos
'dependencies' : [
frameworks['Foundation'],
frameworks['UIKit'],
+ frameworks['CoreGraphics'],
],
}
endif
=====================================
modules/video_output/meson.build
=====================================
@@ -13,8 +13,7 @@ else
missing_win_glew = false
endif
-if missing_win_glew
- # Our OpenGL code requires glew.h to be present
+if missing_win_glew or have_ios
opengl_dep = disabler()
else
opengl_dep = dependency('gl', required: false)
@@ -27,6 +26,15 @@ drm_dep = dependency('libdrm', version: '>= 2.4.83', required: get_option('drm')
if host_system == 'darwin'
subdir('apple')
+
+ vlc_modules += {
+ 'name' : 'window_macosx',
+ 'sources' : files('window_macosx.m'),
+ 'objc_args' : ['-fobjc-arc', '-fobjc-exceptions'],
+ 'dependencies' : [
+ frameworks['Cocoa'],
+ ],
+ }
endif
subdir('libplacebo')
@@ -48,6 +56,72 @@ vlc_modules += {
'sources' : files('wdummy.c')
}
+android_lib = []
+
+# Android window provider (vout window + AWINDOW decoder device)
+if host_system == 'android'
+ android_lib = cc.find_library('android')
+ egl_lib = cc.find_library('EGL')
+ glesv2_lib = cc.find_library('GLESv2')
+ vlc_modules += {
+ 'name' : 'android_window',
+ 'sources' : files('android/window.c'),
+ 'link_with' : [libandroid_utils, libandroid_env],
+ 'dependencies' : [android_lib, egl_lib, glesv2_lib],
+ }
+ # gl_common_dep pulls in desktop OpenGL (-lGL) which doesn't exist on Android.
+ # Build the android display module with its own copy of the opengl sources,
+ # using OpenGL ES 2 headers/libs instead.
+ android_gl_sources = files(
+ 'opengl/filter.c',
+ 'opengl/filters.c',
+ 'opengl/gl_api.c',
+ 'opengl/gl_util.c',
+ 'opengl/importer.c',
+ 'opengl/interop.c',
+ 'opengl/picture.c',
+ 'opengl/sampler.c',
+ 'opengl/sub_renderer.c',
+ 'opengl/renderer.c',
+ 'opengl/vout_helper.c',
+ )
+ vlc_modules += {
+ 'name' : 'android_display',
+ 'sources' : [files('android/display.c'), android_gl_sources],
+ 'c_args' : ['-DUSE_OPENGL_ES2'],
+ 'include_directories' : [vlc_include_dirs],
+ 'link_with' : [libandroid_utils, libandroid_env],
+ 'dependencies' : [android_lib, egl_lib, glesv2_lib, m_lib],
+ }
+
+ # EGL display module for Android
+ vlc_modules += {
+ 'name' : 'egl_android',
+ 'sources' : files('opengl/egl.c'),
+ 'c_args' : ['-DUSE_PLATFORM_ANDROID=1'],
+ 'link_with' : [libandroid_utils, libandroid_env],
+ 'dependencies' : [android_lib, egl_lib, glesv2_lib],
+ }
+
+ # OpenGL ES 2 interop for Android Surface (SurfaceTexture / ANativeWindow)
+ vlc_modules += {
+ 'name' : 'glinterop_asurface',
+ 'sources' : files('opengl/interop_asurface.c'),
+ 'c_args' : ['-DUSE_OPENGL_ES2'],
+ 'link_with' : [libandroid_utils, libandroid_env],
+ 'dependencies' : [android_lib, egl_lib, glesv2_lib],
+ }
+
+ # OpenGL ES 2 interop for Android Image (AImageReader)
+ vlc_modules += {
+ 'name' : 'glinterop_aimage',
+ 'sources' : files('opengl/interop_aimage.c'),
+ 'c_args' : ['-DUSE_OPENGL_ES2'],
+ 'link_with' : [libandroid_utils],
+ 'dependencies' : [android_lib, egl_lib, glesv2_lib],
+ }
+endif
+
# Video splitter
vlc_modules += {
'name' : 'video_splitter',
=====================================
src/meson.build
=====================================
@@ -41,7 +41,7 @@ libvlccore_link_args = []
if host_system == 'darwin'
libvlccore_deps += foundation_dep
libvlccore_deps += corefoundation_dep
- libvlccore_deps += dependency('CFNetwork', required: true)
+ libvlccore_deps += declare_dependency(link_args: ['-framework', 'CFNetwork'])
libvlccore_link_args += [
'-Wl,-U,_vlc_static_modules',
'-Wl,-undefined,dynamic_lookup',
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/da88dc3f66331e965303f26d5a9d60b63c98f0ad...8f80d9f7fc25c4f1bed218113d533a44811ae3f3
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/da88dc3f66331e965303f26d5a9d60b63c98f0ad...8f80d9f7fc25c4f1bed218113d533a44811ae3f3
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list