1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

Platform: Remove build-time Apple SDK availability checks

This commit is contained in:
reuk 2024-07-01 22:21:33 +01:00
parent 5c1b75cab7
commit b89553ae2c
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
10 changed files with 12 additions and 119 deletions

View file

@ -32,10 +32,6 @@
==============================================================================
*/
#if defined (MAC_OS_X_VERSION_10_15) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15
#define JUCE_USE_NEW_CAMERA_API 1
#endif
struct CameraDevice::Pimpl
{
Pimpl (CameraDevice& ownerToUse, const String& deviceNameToUse, int /*index*/,
@ -47,10 +43,8 @@ struct CameraDevice::Pimpl
{
imageOutput = []() -> std::unique_ptr<ImageOutputBase>
{
#if JUCE_USE_NEW_CAMERA_API
if (@available (macOS 10.15, *))
return std::make_unique<PostCatalinaPhotoOutput>();
#endif
return std::make_unique<PreCatalinaStillImageOutput>();
}();
@ -152,7 +146,6 @@ struct CameraDevice::Pimpl
static NSArray* getCaptureDevices()
{
#if JUCE_USE_NEW_CAMERA_API
if (@available (macOS 10.15, *))
{
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
@ -165,7 +158,6 @@ struct CameraDevice::Pimpl
return [discovery devices];
}
#endif
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
return [AVCaptureDevice devicesWithMediaType: AVMediaTypeVideo];
@ -255,7 +247,6 @@ private:
virtual void triggerImageCapture (Pimpl& p) = 0;
};
#if JUCE_USE_NEW_CAMERA_API
class API_AVAILABLE (macos (10.15)) PostCatalinaPhotoOutput : public ImageOutputBase
{
public:
@ -339,7 +330,6 @@ private:
AVCapturePhotoOutput* imageOutput = nil;
NSUniquePtr<NSObject<AVCapturePhotoCaptureDelegate>> delegate;
};
#endif
JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wdeprecated-declarations")
class PreCatalinaStillImageOutput : public ImageOutputBase