endif
applemedia_objc_args += ['-fobjc-arc']
+
+ objcpp = meson.get_compiler('objcpp')
endif
applemedia_frameworks = []
endif
endforeach
+applemedia_objcpp_args = []
if gstvulkan_dep.found() and have_objcpp
moltenvk_dep = cc.find_library('MoltenVK', required : false)
metal_dep = dependency('appleframeworks', modules : ['Metal'], required : false)
'iosurfacevulkanmemory.c',
]
applemedia_args += ['-DAPPLEMEDIA_MOLTENVK']
+ # override_options : ['cpp_std=c++11'] doesn't seem to work for objcpp
+ applemedia_objcpp_args += objcpp.get_supported_arguments([
+ '-std=c++11',
+ ])
endif
endif
applemedia_sources,
c_args : gst_plugins_bad_args + applemedia_args,
objc_args : gst_plugins_bad_args + applemedia_args + applemedia_objc_args,
- objcpp_args : gst_plugins_bad_args + applemedia_args + applemedia_objc_args,
+ objcpp_args : gst_plugins_bad_args + applemedia_args + applemedia_objc_args + applemedia_objcpp_args,
link_args : noseh_link_args,
include_directories : [configinc, libsinc],
dependencies : [gstvideo_dep, gstaudio_dep, gstpbutils_dep, gst_dep, gstbase_dep, gstgl_dep, gstglproto_dep] + applemedia_frameworks,
+ override_options : ['cpp_std=c++11'],
install : true,
install_dir : plugins_install_dir,
)
#undef VK_USE_PLATFORM_MACOS_MVK
#undef VK_USE_PLATFORM_IOS_MVK
#include <MoltenVK/vk_mvk_moltenvk.h>
+/* MoltenVK uses some enums/typedefs that are only available in newer macOS/iOS
+ * versions. At time of writing:
+ * - MTLTextureSwizzle
+ * - MTLTextureSwizzleChannels
+ * - MTLMultisampleDepthResolveFilter
+ */
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wunguarded-availability-new"
#include <MoltenVK/mvk_datatypes.h>
+#pragma clang diagnostic pop
/* silence macro redefinition warnings */
#undef VK_USE_PLATFORM_MACOS_MVK
#undef VK_USE_PLATFORM_IOS_MVK
IOSurfaceRef surface = CVPixelBufferGetIOSurface (pixel_buf);
GstVideoTextureCacheVulkan *cache_vulkan =
GST_VIDEO_TEXTURE_CACHE_VULKAN (cache);
- MTLPixelFormat fmt = video_info_to_metal_format (info, plane);
+ MTLPixelFormat fmt = (MTLPixelFormat) video_info_to_metal_format (info, plane);
CFRetain (pixel_buf);
mem = gst_io_surface_vulkan_memory_wrapped (cache_vulkan->device,
texture_data->texture = (__bridge_retained gpointer) texture;
VkResult err = vkSetMTLTextureMVK (memory->vulkan_mem.image, texture);
- GST_DEBUG ("bound texture %p to image %"GST_VULKAN_NON_DISPATCHABLE_HANDLE_FORMAT": 0x%x",
+ GST_DEBUG ("bound texture %p to image %" GST_VULKAN_NON_DISPATCHABLE_HANDLE_FORMAT ": 0x%x",
texture, memory->vulkan_mem.image, err);
vk_mem->user_data = texture_data;