diff --git a/subprojects/gst-plugins-bad/sys/applemedia/avfdeviceprovider.m b/subprojects/gst-plugins-bad/sys/applemedia/avfdeviceprovider.m index 3f2d893a67..d1002c9067 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/avfdeviceprovider.m +++ b/subprojects/gst-plugins-bad/sys/applemedia/avfdeviceprovider.m @@ -81,7 +81,7 @@ gst_av_capture_device_get_props (AVCaptureDevice *device) g_free (unique_id); g_free (model_id); -#if !HAVE_IOS +#ifndef HAVE_IOS char *manufacturer = g_strdup ([[device manufacturer] UTF8String]); gst_structure_set (props, "avf.manufacturer", G_TYPE_STRING, manufacturer, diff --git a/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m b/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m index cadc27fe4e..bcd94ca567 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m +++ b/subprojects/gst-plugins-bad/sys/applemedia/avfvideosrc.m @@ -27,7 +27,7 @@ #import #import -#if !HAVE_IOS +#ifndef HAVE_IOS #import #endif #include @@ -57,7 +57,7 @@ static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, GST_STATIC_CAPS ( -#if !HAVE_IOS +#ifndef HAVE_IOS GST_VIDEO_CAPS_MAKE_WITH_FEATURES (GST_CAPS_FEATURE_MEMORY_GL_MEMORY, "UYVY") ", " @@ -233,7 +233,7 @@ gst_avf_video_source_device_type_get_type (void) - (BOOL)openDevice; - (void)closeDevice; - (GstVideoFormat)getGstVideoFormat:(NSNumber *)pixel_format; -#if !HAVE_IOS +#ifndef HAVE_IOS - (CGDirectDisplayID)getDisplayIdFromDeviceIndex; - (float)getScaleFactorFromDeviceIndex; #endif @@ -257,7 +257,7 @@ didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer @end -#if HAVE_IOS +#ifdef HAVE_IOS static AVCaptureDeviceType GstAVFVideoSourceDeviceType2AVCaptureDeviceType(GstAVFVideoSourceDeviceType deviceType) { switch (deviceType) { @@ -451,7 +451,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS - (BOOL)openScreenInput { -#if HAVE_IOS +#ifdef HAVE_IOS return NO; #else CGDirectDisplayID displayId; @@ -598,7 +598,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS return gst_format; } -#if !HAVE_IOS +#ifndef HAVE_IOS - (CGDirectDisplayID)getDisplayIdFromDeviceIndex { NSDictionary *description; @@ -699,7 +699,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS pixel_formats = output.availableVideoCVPixelFormatTypes; if (captureScreen) { -#if !HAVE_IOS +#ifndef HAVE_IOS CGRect rect; AVCaptureScreenInput *screenInput = (AVCaptureScreenInput *)input; if (CGRectIsEmpty (screenInput.cropRect)) { @@ -751,7 +751,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS forKey:(NSString*)kCVPixelBufferPixelFormatTypeKey]; if (captureScreen) { -#if !HAVE_IOS +#ifndef HAVE_IOS AVCaptureScreenInput *screenInput = (AVCaptureScreenInput *)input; screenInput.minFrameDuration = CMTimeMake(info.fps_d, info.fps_n); #else @@ -1145,7 +1145,7 @@ enum PROP_DEVICE_TYPE, PROP_DO_STATS, PROP_FPS, -#if !HAVE_IOS +#ifndef HAVE_IOS PROP_CAPTURE_SCREEN, PROP_CAPTURE_SCREEN_CURSOR, PROP_CAPTURE_SCREEN_MOUSE_CLICKS, @@ -1258,7 +1258,7 @@ gst_avf_video_src_class_init (GstAVFVideoSrcClass * klass) g_param_spec_int ("fps", "Frames per second", "Last measured framerate, if statistics are enabled", -1, G_MAXINT, -1, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); -#if !HAVE_IOS +#ifndef HAVE_IOS g_object_class_install_property (gobject_class, PROP_CAPTURE_SCREEN, g_param_spec_boolean ("capture-screen", "Enable screen capture", "Enable screen capture functionality", FALSE, @@ -1349,7 +1349,7 @@ gst_avf_video_src_get_property (GObject * object, guint prop_id, GValue * value, GstAVFVideoSrcImpl *impl = GST_AVF_VIDEO_SRC_IMPL (object); switch (prop_id) { -#if !HAVE_IOS +#ifndef HAVE_IOS case PROP_CAPTURE_SCREEN: g_value_set_boolean (value, impl.captureScreen); break; @@ -1408,7 +1408,7 @@ gst_avf_video_src_set_property (GObject * object, guint prop_id, GstAVFVideoSrcImpl *impl = GST_AVF_VIDEO_SRC_IMPL (object); switch (prop_id) { -#if !HAVE_IOS +#ifndef HAVE_IOS case PROP_CAPTURE_SCREEN: impl.captureScreen = g_value_get_boolean (value); break; @@ -1565,7 +1565,7 @@ gst_av_capture_device_get_caps (AVCaptureDevice *device, AVCaptureVideoDataOutpu { GstCaps *result_caps, *result_gl_caps; gboolean is_gl_format; -#if !HAVE_IOS +#ifndef HAVE_IOS GstVideoFormat gl_formats[] = { GST_VIDEO_FORMAT_UYVY, GST_VIDEO_FORMAT_YUY2, 0 }; #else GstVideoFormat gl_formats[] = { GST_VIDEO_FORMAT_NV12, 0 }; @@ -1629,7 +1629,7 @@ gst_av_capture_device_get_caps (AVCaptureDevice *device, AVCaptureVideoDataOutpu NULL)); gst_caps_set_simple (caps, "texture-target", G_TYPE_STRING, -#if !HAVE_IOS +#ifndef HAVE_IOS GST_GL_TEXTURE_TARGET_RECTANGLE_STR, #else GST_GL_TEXTURE_TARGET_2D_STR, diff --git a/subprojects/gst-plugins-bad/sys/applemedia/corevideobuffer.c b/subprojects/gst-plugins-bad/sys/applemedia/corevideobuffer.c index 409c6ac7dc..002679208d 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/corevideobuffer.c +++ b/subprojects/gst-plugins-bad/sys/applemedia/corevideobuffer.c @@ -22,13 +22,13 @@ #endif #include "corevideobuffer.h" #include "corevideomemory.h" -#if !HAVE_IOS +#ifndef HAVE_IOS #include "iosurfaceglmemory.h" #endif #include "videotexturecache-gl.h" #if defined(APPLEMEDIA_MOLTENVK) #include "videotexturecache-vulkan.h" -#if !HAVE_IOS +#ifndef HAVE_IOS #include "iosurfacevulkanmemory.h" #endif #endif @@ -110,7 +110,7 @@ static GstMemory * _create_glmem (GstAppleCoreVideoPixelBuffer * gpixbuf, GstVideoInfo * info, guint plane, gsize size, GstVideoTextureCache * cache) { -#if HAVE_IOS +#ifdef HAVE_IOS return gst_video_texture_cache_create_memory (cache, gpixbuf, plane, size); #else GstIOSurfaceGLMemory *mem; diff --git a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-gl.h b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-gl.h index e986bfb324..5ae033b030 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-gl.h +++ b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-gl.h @@ -40,7 +40,7 @@ typedef struct _GstVideoTextureCacheGL GstVideoTextureCache parent; GstGLContext *ctx; -#if HAVE_IOS +#ifdef HAVE_IOS CVOpenGLESTextureCacheRef cache; #else GstBufferPool *pool; diff --git a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-gl.m b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-gl.m index 95ac194c54..1f5187197d 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-gl.m +++ b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-gl.m @@ -25,7 +25,7 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS -#if !HAVE_IOS +#ifndef HAVE_IOS #import #include "iosurfaceglmemory.h" #endif @@ -48,7 +48,7 @@ typedef struct _ContextThreadData typedef struct _TextureWrapper { -#if HAVE_IOS +#ifdef HAVE_IOS CVOpenGLESTextureCacheRef cache; CVOpenGLESTextureRef texture; #else @@ -80,7 +80,7 @@ gst_video_texture_cache_gl_finalize (GObject * object) { GstVideoTextureCacheGL *cache_gl = GST_VIDEO_TEXTURE_CACHE_GL (object); -#if HAVE_IOS +#ifdef HAVE_IOS CFRelease (cache_gl->cache); /* iOS has no "CVOpenGLESTextureCacheRelease" */ #else #if 0 @@ -132,7 +132,7 @@ gst_video_texture_cache_gl_constructed (GObject * object) g_return_if_fail (GST_IS_GL_CONTEXT (cache_gl->ctx)); -#if HAVE_IOS +#ifdef HAVE_IOS CFMutableDictionaryRef cache_attrs = CFDictionaryCreateMutable (NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); @@ -170,7 +170,7 @@ gst_video_texture_cache_gl_class_init (GstVideoTextureCacheGLClass *klass) cache_class->create_memory = gst_video_texture_cache_gl_create_memory; } -#if HAVE_IOS +#ifdef HAVE_IOS static void gst_video_texture_cache_gl_release_texture (TextureWrapper *data) { @@ -257,7 +257,7 @@ gst_video_texture_cache_gl_create_memory (GstVideoTextureCache * cache, GstVideoTextureCacheGL *cache_gl = GST_VIDEO_TEXTURE_CACHE_GL (cache); ContextThreadData data = {cache_gl, gpixbuf, plane, size, NULL}; -#if HAVE_IOS +#ifdef HAVE_IOS gst_gl_context_thread_add (cache_gl->ctx, (GstGLContextThreadFunc) _do_create_memory, &data); #endif diff --git a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-vulkan.mm b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-vulkan.mm index a889bf0a4e..38236a9a7f 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-vulkan.mm +++ b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache-vulkan.mm @@ -23,7 +23,7 @@ #include -#if !HAVE_IOS +#ifndef HAVE_IOS #import #endif #include "iosurfacevulkanmemory.h" diff --git a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache.m b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache.m index 460a1fbb57..210c6f6413 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache.m +++ b/subprojects/gst-plugins-bad/sys/applemedia/videotexturecache.m @@ -21,7 +21,7 @@ # include "config.h" #endif -#if !HAVE_IOS +#ifndef HAVE_IOS #import #endif #include "videotexturecache.h" diff --git a/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c b/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c index 8f98e7057e..9e51dd6ced 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c +++ b/subprojects/gst-plugins-bad/sys/applemedia/vtdec.c @@ -555,7 +555,7 @@ gst_vtdec_negotiate (GstVideoDecoder * decoder) GST_CAPS_FEATURE_MEMORY_GL_MEMORY); if (output_textures) gst_caps_set_simple (output_state->caps, "texture-target", G_TYPE_STRING, -#if !HAVE_IOS +#ifndef HAVE_IOS GST_GL_TEXTURE_TARGET_RECTANGLE_STR, #else GST_GL_TEXTURE_TARGET_2D_STR, diff --git a/subprojects/gst-plugins-bad/sys/applemedia/vtenc.c b/subprojects/gst-plugins-bad/sys/applemedia/vtenc.c index 1efa27ad6c..7545a905d3 100644 --- a/subprojects/gst-plugins-bad/sys/applemedia/vtenc.c +++ b/subprojects/gst-plugins-bad/sys/applemedia/vtenc.c @@ -1532,7 +1532,7 @@ gst_vtenc_create_session (GstVTEnc * self) const GstVTEncoderDetails *codec_details = GST_VTENC_CLASS_GET_CODEC_DETAILS (G_OBJECT_GET_CLASS (self)); -#if !HAVE_IOS +#ifndef HAVE_IOS /* Apple's M1 hardware encoding fails when provided with an interlaced ProRes source. * It's most likely a bug in VideoToolbox, as no such limitation has been officially mentioned anywhere. * For now let's disable HW encoding entirely when such case occurs. */