[vlc-commits] [Git][videolan/vlc][master] 14 commits: contrib: main.mak: export OBJC compiler

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Mon Feb 6 22:03:09 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
82f1ac62 by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
contrib: main.mak: export OBJC compiler

Otherwise, the value is not exported to meson crossfile.

- - - - -
f2c8b289 by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
meson: add option for librist support

- - - - -
748f6e6a by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
bin: meson.build: conditionnally build binaries

Neither vlc.c nor darwinvlc.m can be compiled against iOS SDK currently
so only build them on other platforms than iOS and tvOS.

- - - - -
c99732f8 by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
modules: meson.build: add opengl dependencies

- - - - -
09fea54f by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
access: meson.build: exclude some modules on iOS

Some modules are not building on iOS or tvOS so exclude them from the
build when 'darwin' is matched.

- - - - -
43f8ba2d by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
access/screen: meson.build: remove screen on iOS

The screen module is currently not compatible with iOS, as there is no
ReplayKit backend.

- - - - -
8946ef1c by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
codec: meson.build: remove audiotoolboxmidi on iOS

The audiotoolboxmidi decoder is not compatible with iOS or tvOS since
the frameworks are not available on those platforms.

- - - - -
8f4d483a by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
modules: meson.build: only probe audiounit on OSX

- - - - -
b94b187f by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
text_renderer: meson.build: remove nsspeechsynthesizer on iOS

The nsspeechsynthesizer text module is only available on OSX so disable
it on iOS and tvOS when probed against 'darwin' host_system.

- - - - -
ebe96823 by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
video_chroma: copy: skip test when SSE2 is not available

Fix a test compilation failure when building against a target not
supporting SSE2.

- - - - -
5b541bce by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
video_filter: meson.build: link ci_filters against GLES

- - - - -
1bd7936c by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
opengl: meson.build: avoid building vlc_opengl on iOS

iOS and tvOS don't support OpenGL, but only OpenGL ES, so don't build
the helper library on those platforms.

- - - - -
df173103 by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
meson.build: set macosx option on OSX only

- - - - -
52348799 by Alexandre Janniaux at 2023-02-06T21:14:23+00:00
video_output: meson.build: add apple subdir

- - - - -


14 changed files:

- bin/meson.build
- contrib/src/main.mak
- meson.build
- meson_options.txt
- modules/access/meson.build
- modules/access/screen/meson.build
- modules/codec/meson.build
- modules/meson.build
- modules/text_renderer/meson.build
- modules/video_chroma/copy.c
- modules/video_filter/meson.build
- + modules/video_output/apple/meson.build
- modules/video_output/meson.build
- modules/video_output/opengl/meson.build


Changes:

=====================================
bin/meson.build
=====================================
@@ -1,7 +1,7 @@
 # Do we build the main VLC binary?
 build_vlc = get_option('vlc')
 
-if build_vlc
+if build_vlc and (host_system != 'darwin' or have_osx)
     vlc_sources = []
 
     vlc_deps = [m_lib, dl_lib, threads_dep]
@@ -9,7 +9,9 @@ if build_vlc
     if host_system == 'darwin'
         vlc_sources += ['darwinvlc.m']
         vlc_deps += corefoundation_dep
-        vlc_deps += dependency('Cocoa', required: true)
+        if have_osx
+            vlc_deps += dependency('Cocoa', required: true)
+        endif
     elif host_system == 'windows'
         vlc_sources += ['winvlc.c']
     else


=====================================
contrib/src/main.mak
=====================================
@@ -320,7 +320,7 @@ PIC := -fPIC
 endif
 
 HOSTTOOLS := \
-	CC="$(CC)" CXX="$(CXX)" LD="$(LD)" \
+	CC="$(CC)" CXX="$(CXX)" OBJC="$(OBJC)" LD="$(LD)" \
 	AR="$(AR)" CCAS="$(CCAS)" RANLIB="$(RANLIB)" STRIP="$(STRIP)" \
 	PATH="$(PREFIX)/bin:$(PATH)" \
 	PKG_CONFIG="$(PKG_CONFIG)"


