2018-08-17 13:26:54 +00:00
|
|
|
osxvideo_sources = ['osxvideosink.m', 'cocoawindow.m']
|
|
|
|
|
|
|
|
have_osxvideo = false
|
|
|
|
if host_system != 'darwin'
|
|
|
|
subdir_done()
|
|
|
|
endif
|
|
|
|
|
2018-12-14 03:21:58 +00:00
|
|
|
osxvideo_opengl_dep = dependency('appleframeworks', modules : ['OpenGL'], required : get_option('osxvideo'))
|
|
|
|
osxvideo_cocoa_dep = dependency('appleframeworks', modules : ['Cocoa'], required : get_option('osxvideo'))
|
2018-08-17 13:26:54 +00:00
|
|
|
have_objc = add_languages('objc', required : get_option('osxvideo'))
|
|
|
|
|
|
|
|
if have_objc and osxvideo_opengl_dep.found() and osxvideo_cocoa_dep.found()
|
2019-03-19 13:22:29 +00:00
|
|
|
|
|
|
|
# lockFocusIfCanDraw and OpenGL are deprecated in mac os 10.14
|
|
|
|
# Could also have used GL_SILENCE_DEPRECATION for the latter
|
|
|
|
osxvideo_gst_plugins_good_objc_args = gst_plugins_good_args + ['-Wno-deprecated-declarations']
|
|
|
|
|
2018-08-17 13:26:54 +00:00
|
|
|
gstosxvideo = library('gstosxvideo',
|
|
|
|
osxvideo_sources,
|
|
|
|
c_args : gst_plugins_good_args,
|
2019-03-19 13:22:29 +00:00
|
|
|
objc_args : osxvideo_gst_plugins_good_objc_args,
|
2018-08-17 13:26:54 +00:00
|
|
|
include_directories : [configinc],
|
|
|
|
dependencies : [gstvideo_dep, osxvideo_opengl_dep, osxvideo_cocoa_dep],
|
|
|
|
install : true,
|
|
|
|
install_dir : plugins_install_dir)
|
|
|
|
pkgconfig.generate(gstosxvideo, install_dir : plugins_pkgconfig_install_dir)
|
|
|
|
endif
|