osxaudio: Share debug category in the internal coreaudio object

Make the internal coreaudio object output debug to the same
debug category by making it shared between code units.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5140>
This commit is contained in:
Jan Schmidt 2023-07-26 00:21:24 +10:00 committed by GStreamer Marge Bot
parent f5d2ea76b4
commit e22c7fb3e4
3 changed files with 28 additions and 29 deletions

View file

@ -24,8 +24,8 @@
#include "gstosxcoreaudio.h"
#include "gstosxcoreaudiocommon.h"
GST_DEBUG_CATEGORY_STATIC (osx_audio_debug);
#define GST_CAT_DEFAULT osx_audio_debug
GST_DEBUG_CATEGORY (osx_coreaudio_debug);
#define GST_CAT_DEFAULT osx_coreaudio_debug
G_DEFINE_TYPE (GstCoreAudio, gst_core_audio, G_TYPE_OBJECT);
@ -260,7 +260,7 @@ gst_core_audio_select_device (GstCoreAudio * core_audio)
void
gst_core_audio_init_debug (void)
{
GST_DEBUG_CATEGORY_INIT (osx_audio_debug, "osxaudio", 0,
GST_DEBUG_CATEGORY_INIT (osx_coreaudio_debug, "osxaudio", 0,
"OSX Audio Elements");
}

View file

@ -23,6 +23,9 @@
#include "gstosxcoreaudiocommon.h"
GST_DEBUG_CATEGORY_EXTERN (osx_coreaudio_debug);
#define GST_CAT_DEFAULT osx_coreaudio_debug
void
gst_core_audio_remove_render_callback (GstCoreAudio * core_audio)
{

View file

@ -1162,7 +1162,7 @@ gst_core_audio_initialize_impl (GstCoreAudio * core_audio,
_monitorize_spdif (core_audio);
} else {
OSStatus status;
UInt32 propertySize;
UInt32 propertySize = sizeof (*frame_size);
core_audio->stream_idx = 0;
if (!gst_core_audio_set_format (core_audio, format))
@ -1172,9 +1172,6 @@ gst_core_audio_initialize_impl (GstCoreAudio * core_audio,
format.mChannelsPerFrame, caps))
goto done;
if (core_audio->is_src) {
propertySize = sizeof (*frame_size);
// Attempt to configure the requested frame size if smaller than the device's
// This will apparently modify the size for all audio devices in the current process so should
// be done conservatively
@ -1201,7 +1198,6 @@ gst_core_audio_initialize_impl (GstCoreAudio * core_audio,
goto done;
}
}
}
ret = TRUE;