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:
parent
5c1b75cab7
commit
b89553ae2c
10 changed files with 12 additions and 119 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue