&input, sizeof (input));
if (status) {
- GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to remove render callback %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING_OBJECT (core_audio->osxbuf,
+ "Failed to remove render callback %d", (int) status);
}
/* Remove the RenderNotify too */
if (status) {
GST_WARNING_OBJECT (core_audio->osxbuf,
- "Failed to remove render notify callback %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ "Failed to remove render notify callback %d", (int) status);
}
/* We're deactivated.. */
if (status) {
GST_ERROR_OBJECT (core_audio->osxbuf,
- "AudioUnitSetProperty failed: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ "AudioUnitSetProperty failed: %d", (int) status);
return FALSE;
}
// ### does it make sense to do this notify stuff for input mode?
if (status) {
GST_ERROR_OBJECT (core_audio->osxbuf,
- "AudioUnitAddRenderNotify failed %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ "AudioUnitAddRenderNotify failed %d", (int) status);
return FALSE;
}
core_audio->io_proc_active = TRUE;
status = AudioOutputUnitStart (core_audio->audiounit);
if (status) {
- GST_ERROR_OBJECT (core_audio->osxbuf, "AudioOutputUnitStart failed: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_ERROR_OBJECT (core_audio->osxbuf, "AudioOutputUnitStart failed: %d",
+ (int) status);
return FALSE;
}
return TRUE;
status = AudioOutputUnitStop (core_audio->audiounit);
if (status) {
GST_WARNING_OBJECT (core_audio->osxbuf,
- "AudioOutputUnitStop failed: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ "AudioOutputUnitStop failed: %d", (int) status);
}
// ###: why is it okay to directly remove from here but not from pause() ?
if (core_audio->io_proc_active) {
kAudioOutputUnitProperty_CurrentDevice, kAudioUnitScope_Global, 0,
&core_audio->device_id, sizeof (AudioDeviceID));
if (status) {
- GST_ERROR_OBJECT (core_audio->osxbuf, "Failed binding to device: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_ERROR_OBJECT (core_audio->osxbuf, "Failed binding to device: %d",
+ (int) status);
goto audiounit_error;
}
return TRUE;
scope, element, layout, layoutSize);
if (status) {
GST_WARNING_OBJECT (core_audio->osxbuf,
- "Failed to set output channel layout: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ "Failed to set output channel layout: %d", (int) status);
return FALSE;
}
}
if (status) {
GST_WARNING_OBJECT (core_audio->osxbuf,
- "Failed to set audio description: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ "Failed to set audio description: %d", (int) status);
return FALSE;;
}
status = AudioComponentInstanceNew (comp, &unit);
if (status) {
- GST_ERROR_OBJECT (core_audio->osxbuf, "Couldn't open %s component %"
- GST_FOURCC_FORMAT, adesc, GST_FOURCC_ARGS (status));
+ GST_ERROR_OBJECT (core_audio->osxbuf, "Couldn't open %s component %d",
+ adesc, (int) status);
return FALSE;
}
if (status) {
AudioComponentInstanceDispose (unit);
- GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to enable input: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to enable input: %d",
+ (int) status);
return FALSE;
}
if (status) {
AudioComponentInstanceDispose (unit);
- GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to disable output: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to disable output: %d",
+ (int) status);
return FALSE;
}
}
if (status == noErr) {
res = TRUE;
} else {
- GST_ERROR ("failed to set runloop to %p: %" GST_FOURCC_FORMAT,
- runLoop, GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to set runloop to %p: %d", runLoop, (int) status);
}
return res;
status = AudioObjectGetPropertyData (kAudioObjectSystemObject,
&defaultDeviceAddress, 0, NULL, &propertySize, &device_id);
if (status != noErr) {
- GST_ERROR ("failed getting default output device: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed getting default output device: %d", (int) status);
}
return device_id;
status = AudioObjectGetPropertyDataSize (kAudioObjectSystemObject,
&audioDevicesAddress, 0, NULL, &propertySize);
if (status != noErr) {
- GST_WARNING ("failed getting number of devices: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING ("failed getting number of devices: %d", (int) status);
return NULL;
}
status = AudioObjectGetPropertyData (kAudioObjectSystemObject,
&audioDevicesAddress, 0, NULL, &propertySize, devices);
if (status != noErr) {
- GST_WARNING ("failed getting the list of devices: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING ("failed getting the list of devices: %d", (int) status);
g_free (devices);
*ndevices = 0;
return NULL;
status = AudioObjectGetPropertyData (device_id,
&audioDeviceLatencyAddress, 0, NULL, &propertySize, &latency);
if (status != noErr) {
- GST_ERROR ("failed to get latency: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to get latency: %d", (int) status);
latency = -1;
}
status = AudioObjectGetPropertyData (device_id,
&audioDeviceHogModeAddress, 0, NULL, &propertySize, &hog_pid);
if (status != noErr) {
- GST_ERROR ("failed to get hog: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to get hog: %d", (int) status);
hog_pid = -1;
}
if (status == noErr) {
res = TRUE;
} else {
- GST_ERROR ("failed to set hog: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to set hog: %d", (int) status);
}
return res;
status = AudioObjectIsPropertySettable (device_id,
&audioDeviceSupportsMixingAddress, &writable);
if (status) {
- GST_DEBUG ("AudioObjectIsPropertySettable: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_DEBUG ("AudioObjectIsPropertySettable: %d", (int) status);
}
status = AudioObjectGetPropertyDataSize (device_id,
&audioDeviceSupportsMixingAddress, 0, NULL, &propertySize);
if (status) {
- GST_DEBUG ("AudioObjectGetPropertyDataSize: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_DEBUG ("AudioObjectGetPropertyDataSize: %d", (int) status);
}
status = AudioObjectGetPropertyData (device_id,
&audioDeviceSupportsMixingAddress, 0, NULL, &propertySize, &can_mix);
if (status) {
- GST_DEBUG ("AudioObjectGetPropertyData: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_DEBUG ("AudioObjectGetPropertyData: %d", (int) status);
}
if (status == noErr && writable) {
}
if (status != noErr) {
- GST_ERROR ("failed to set mixmode: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to set mixmode: %d", (int) status);
}
} else {
GST_DEBUG ("property not found, mixing coudln't be changed");
status = AudioObjectGetPropertyDataSize (device_id,
&channelLayoutAddress, 0, NULL, &propertySize);
if (status != noErr) {
- GST_ERROR ("failed to get prefered layout: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to get prefered layout: %d", (int) status);
goto beach;
}
status = AudioObjectGetPropertyData (device_id,
&channelLayoutAddress, 0, NULL, &propertySize, layout);
if (status != noErr) {
- GST_ERROR ("failed to get prefered layout: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to get prefered layout: %d", (int) status);
goto failed;
}
AudioFormatGetProperty (kAudioFormatProperty_ChannelLayoutForBitmap,
sizeof (UInt32), &layout->mChannelBitmap, &propertySize, layout);
if (status != noErr) {
- GST_ERROR ("failed to get layout for bitmap: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to get layout for bitmap: %d", (int) status);
goto failed;
}
} else if (layout->mChannelLayoutTag !=
sizeof (AudioChannelLayoutTag), &layout->mChannelLayoutTag,
&propertySize, layout);
if (status != noErr) {
- GST_ERROR ("failed to get layout for tag: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to get layout for tag: %d", (int) status);
goto failed;
}
}
status = AudioObjectGetPropertyDataSize (device_id,
&streamsAddress, 0, NULL, &propertySize);
if (status != noErr) {
- GST_WARNING ("failed getting number of streams: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING ("failed getting number of streams: %d", (int) status);
return NULL;
}
status = AudioObjectGetPropertyData (device_id,
&streamsAddress, 0, NULL, &propertySize, streams);
if (status != noErr) {
- GST_WARNING ("failed getting the list of streams: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING ("failed getting the list of streams: %d", (int) status);
g_free (streams);
*nstreams = 0;
return NULL;
status = AudioObjectGetPropertyData (stream_id,
&latencyAddress, 0, NULL, &propertySize, &latency);
if (status != noErr) {
- GST_ERROR ("failed to get latency: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to get latency: %d", (int) status);
latency = -1;
}
status = AudioObjectGetPropertyData (stream_id,
&formatAddress, 0, NULL, &propertySize, format);
if (status != noErr) {
- GST_ERROR ("failed to get current format: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to get current format: %d", (int) status);
return FALSE;
}
status = AudioObjectSetPropertyData (stream_id,
&formatAddress, 0, NULL, propertySize, &format);
if (status != noErr) {
- GST_ERROR ("failed to set current format: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ GST_ERROR ("failed to set current format: %d", (int) status);
return FALSE;
}
status = AudioObjectGetPropertyDataSize (stream_id,
&formatsAddress, 0, NULL, &propertySize);
if (status != noErr) {
- GST_WARNING ("failed getting number of stream formats: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING ("failed getting number of stream formats: %d", (int) status);
return NULL;
}
status = AudioObjectGetPropertyData (stream_id,
&formatsAddress, 0, NULL, &propertySize, formats);
if (status != noErr) {
- GST_WARNING ("failed getting the list of stream formats: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING ("failed getting the list of stream formats: %d",
+ (int) status);
g_free (formats);
*nformats = 0;
return NULL;
status = AudioObjectAddPropertyListener (stream_id, &formatAddress,
_audio_stream_format_listener, (void *) &prop_mutex);
if (status != noErr) {
- GST_ERROR ("AudioObjectAddPropertyListener failed: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_ERROR ("AudioObjectAddPropertyListener failed: %d", (int) status);
goto done;
}
status = AudioObjectRemovePropertyListener (stream_id,
&formatAddress, _audio_stream_format_listener, (void *) &prop_mutex);
if (status != noErr) {
- GST_ERROR ("AudioObjectRemovePropertyListener failed: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_ERROR ("AudioObjectRemovePropertyListener failed: %d", (int) status);
}
/* Destroy the lock and condition */
g_mutex_unlock (&prop_mutex.lock);
(void *) core_audio);
if (status != noErr) {
GST_ERROR_OBJECT (core_audio->osxbuf,
- "AudioObjectAddPropertyListener failed: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ "AudioObjectAddPropertyListener failed: %d", (int) status);
ret = FALSE;
}
(void *) core_audio);
if (status != noErr) {
GST_ERROR_OBJECT (core_audio->osxbuf,
- "AudioObjectRemovePropertyListener failed: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ "AudioObjectRemovePropertyListener failed: %d", (int) status);
ret = FALSE;
}
AudioDeviceDestroyIOProcID (core_audio->device_id, core_audio->procID);
if (status != noErr) {
GST_ERROR_OBJECT (core_audio->osxbuf,
- "AudioDeviceDestroyIOProcID failed: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ "AudioDeviceDestroyIOProcID failed: %d", (int) status);
}
GST_DEBUG_OBJECT (core_audio,
(void *) core_audio, &core_audio->procID);
if (status != noErr) {
GST_ERROR_OBJECT (core_audio->osxbuf,
- ":AudioDeviceCreateIOProcID failed: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ ":AudioDeviceCreateIOProcID failed: %d", (int) status);
return FALSE;
}
core_audio->io_proc_active = TRUE;
status = AudioDeviceStart (core_audio->device_id, core_audio->procID);
if (status != noErr) {
GST_ERROR_OBJECT (core_audio->osxbuf,
- "AudioDeviceStart failed: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ "AudioDeviceStart failed: %d", (int) status);
return FALSE;
}
return TRUE;
status = AudioDeviceStop (core_audio->device_id, core_audio->procID);
if (status != noErr) {
GST_ERROR_OBJECT (core_audio->osxbuf,
- "AudioDeviceStop failed: %" GST_FOURCC_FORMAT,
- GST_FOURCC_ARGS (status));
+ "AudioDeviceStop failed: %d", (int) status);
}
GST_DEBUG_OBJECT (core_audio,
latency, &size);
if (status) {
- GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to get latency: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to get latency: %d",
+ (int) status);
*samples = 0;
return FALSE;
}
frame_size, &propertySize);
if (status) {
- GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to get frame size: %"
- GST_FOURCC_FORMAT, GST_FOURCC_ARGS (status));
+ GST_WARNING_OBJECT (core_audio->osxbuf, "Failed to get frame size: %d",
+ (int) status);
goto done;
}
}