=====================================
meson.build
=====================================
@@ -98,10 +98,6 @@ vlc_include_dirs = include_directories(list_inc_dirs)
 
 if host_system == 'darwin'
     add_languages('objc', native: false)
-    add_project_arguments('-mmacosx-version-min=10.11',
-        language: ['c', 'cpp', 'objc'])
-    add_project_link_arguments('-mmacosx-version-min=10.11',
-        language: ['c', 'cpp', 'objc'])
 endif
 
 #
@@ -271,6 +267,13 @@ else
     have_osx = false
 endif
 
+if have_osx
+    add_project_arguments('-mmacosx-version-min=10.11',
+        language: ['c', 'cpp', 'objc'])
+    add_project_link_arguments('-mmacosx-version-min=10.11',
+        language: ['c', 'cpp', 'objc'])
+endif
+
 
 #
 # Windows and MinGW checks


=====================================
meson_options.txt
=====================================
@@ -596,6 +596,11 @@ option('udev',
     value: 'auto',
     description: 'Linux udev services discovery')
 
+option('rist',
+    type: 'feature',
+    value: 'auto',
+    description: 'librist support for access and access_output')
+
 # TODO: Missing live555
 # TODO: Missing v4l2
 # TODO: Missing nvdec


=====================================
modules/access/meson.build
=====================================
@@ -89,7 +89,7 @@ if pulse_dep.found()
 endif
 
 # AVFoundation audio capture access
