mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
audio: add debug categories
This commit is contained in:
parent
268ed5dd6f
commit
b8bea9d8be
6 changed files with 114 additions and 0 deletions
|
@ -31,6 +31,29 @@
|
|||
|
||||
#include "audio-channels.h"
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
#define GST_CAT_DEFAULT ensure_debug_category()
|
||||
static GstDebugCategory *
|
||||
ensure_debug_category (void)
|
||||
{
|
||||
static gsize cat_gonce = 0;
|
||||
|
||||
if (g_once_init_enter (&cat_gonce)) {
|
||||
gsize cat_done;
|
||||
|
||||
cat_done = (gsize) _gst_debug_category_new ("audio-channels", 0,
|
||||
"audio-channels object");
|
||||
|
||||
g_once_init_leave (&cat_gonce, cat_done);
|
||||
}
|
||||
|
||||
return (GstDebugCategory *) cat_gonce;
|
||||
}
|
||||
#else
|
||||
#define ensure_debug_category() /* NOOP */
|
||||
#endif /* GST_DISABLE_GST_DEBUG */
|
||||
|
||||
|
||||
static const GstAudioChannelPosition default_channel_order[64] = {
|
||||
GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,
|
||||
GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,
|
||||
|
|
|
@ -27,6 +27,29 @@
|
|||
|
||||
#include <gst/gststructure.h>
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
#define GST_CAT_DEFAULT ensure_debug_category()
|
||||
static GstDebugCategory *
|
||||
ensure_debug_category (void)
|
||||
{
|
||||
static gsize cat_gonce = 0;
|
||||
|
||||
if (g_once_init_enter (&cat_gonce)) {
|
||||
gsize cat_done;
|
||||
|
||||
cat_done = (gsize) _gst_debug_category_new ("audio-info", 0,
|
||||
"audio-info object");
|
||||
|
||||
g_once_init_leave (&cat_gonce, cat_done);
|
||||
}
|
||||
|
||||
return (GstDebugCategory *) cat_gonce;
|
||||
}
|
||||
#else
|
||||
#define ensure_debug_category() /* NOOP */
|
||||
#endif /* GST_DISABLE_GST_DEBUG */
|
||||
|
||||
|
||||
/**
|
||||
* gst_audio_info_copy:
|
||||
* @info: a #GstAudioInfo
|
||||
|
|
|
@ -32,6 +32,28 @@
|
|||
#include "audio.h"
|
||||
#include "audio-enumtypes.h"
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
#define GST_CAT_DEFAULT ensure_debug_category()
|
||||
static GstDebugCategory *
|
||||
ensure_debug_category (void)
|
||||
{
|
||||
static gsize cat_gonce = 0;
|
||||
|
||||
if (g_once_init_enter (&cat_gonce)) {
|
||||
gsize cat_done;
|
||||
|
||||
cat_done = (gsize) _gst_debug_category_new ("audio", 0, "audio library");
|
||||
|
||||
g_once_init_leave (&cat_gonce, cat_done);
|
||||
}
|
||||
|
||||
return (GstDebugCategory *) cat_gonce;
|
||||
}
|
||||
#else
|
||||
#define ensure_debug_category() /* NOOP */
|
||||
#endif /* GST_DISABLE_GST_DEBUG */
|
||||
|
||||
|
||||
/**
|
||||
* gst_audio_buffer_clip:
|
||||
* @buffer: (transfer full): The buffer to clip.
|
||||
|
|
|
@ -53,6 +53,28 @@
|
|||
* </refsect2>
|
||||
*/
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
#define GST_CAT_DEFAULT ensure_debug_category()
|
||||
static GstDebugCategory *
|
||||
ensure_debug_category (void)
|
||||
{
|
||||
static gsize cat_gonce = 0;
|
||||
|
||||
if (g_once_init_enter (&cat_gonce)) {
|
||||
gsize cat_done;
|
||||
|
||||
cat_done = (gsize) _gst_debug_category_new ("audio-converter", 0,
|
||||
"audio-converter object");
|
||||
|
||||
g_once_init_leave (&cat_gonce, cat_done);
|
||||
}
|
||||
|
||||
return (GstDebugCategory *) cat_gonce;
|
||||
}
|
||||
#else
|
||||
#define ensure_debug_category() /* NOOP */
|
||||
#endif /* GST_DISABLE_GST_DEBUG */
|
||||
|
||||
typedef void (*AudioConvertFunc) (gpointer dst, const gpointer src, gint count);
|
||||
|
||||
/**
|
||||
|
|
|
@ -68,6 +68,7 @@
|
|||
|
||||
GST_DEBUG_CATEGORY (audio_convert_debug);
|
||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
|
||||
#define GST_CAT_DEFAULT (audio_convert_debug)
|
||||
|
||||
/*** DEFINITIONS **************************************************************/
|
||||
|
||||
|
|
|
@ -29,6 +29,29 @@
|
|||
|
||||
#include "gstchannelmix.h"
|
||||
|
||||
#ifndef GST_DISABLE_GST_DEBUG
|
||||
#define GST_CAT_DEFAULT ensure_debug_category()
|
||||
static GstDebugCategory *
|
||||
ensure_debug_category (void)
|
||||
{
|
||||
static gsize cat_gonce = 0;
|
||||
|
||||
if (g_once_init_enter (&cat_gonce)) {
|
||||
gsize cat_done;
|
||||
|
||||
cat_done = (gsize) _gst_debug_category_new ("audio-channel-mix", 0,
|
||||
"audio-channel-mix object");
|
||||
|
||||
g_once_init_leave (&cat_gonce, cat_done);
|
||||
}
|
||||
|
||||
return (GstDebugCategory *) cat_gonce;
|
||||
}
|
||||
#else
|
||||
#define ensure_debug_category() /* NOOP */
|
||||
#endif /* GST_DISABLE_GST_DEBUG */
|
||||
|
||||
|
||||
#define INT_MATRIX_FACTOR_EXPONENT 10
|
||||
|
||||
typedef void (*MixFunc) (GstAudioChannelMix * mix, const gpointer src,
|
||||
|
|
Loading…
Reference in a new issue