diff --git a/subprojects/gst-plugins-good/sys/osxaudio/gstosxaudiodeviceprovider.c b/subprojects/gst-plugins-good/sys/osxaudio/gstosxaudiodeviceprovider.c index aa459f7602..4870fb1a07 100644 --- a/subprojects/gst-plugins-good/sys/osxaudio/gstosxaudiodeviceprovider.c +++ b/subprojects/gst-plugins-good/sys/osxaudio/gstosxaudiodeviceprovider.c @@ -29,6 +29,10 @@ #include "gstosxaudiosink.h" #include "gstosxaudiodeviceprovider.h" +#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 120000 +#define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster +#endif + static GstStaticPadTemplate src_factory = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, @@ -108,7 +112,7 @@ _audio_device_get_name (AudioDeviceID device_id, gboolean output) AudioObjectPropertyAddress deviceNameAddress = { kAudioDevicePropertyDeviceName, kAudioDevicePropertyScopeOutput, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; prop_scope = output ? kAudioDevicePropertyScopeOutput : @@ -145,7 +149,7 @@ _audio_device_has_output (AudioDeviceID device_id) AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeOutput, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyDataSize (device_id, @@ -172,7 +176,7 @@ _audio_device_has_input (AudioDeviceID device_id) AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeInput, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyDataSize (device_id, @@ -200,7 +204,7 @@ _audio_system_get_devices (gint * ndevices) AudioObjectPropertyAddress audioDevicesAddress = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyDataSize (kAudioObjectSystemObject, diff --git a/subprojects/gst-plugins-good/sys/osxaudio/gstosxcoreaudiohal.c b/subprojects/gst-plugins-good/sys/osxaudio/gstosxcoreaudiohal.c index f649e4fc70..5d415461cb 100644 --- a/subprojects/gst-plugins-good/sys/osxaudio/gstosxcoreaudiohal.c +++ b/subprojects/gst-plugins-good/sys/osxaudio/gstosxcoreaudiohal.c @@ -24,6 +24,10 @@ #include /* for getpid */ #include "gstosxaudiosink.h" +#if defined(MAC_OS_X_VERSION_MAX_ALLOWED) && MAC_OS_X_VERSION_MAX_ALLOWED < 120000 +#define kAudioObjectPropertyElementMain kAudioObjectPropertyElementMaster +#endif + static inline gboolean _audio_system_set_runloop (CFRunLoopRef runLoop) { @@ -34,7 +38,7 @@ _audio_system_set_runloop (CFRunLoopRef runLoop) AudioObjectPropertyAddress runloopAddress = { kAudioHardwarePropertyRunLoop, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectSetPropertyData (kAudioObjectSystemObject, @@ -62,7 +66,7 @@ _audio_system_get_default_device (gboolean output) AudioObjectPropertyAddress defaultDeviceAddress = { prop_selector, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyData (kAudioObjectSystemObject, @@ -86,7 +90,7 @@ _audio_system_get_devices (gint * ndevices) AudioObjectPropertyAddress audioDevicesAddress = { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyDataSize (kAudioObjectSystemObject, @@ -126,7 +130,7 @@ _audio_device_is_alive (AudioDeviceID device_id, gboolean output) AudioObjectPropertyAddress audioDeviceAliveAddress = { kAudioDevicePropertyDeviceIsAlive, prop_scope, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyData (device_id, @@ -148,7 +152,7 @@ _audio_device_get_latency (AudioDeviceID device_id) AudioObjectPropertyAddress audioDeviceLatencyAddress = { kAudioDevicePropertyLatency, kAudioDevicePropertyScopeOutput, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyData (device_id, @@ -171,7 +175,7 @@ _audio_device_get_hog (AudioDeviceID device_id) AudioObjectPropertyAddress audioDeviceHogModeAddress = { kAudioDevicePropertyHogMode, kAudioDevicePropertyScopeOutput, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyData (device_id, @@ -194,7 +198,7 @@ _audio_device_set_hog (AudioDeviceID device_id, pid_t hog_pid) AudioObjectPropertyAddress audioDeviceHogModeAddress = { kAudioDevicePropertyHogMode, kAudioDevicePropertyScopeOutput, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectSetPropertyData (device_id, @@ -220,7 +224,7 @@ _audio_device_set_mixing (AudioDeviceID device_id, gboolean enable_mix) AudioObjectPropertyAddress audioDeviceSupportsMixingAddress = { kAudioDevicePropertySupportsMixing, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; if (AudioObjectHasProperty (device_id, &audioDeviceSupportsMixingAddress)) { @@ -272,7 +276,7 @@ _audio_device_get_name (AudioDeviceID device_id, gboolean output) AudioObjectPropertyAddress deviceNameAddress = { kAudioDevicePropertyDeviceName, prop_scope, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; /* Get the length of the device name */ @@ -304,7 +308,7 @@ _audio_device_has_output (AudioDeviceID device_id) AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeOutput, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyDataSize (device_id, @@ -335,7 +339,7 @@ gst_core_audio_audio_device_get_channel_layout (AudioDeviceID device_id, AudioObjectPropertyAddress channelLayoutAddress = { kAudioDevicePropertyPreferredChannelLayout, prop_scope, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; /* Get the length of the default channel layout structure */ @@ -397,7 +401,7 @@ _audio_device_get_streams (AudioDeviceID device_id, gint * nstreams) AudioObjectPropertyAddress streamsAddress = { kAudioDevicePropertyStreams, kAudioDevicePropertyScopeOutput, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyDataSize (device_id, @@ -434,7 +438,7 @@ _audio_stream_get_latency (AudioStreamID stream_id) AudioObjectPropertyAddress latencyAddress = { kAudioStreamPropertyLatency, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyData (stream_id, @@ -457,7 +461,7 @@ _audio_stream_get_current_format (AudioStreamID stream_id, AudioObjectPropertyAddress formatAddress = { kAudioStreamPropertyPhysicalFormat, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyData (stream_id, @@ -480,7 +484,7 @@ _audio_stream_set_current_format (AudioStreamID stream_id, AudioObjectPropertyAddress formatAddress = { kAudioStreamPropertyPhysicalFormat, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectSetPropertyData (stream_id, @@ -503,7 +507,7 @@ _audio_stream_get_formats (AudioStreamID stream_id, gint * nformats) AudioObjectPropertyAddress formatsAddress = { kAudioStreamPropertyAvailablePhysicalFormats, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; status = AudioObjectGetPropertyDataSize (stream_id, @@ -590,7 +594,7 @@ _audio_stream_change_format (AudioStreamID stream_id, AudioObjectPropertyAddress formatAddress = { kAudioStreamPropertyPhysicalFormat, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; GST_DEBUG ("setting stream format: " CORE_AUDIO_FORMAT, @@ -696,7 +700,7 @@ _monitorize_spdif (GstCoreAudio * core_audio) AudioObjectPropertyAddress propAddress = { kAudioDevicePropertyDeviceHasChanged, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; /* Install the property listener */ @@ -721,7 +725,7 @@ _unmonitorize_spdif (GstCoreAudio * core_audio) AudioObjectPropertyAddress propAddress = { kAudioDevicePropertyDeviceHasChanged, kAudioObjectPropertyScopeGlobal, - kAudioObjectPropertyElementMaster + kAudioObjectPropertyElementMain }; /* Remove the property listener */