mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 13:25:56 +00:00
applemedia: silence some deprecation warnings from ios 12.0
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5111>
This commit is contained in:
parent
00316db5e5
commit
f954d93f27
5 changed files with 20 additions and 3 deletions
|
@ -97,8 +97,9 @@ gst_avf_device_provider_probe (GstDeviceProvider * provider)
|
||||||
GList *result;
|
GList *result;
|
||||||
|
|
||||||
result = NULL;
|
result = NULL;
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
|
NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
AVCaptureVideoDataOutput *output = [[AVCaptureVideoDataOutput alloc] init];
|
AVCaptureVideoDataOutput *output = [[AVCaptureVideoDataOutput alloc] init];
|
||||||
for (int i = 0; i < [devices count]; i++) {
|
for (int i = 0; i < [devices count]; i++) {
|
||||||
AVCaptureDevice *device = [devices objectAtIndex:i];
|
AVCaptureDevice *device = [devices objectAtIndex:i];
|
||||||
|
|
|
@ -266,7 +266,7 @@ static AVCaptureDeviceType GstAVFVideoSourceDeviceType2AVCaptureDeviceType(GstAV
|
||||||
case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_BUILT_IN_TELEPHOTO_CAMERA:
|
case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_BUILT_IN_TELEPHOTO_CAMERA:
|
||||||
return AVCaptureDeviceTypeBuiltInTelephotoCamera;
|
return AVCaptureDeviceTypeBuiltInTelephotoCamera;
|
||||||
case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_BUILT_IN_DUAL_CAMERA:
|
case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_BUILT_IN_DUAL_CAMERA:
|
||||||
return AVCaptureDeviceTypeBuiltInDuoCamera;
|
return AVCaptureDeviceTypeBuiltInDualCamera;
|
||||||
case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_DEFAULT:
|
case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_DEFAULT:
|
||||||
g_assert_not_reached();
|
g_assert_not_reached();
|
||||||
}
|
}
|
||||||
|
@ -421,7 +421,9 @@ static AVCaptureVideoOrientation GstAVFVideoSourceOrientation2AVCaptureVideoOrie
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
} else { // deviceIndex takes priority over position and deviceType
|
} else { // deviceIndex takes priority over position and deviceType
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
NSArray *devices = [AVCaptureDevice devicesWithMediaType:mediaType];
|
NSArray *devices = [AVCaptureDevice devicesWithMediaType:mediaType];
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
if (deviceIndex >= [devices count]) {
|
if (deviceIndex >= [devices count]) {
|
||||||
GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
|
GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
|
||||||
("Invalid video capture device index"), (NULL));
|
("Invalid video capture device index"), (NULL));
|
||||||
|
@ -717,6 +719,7 @@ static AVCaptureVideoOrientation GstAVFVideoSourceOrientation2AVCaptureVideoOrie
|
||||||
NULL));
|
NULL));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
(void) pixel_formats;
|
||||||
GST_WARNING ("Screen capture is not supported by iOS");
|
GST_WARNING ("Screen capture is not supported by iOS");
|
||||||
#endif
|
#endif
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
|
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gst/base/base.h>
|
#include <gst/base/base.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
#include <AssetsLibrary/ALAssetsLibrary.h>
|
#include <AssetsLibrary/ALAssetsLibrary.h>
|
||||||
#include <AssetsLibrary/ALAssetRepresentation.h>
|
#include <AssetsLibrary/ALAssetRepresentation.h>
|
||||||
|
|
||||||
|
@ -63,6 +66,7 @@ typedef struct _GstIOSAssetSrcClass GstIOSAssetSrcClass;
|
||||||
|
|
||||||
- (ALAssetRepresentation *) assetForURLSync:(NSURL*) uri;
|
- (ALAssetRepresentation *) assetForURLSync:(NSURL*) uri;
|
||||||
@end
|
@end
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstIOSAssetSrc:
|
* GstIOSAssetSrc:
|
||||||
|
|
|
@ -436,6 +436,7 @@ gst_ios_asset_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
|
||||||
iface->set_uri = gst_ios_asset_src_uri_set_uri;
|
iface->set_uri = gst_ios_asset_src_uri_set_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
@implementation GstAssetsLibrary
|
@implementation GstAssetsLibrary
|
||||||
|
|
||||||
|
@ -477,3 +478,5 @@ gst_ios_asset_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
|
||||||
return self.result;
|
return self.result;
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
|
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
#if !HAVE_IOS
|
#if !HAVE_IOS
|
||||||
#import <AppKit/AppKit.h>
|
#import <AppKit/AppKit.h>
|
||||||
#include "iosurfaceglmemory.h"
|
#include "iosurfaceglmemory.h"
|
||||||
|
@ -203,7 +207,7 @@ _do_create_memory (GstGLContext * context, ContextThreadData * data)
|
||||||
plane = 0;
|
plane = 0;
|
||||||
goto success;
|
goto success;
|
||||||
case GST_VIDEO_FORMAT_NV12: {
|
case GST_VIDEO_FORMAT_NV12: {
|
||||||
GstGLFormat texifmt, texfmt;
|
GstGLFormat texfmt;
|
||||||
|
|
||||||
if (plane == 0)
|
if (plane == 0)
|
||||||
texformat = GST_GL_LUMINANCE;
|
texformat = GST_GL_LUMINANCE;
|
||||||
|
@ -260,3 +264,5 @@ gst_video_texture_cache_gl_create_memory (GstVideoTextureCache * cache,
|
||||||
|
|
||||||
return data.memory;
|
return data.memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
Loading…
Reference in a new issue