mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
meson: enable applemedia
This commit is contained in:
parent
760cbc4059
commit
c9226e6e80
3 changed files with 112 additions and 4 deletions
26
meson.build
26
meson.build
|
@ -113,7 +113,6 @@ check_functions = [
|
|||
# check token HAVE_APPLE_MEDIA
|
||||
# check token HAVE_ASSRENDER
|
||||
# check token HAVE_AVC
|
||||
# check token HAVE_AVFOUNDATION
|
||||
# check token HAVE_BLUEZ
|
||||
# check token HAVE_BZ2
|
||||
# check token HAVE_CFLOCALECOPYCURRENT
|
||||
|
@ -168,7 +167,6 @@ check_functions = [
|
|||
# check token HAVE_GUDEV
|
||||
# check token HAVE_HLS
|
||||
# check token HAVE_ICONV
|
||||
# check token HAVE_IOS
|
||||
# check token HAVE_JPEG
|
||||
# check token HAVE_KATE
|
||||
# check token HAVE_LADSPA
|
||||
|
@ -234,7 +232,6 @@ check_functions = [
|
|||
# check token HAVE_VCD
|
||||
# check token HAVE_VDPAU
|
||||
# check token HAVE_VIDEOTOOLBOX
|
||||
# check token HAVE_VIDEOTOOLBOX_10_9_6
|
||||
# check token HAVE_VOAACENC
|
||||
# check token HAVE_VOAMRWBENC
|
||||
# check token HAVE_WASAPI
|
||||
|
@ -434,6 +431,29 @@ else
|
|||
winsock2 = []
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'darwin'
|
||||
add_languages('objc')
|
||||
mobilecoreservices_dep = dependency('MobileCoreServices', required : false)
|
||||
if mobilecoreservices_dep.found()
|
||||
cdata.set('HAVE_IOS', 1)
|
||||
endif
|
||||
|
||||
avfoundation_dep = dependency('AVFoundation', required : false)
|
||||
if avfoundation_dep.found()
|
||||
cdata.set('HAVE_AVFOUNDATION', 1)
|
||||
endif
|
||||
|
||||
videotoolbox_dep = dependency('VideoToolbox', required : false)
|
||||
if videotoolbox_dep.found()
|
||||
cdata.set('HAVE_VIDEOTOOLBOX', 1)
|
||||
endif
|
||||
|
||||
# FIXME: framework.version() returns 'unknown'
|
||||
# if videotoolbox_dep.version().version_compare('>=10.9.6')
|
||||
# cdata.set('HAVE_VIDEOTOOLBOX_10_9_6', 1)
|
||||
# endif
|
||||
endif
|
||||
|
||||
have_orcc = false
|
||||
orcc_args = []
|
||||
# Used by various libraries/elements that use Orc code
|
||||
|
|
88
sys/applemedia/meson.build
Normal file
88
sys/applemedia/meson.build
Normal file
|
@ -0,0 +1,88 @@
|
|||
applemedia_sources = [
|
||||
'plugin.m',
|
||||
'vtutil.c',
|
||||
'corevideomemory.c',
|
||||
'corevideobuffer.c',
|
||||
'coremediabuffer.c',
|
||||
'videotexturecache.m',
|
||||
'atdec.c',
|
||||
'glcontexthelper.c'
|
||||
]
|
||||
|
||||
applemedia_args = [
|
||||
'-Dgst_core_media_buffer_new=gst_core_media_buffer_priv_new',
|
||||
'-Dgst_core_media_buffer_get_type=gst_core_media_buffer_priv_get_type',
|
||||
'-Dgst_core_media_buffer_get_pixel_buffer=gst_core_media_buffer_priv_get_pixel_buffer',
|
||||
'-Dgst_core_video_buffer_new=gst_core_video_buffer_priv_new',
|
||||
'-Dgst_core_video_buffer_get_type=gst_core_video_buffer_priv_get_type'
|
||||
]
|
||||
|
||||
applemedia_objc_args = []
|
||||
|
||||
applemedia_deps_found = false
|
||||
applemedia_frameworks = []
|
||||
corefoundation_dep = dependency('CoreFoundation', required : false)
|
||||
coremedia_dep = dependency('CoreMedia', required : false)
|
||||
corevideo_dep = dependency('CoreVideo', required : false)
|
||||
audiotoolbox_dep = dependency('AudioToolbox', required : false)
|
||||
applemedia_frameworks += [corefoundation_dep, coremedia_dep, corevideo_dep, audiotoolbox_dep]
|
||||
|
||||
avfoundation_dep = dependency('AVFoundation', required : false)
|
||||
if avfoundation_dep.found()
|
||||
applemedia_sources += [
|
||||
'avfvideosrc.m',
|
||||
'avfassetsrc.m',
|
||||
'avsamplevideosink.m'
|
||||
]
|
||||
applemedia_frameworks += [avfoundation_dep]
|
||||
endif
|
||||
|
||||
videotoolbox_dep = dependency('VideoToolbox', required : false)
|
||||
if videotoolbox_dep.found()
|
||||
applemedia_sources += [
|
||||
'vtenc.c',
|
||||
'vtdec.c'
|
||||
]
|
||||
applemedia_frameworks += [videotoolbox_dep]
|
||||
endif
|
||||
|
||||
if cdata.has('HAVE_IOS')
|
||||
applemedia_sources += [
|
||||
'iosassetsrc.m',
|
||||
'iosglmemory.c'
|
||||
]
|
||||
applemedia_objc_args += ['-fobjc-abi-version=2', '-fobjc-legacy-dispatch']
|
||||
|
||||
foundation_dep = dependency('Foundation', required : false)
|
||||
coremedia_dep = dependency('AssetsLibrary', required : false)
|
||||
applemedia_frameworks += [foundation_dep, coremedia_dep]
|
||||
else
|
||||
applemedia_sources += [
|
||||
'iosurfacememory.c'
|
||||
]
|
||||
applemedia_objc_args += ['-mmacosx-version-min=10.8']
|
||||
cocoa_dep = dependency('Cocoa', required : false)
|
||||
iosurface_dep = dependency('IOSurface', required : false)
|
||||
applemedia_opengl_dep = dependency('OpenGL', required : false)
|
||||
applemedia_frameworks += [cocoa_dep, applemedia_opengl_dep, iosurface_dep]
|
||||
endif
|
||||
|
||||
applemedia_found_deps = true
|
||||
foreach framework : applemedia_frameworks
|
||||
if not framework.found()
|
||||
applemedia_found_deps = false
|
||||
endif
|
||||
endforeach
|
||||
|
||||
if applemedia_found_deps
|
||||
gstapplemedia = library('gstapplemedia',
|
||||
applemedia_sources,
|
||||
c_args : gst_plugins_bad_args + applemedia_args,
|
||||
objc_args : gst_plugins_bad_args + applemedia_args + applemedia_objc_args,
|
||||
link_args : noseh_link_args,
|
||||
include_directories : [configinc, libsinc],
|
||||
dependencies : [gstvideo_dep, gstaudio_dep, gstpbutils_dep, gst_dep, gstbase_dep, gstgl_dep] + applemedia_frameworks,
|
||||
install : true,
|
||||
install_dir : plugins_install_dir,
|
||||
)
|
||||
endif
|
|
@ -2,7 +2,7 @@
|
|||
#subdir('acmenc')
|
||||
#subdir('acmmp3dec')
|
||||
#subdir('androidmedia')
|
||||
#subdir('applemedia')
|
||||
subdir('applemedia')
|
||||
subdir('bluez')
|
||||
subdir('d3dvideosink')
|
||||
subdir('decklink')
|
||||
|
|
Loading…
Reference in a new issue