-if host_system == 'darwin'
+if have_osx
     vlc_modules += {
         'name' : 'avaudiocapture',
         'sources' : files('avaudiocapture.m'),
@@ -114,7 +114,7 @@ endif
 
 # macOS AVFoundation-based video capture
 if (get_option('macosx_avfoundation')
-    .require(host_system == 'darwin', error_message: 'AVCapture requires macOS/iOS')
+    .require(have_osx and host_system == 'darwin', error_message: 'AVCapture requires macOS')
     .allowed())
     vlc_modules += {
         'name' : 'avcapture',
@@ -222,7 +222,7 @@ if get_option('vcd_module')
     endif
 
     if (needed_vcd_unix_headers_present or 
-        host_system in ['darwin', 'windows'])
+        host_system in ['windows'] or have_osx)
 
         vcd_cdda_darwin_deps = []
         if host_system == 'darwin'


=====================================
modules/access/screen/meson.build
=====================================
@@ -9,7 +9,7 @@ if get_option('screen').allowed()
   endif
 
   # screen
-  if host_system == 'windows' or host_system == 'darwin'
+  if host_system == 'windows' or have_osx
     screen_files = files(
       'screen.c',
       'screen.h'


=====================================
modules/codec/meson.build
=====================================
@@ -106,7 +106,7 @@ if fluidsynth_dep.found()
 endif
 
 # Audiotoolbox MIDI plugin (Darwin only)
-if host_system == 'darwin'
+if have_osx
     vlc_modules += {
         'name' : 'audiotoolboxmidi',
         'sources' : files('audiotoolbox_midi.c'),


=====================================
modules/meson.build
=====================================
@@ -83,7 +83,6 @@ if host_system == 'darwin'
     avfoundation_dep = dependency('AVFoundation', required: true)
     corevideo_dep = dependency('CoreVideo', required: true)
     videotoolbox_dep = dependency('VideoToolbox', required: true)
-    audiounit_dep = dependency('AudioUnit', required: true)
     audiotoolbox_dep = dependency('AudioToolbox', required: true)
     iokit_dep = dependency('IOKit', required: true)
     quartz_dep = dependency('QuartzCore', required: true)
@@ -96,11 +95,14 @@ endif
 # macOS specific dependencies
 if have_osx
     cocoa_dep = dependency('Cocoa', required: true)
+    opengl_dep = dependency('OpenGL', required: true)
+    audiounit_dep = dependency('AudioUnit', required: true)
 endif
 
 # iOS/tvOS specific dependencies
 if have_ios or have_tvos
     uikit_dep = dependency('UIKit', required: true)
+    opengles_dep = dependency('OpenGLES', required: true)
 endif
 
 # Windows-specific dependencies
@@ -127,7 +129,7 @@ endif
 srt_dep = dependency('srt', version: '>=1.3.0', required: get_option('srt'))
 
 # libRist
-librist_dep = dependency('librist', required: false)
+librist_dep = dependency('librist', required: get_option('rist'))
 
 # MTP
 mtp_dep = dependency('libmtp', version: '>=1.0.0', required: get_option('mtp'))


=====================================
modules/text_renderer/meson.build
=====================================
@@ -48,7 +48,7 @@ if rsvg_dep.found()
 endif
 
 # macOS text to speech
-if host_system == 'darwin'
+if have_osx
     vlc_modules += {
         'name' : 'nsspeechsynthesizer',
         'sources' : files('nsspeechsynthesizer.m'),


=====================================
modules/video_chroma/copy.c
=====================================
@@ -1107,7 +1107,9 @@ int main(void)
     alarm(10);
 
 #ifndef COPY_TEST_NOOPTIM
+#ifdef CAN_COMPILE_SSE2
     if (!vlc_CPU_SSE2())
+#endif
     {
         fprintf(stderr, "WARNING: could not test SSE\n");
         return 77;


=====================================
modules/video_filter/meson.build
=====================================
@@ -254,8 +254,7 @@ if host_system == 'darwin'
             coregraphics_dep,
             coreimage_dep,
             corevideo_dep,
-            (have_osx) ? dependency('gl', required: true) : []
-            # Add OpenGLES dependency for iOS
+            (have_osx) ? dependency('gl', required: true) : opengles_dep
         ],
         'include_directories' : [include_directories('../codec')]
     }


=====================================
modules/video_output/apple/meson.build
=====================================
@@ -0,0 +1,37 @@
+#
+# Video output modules
+#
+#
+
+darwingl_dep = []
+if have_osx
+    darwingl_dep = opengl_dep
+else
+    darwingl_dep = opengles_dep
+endif
+
+vlc_modules += {
+    'name' : 'cvpx_gl',
+    'sources' : files(
+        'VLCCVOpenGLProvider.m',
+        '../../codec/vt_utils.c'
+    ),
+    'objc_args' : ['-fobjc-arc'],
+    'dependencies' : [foundation_dep, corefoundation_dep, corevideo_dep, darwingl_dep],
+}
+
+if have_ios or have_tvos
+    vlc_modules += {
+        'name' : 'caeagl',
+        'sources' : files('VLCOpenGLES2VideoView.m'),
+        'objc_args' : ['-fobjc-arc'],
+        'dependencies' : [foundation_dep, uikit_dep, quartz_dep, opengles_dep],
+    }
+
+    vlc_modules += {
+        'name' : 'uiview',
+        'sources' : files('VLCVideoUIView.m'),
+        'objc_args' : ['-fobjc-arc'],
+        'dependencies' : [foundation_dep, uikit_dep],
+    }
+endif


=====================================
modules/video_output/meson.build
=====================================
@@ -10,6 +10,10 @@ libplacebo_dep = dependency('libplacebo',
 opengl_dep = dependency('gl', required: false)
 opengles2_dep = dependency('glesv2', required: get_option('gles2'))
 
+if host_system == 'darwin'
+    subdir('apple')
+endif
+
 if libplacebo_dep.found()
     libplacebo_utils = static_library('vlc_libplacebo_utils',
                                   files('./libplacebo/utils.c'),


=====================================
modules/video_output/opengl/meson.build
=====================================
@@ -20,7 +20,7 @@ opengl_vout_commonsources = files(
     'vout_helper.c',
 )
 
-if opengl_dep.found()
+if opengl_dep.found() and not (have_ios or have_tvos)
     libvlc_opengl = static_library('vlc_opengl',
                                    dependencies: [
                                     gl_common_dep,



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/afe48ba5e8b59d50b3b5100683d2da274b9d89d4...52348799f6302765c2df3259fdf587a646bfbee5

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/afe48ba5e8b59d50b3b5100683d2da274b9d89d4...52348799f6302765c2df3259fdf587a646bfbee5
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