Philippe Normand 2022-01-15 10:06:23 +00:00
parent 009bc15f33
commit 62b8caa6ab
6 changed files with 121 additions and 10 deletions

View file

@ -43,8 +43,26 @@
#include <string.h> #include <string.h>
GST_DEBUG_CATEGORY_EXTERN (pbutils_debug); #ifndef GST_DISABLE_GST_DEBUG
#define GST_CAT_DEFAULT pbutils_debug #define GST_CAT_DEFAULT gst_pb_utils_codec_utils_ensure_debug_category()
static GstDebugCategory *
gst_pb_utils_codec_utils_ensure_debug_category (void)
{
static gsize cat_gonce = 0;
if (g_once_init_enter (&cat_gonce)) {
GstDebugCategory *cat = NULL;
GST_DEBUG_CATEGORY_INIT (cat, "codec-utils", 0,
"GstPbUtils codec helper functions");
g_once_init_leave (&cat_gonce, (gsize) cat);
}
return (GstDebugCategory *) cat_gonce;
}
#endif /* GST_DISABLE_GST_DEBUG */
#define GST_SIMPLE_CAPS_HAS_NAME(caps,name) \ #define GST_SIMPLE_CAPS_HAS_NAME(caps,name) \
gst_structure_has_name(gst_caps_get_structure((caps),0),(name)) gst_structure_has_name(gst_caps_get_structure((caps),0),(name))

View file

@ -299,8 +299,26 @@
#include <string.h> #include <string.h>
GST_DEBUG_CATEGORY_EXTERN (pbutils_debug); #ifndef GST_DISABLE_GST_DEBUG
#define GST_CAT_DEFAULT pbutils_debug #define GST_CAT_DEFAULT gst_pb_utils_encoding_profile_ensure_debug_category()
static GstDebugCategory *
gst_pb_utils_encoding_profile_ensure_debug_category (void)
{
static gsize cat_gonce = 0;
if (g_once_init_enter (&cat_gonce)) {
GstDebugCategory *cat = NULL;
GST_DEBUG_CATEGORY_INIT (cat, "encoding-profile", 0,
"GstPbUtils encoding profile");
g_once_init_leave (&cat_gonce, (gsize) cat);
}
return (GstDebugCategory *) cat_gonce;
}
#endif /* GST_DISABLE_GST_DEBUG */
/* GstEncodingProfile API */ /* GstEncodingProfile API */
#define PROFILE_LOCK(profile) (g_mutex_lock(&((GstEncodingProfile*)profile)->lock)) #define PROFILE_LOCK(profile) (g_mutex_lock(&((GstEncodingProfile*)profile)->lock))

View file

@ -88,8 +88,26 @@
/* Documented in encoding-profile.c */ /* Documented in encoding-profile.c */
GST_DEBUG_CATEGORY_EXTERN (pbutils_debug); #ifndef GST_DISABLE_GST_DEBUG
#define GST_CAT_DEFAULT pbutils_debug #define GST_CAT_DEFAULT gst_pb_utils_encoding_target_ensure_debug_category()
static GstDebugCategory *
gst_pb_utils_encoding_target_ensure_debug_category (void)
{
static gsize cat_gonce = 0;
if (g_once_init_enter (&cat_gonce)) {
GstDebugCategory *cat = NULL;
GST_DEBUG_CATEGORY_INIT (cat, "encoding-target", 0,
"GstPbUtils encoding target");
g_once_init_leave (&cat_gonce, (gsize) cat);
}
return (GstDebugCategory *) cat_gonce;
}
#endif /* GST_DISABLE_GST_DEBUG */
#define GST_ENCODING_TARGET_HEADER "GStreamer Encoding Target" #define GST_ENCODING_TARGET_HEADER "GStreamer Encoding Target"
#define GST_ENCODING_TARGET_DIRECTORY "encoding-profiles" #define GST_ENCODING_TARGET_DIRECTORY "encoding-profiles"

View file

@ -272,6 +272,27 @@
#include <string.h> #include <string.h>
#ifndef GST_DISABLE_GST_DEBUG
#define GST_CAT_DEFAULT gst_pb_utils_install_plugins_ensure_debug_category()
static GstDebugCategory *
gst_pb_utils_install_plugins_ensure_debug_category (void)
{
static gsize cat_gonce = 0;
if (g_once_init_enter (&cat_gonce)) {
GstDebugCategory *cat = NULL;
GST_DEBUG_CATEGORY_INIT (cat, "install-plugins", 0,
"GstPbUtils plugins installation helper");
g_once_init_leave (&cat_gonce, (gsize) cat);
}
return (GstDebugCategory *) cat_gonce;
}
#endif /* GST_DISABLE_GST_DEBUG */
/* best effort to make things compile and possibly even work on win32 */ /* best effort to make things compile and possibly even work on win32 */
#ifndef WEXITSTATUS #ifndef WEXITSTATUS
# define WEXITSTATUS(status) ((((guint)(status)) & 0xff00) >> 8) # define WEXITSTATUS(status) ((((guint)(status)) & 0xff00) >> 8)

View file

@ -63,6 +63,27 @@
#include <string.h> #include <string.h>
#ifndef GST_DISABLE_GST_DEBUG
#define GST_CAT_DEFAULT gst_pb_utils_missing_plugins_ensure_debug_category()
static GstDebugCategory *
gst_pb_utils_missing_plugins_ensure_debug_category (void)
{
static gsize cat_gonce = 0;
if (g_once_init_enter (&cat_gonce)) {
GstDebugCategory *cat = NULL;
GST_DEBUG_CATEGORY_INIT (cat, "missing-plugins", 0,
"GstPbUtils missing plugins helper");
g_once_init_leave (&cat_gonce, (gsize) cat);
}
return (GstDebugCategory *) cat_gonce;
}
#endif /* GST_DISABLE_GST_DEBUG */
#define GST_DETAIL_STRING_MARKER "gstreamer" #define GST_DETAIL_STRING_MARKER "gstreamer"
typedef enum typedef enum

View file

@ -61,8 +61,25 @@
#include "gst/gst-i18n-plugin.h" #include "gst/gst-i18n-plugin.h"
GST_DEBUG_CATEGORY (pbutils_debug); #ifndef GST_DISABLE_GST_DEBUG
#define GST_CAT_DEFAULT pbutils_debug #define GST_CAT_DEFAULT gst_pb_utils_ensure_debug_category()
static GstDebugCategory *
gst_pb_utils_ensure_debug_category (void)
{
static gsize cat_gonce = 0;
if (g_once_init_enter (&cat_gonce)) {
GstDebugCategory *cat = NULL;
GST_DEBUG_CATEGORY_INIT (cat, "pbutils", 0, "GStreamer Plugins Base utils");
g_once_init_leave (&cat_gonce, (gsize) cat);
}
return (GstDebugCategory *) cat_gonce;
}
#endif /* GST_DISABLE_GST_DEBUG */
static gpointer static gpointer
_init_locale_text_domain (gpointer data) _init_locale_text_domain (gpointer data)
@ -104,8 +121,6 @@ gst_pb_utils_init (void)
GST_LOG ("already initialised"); GST_LOG ("already initialised");
return; return;
} }
GST_DEBUG_CATEGORY_INIT (pbutils_debug, "pbutils", 0,
"GStreamer Plugins Base utils");
gst_pb_utils_init_locale_text_domain (); gst_pb_utils_init_locale_text_domain ();
inited = TRUE; inited = TRUE;