mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-03 14:08: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;
|
||||
|
||||
result = NULL;
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo];
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
AVCaptureVideoDataOutput *output = [[AVCaptureVideoDataOutput alloc] init];
|
||||
for (int i = 0; i < [devices count]; 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:
|
||||
return AVCaptureDeviceTypeBuiltInTelephotoCamera;
|
||||
case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_BUILT_IN_DUAL_CAMERA:
|
||||
return AVCaptureDeviceTypeBuiltInDuoCamera;
|
||||
return AVCaptureDeviceTypeBuiltInDualCamera;
|
||||
case GST_AVF_VIDEO_SOURCE_DEVICE_TYPE_DEFAULT:
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
@ -421,7 +421,9 @@ static AVCaptureVideoOrientation GstAVFVideoSourceOrientation2AVCaptureVideoOrie
|
|||
return NO;
|
||||
}
|
||||
} else { // deviceIndex takes priority over position and deviceType
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
NSArray *devices = [AVCaptureDevice devicesWithMediaType:mediaType];
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
if (deviceIndex >= [devices count]) {
|
||||
GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
|
||||
("Invalid video capture device index"), (NULL));
|
||||
|
@ -717,6 +719,7 @@ static AVCaptureVideoOrientation GstAVFVideoSourceOrientation2AVCaptureVideoOrie
|
|||
NULL));
|
||||
}
|
||||
#else
|
||||
(void) pixel_formats;
|
||||
GST_WARNING ("Screen capture is not supported by iOS");
|
||||
#endif
|
||||
return result;
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/base/base.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
#include <AssetsLibrary/ALAssetsLibrary.h>
|
||||
#include <AssetsLibrary/ALAssetRepresentation.h>
|
||||
|
||||
|
@ -63,6 +66,7 @@ typedef struct _GstIOSAssetSrcClass GstIOSAssetSrcClass;
|
|||
|
||||
- (ALAssetRepresentation *) assetForURLSync:(NSURL*) uri;
|
||||
@end
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
@implementation GstAssetsLibrary
|
||||
|
||||
|
@ -477,3 +478,5 @@ gst_ios_asset_src_uri_handler_init (gpointer g_iface, gpointer iface_data)
|
|||
return self.result;
|
||||
}
|
||||
@end
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
|
|
@ -21,6 +21,10 @@
|
|||
# include "config.h"
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
|
||||
#if !HAVE_IOS
|
||||
#import <AppKit/AppKit.h>
|
||||
#include "iosurfaceglmemory.h"
|
||||
|
@ -203,7 +207,7 @@ _do_create_memory (GstGLContext * context, ContextThreadData * data)
|
|||
plane = 0;
|
||||
goto success;
|
||||
case GST_VIDEO_FORMAT_NV12: {
|
||||
GstGLFormat texifmt, texfmt;
|
||||
GstGLFormat texfmt;
|
||||
|
||||
if (plane == 0)
|
||||
texformat = GST_GL_LUMINANCE;
|
||||
|
@ -260,3 +264,5 @@ gst_video_texture_cache_gl_create_memory (GstVideoTextureCache * cache,
|
|||
|
||||
return data.memory;
|
||||
}
|
||||
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
|
Loading…
Reference in a new issue