mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-05 22:12:34 +00:00
Fix use of undeclared core debug category symbols
libgstreamer currently exports some debug category symbols GST_CAT_*, but those are not declared in any public headers. Some plugins and libgstvideo just use GST_DEBUG_CATEGORY_EXTERN() to declare and use those, but that's just not right at all, and it won't work on Windows with MSVC. Instead look up the categories via the API.
This commit is contained in:
parent
ddfe7a2808
commit
a62c7bd54c
9 changed files with 37 additions and 21 deletions
|
@ -49,8 +49,8 @@
|
|||
#include <gst/video/gstvideopool.h>
|
||||
|
||||
#define GST_CAT_DEFAULT theoradec_debug
|
||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
|
||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE);
|
||||
GST_DEBUG_CATEGORY_STATIC (theoradec_debug);
|
||||
GST_DEBUG_CATEGORY_STATIC (CAT_PERFORMANCE);
|
||||
|
||||
#define THEORA_DEF_TELEMETRY_MV 0
|
||||
#define THEORA_DEF_TELEMETRY_MBMODE 0
|
||||
|
@ -697,7 +697,7 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf,
|
|||
}
|
||||
|
||||
/* if only libtheora would allow us to give it a destination frame */
|
||||
GST_CAT_TRACE_OBJECT (GST_CAT_PERFORMANCE, dec,
|
||||
GST_CAT_TRACE_OBJECT (CAT_PERFORMANCE, dec,
|
||||
"doing unavoidable video frame copy");
|
||||
|
||||
if (G_UNLIKELY (!gst_video_frame_map (&vframe, &dec->uncropped_info,
|
||||
|
@ -997,6 +997,8 @@ theora_dec_get_property (GObject * object, guint prop_id,
|
|||
gboolean
|
||||
gst_theora_dec_register (GstPlugin * plugin)
|
||||
{
|
||||
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||
|
||||
return gst_element_register (plugin, "theoradec",
|
||||
GST_RANK_PRIMARY, GST_TYPE_THEORA_DEC);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,21 @@
|
|||
#include "video-tile.h"
|
||||
#include "gstvideometa.h"
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE);
|
||||
#define CAT_PERFORMANCE video_frame_get_perf_category()
|
||||
|
||||
static inline GstDebugCategory *
|
||||
video_frame_get_perf_category (void)
|
||||
{
|
||||
static GstDebugCategory *cat = NULL;
|
||||
|
||||
if (g_once_init_enter (&cat)) {
|
||||
GstDebugCategory *c;
|
||||
|
||||
GST_DEBUG_CATEGORY_GET (c, "GST_PERFORMANCE");
|
||||
g_once_init_leave (&cat, c);
|
||||
}
|
||||
return cat;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_video_frame_map_id:
|
||||
|
@ -316,8 +330,7 @@ gst_video_frame_copy_plane (GstVideoFrame * dest, const GstVideoFrame * src,
|
|||
} else {
|
||||
guint j;
|
||||
|
||||
GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "copy plane %d, w:%d h:%d ", plane, w,
|
||||
h);
|
||||
GST_CAT_DEBUG (CAT_PERFORMANCE, "copy plane %d, w:%d h:%d ", plane, w, h);
|
||||
|
||||
for (j = 0; j < h; j++) {
|
||||
memcpy (dp, sp, w);
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
|
||||
GST_DEBUG_CATEGORY (videoconvert_debug);
|
||||
#define GST_CAT_DEFAULT videoconvert_debug
|
||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE);
|
||||
GST_DEBUG_CATEGORY_STATIC (CAT_PERFORMANCE);
|
||||
|
||||
GType gst_video_convert_get_type (void);
|
||||
|
||||
|
@ -684,7 +684,7 @@ gst_video_convert_transform_frame (GstVideoFilter * filter,
|
|||
|
||||
space = GST_VIDEO_CONVERT_CAST (filter);
|
||||
|
||||
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, filter,
|
||||
GST_CAT_DEBUG_OBJECT (CAT_PERFORMANCE, filter,
|
||||
"doing colorspace conversion from %s -> to %s",
|
||||
GST_VIDEO_INFO_NAME (&filter->in_info),
|
||||
GST_VIDEO_INFO_NAME (&filter->out_info));
|
||||
|
@ -700,6 +700,8 @@ plugin_init (GstPlugin * plugin)
|
|||
GST_DEBUG_CATEGORY_INIT (videoconvert_debug, "videoconvert", 0,
|
||||
"Colorspace Converter");
|
||||
|
||||
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||
|
||||
_colorspace_quark = g_quark_from_static_string ("colorspace");
|
||||
|
||||
return gst_element_register (plugin, "videoconvert",
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
#define GST_CAT_DEFAULT video_scale_debug
|
||||
GST_DEBUG_CATEGORY_STATIC (video_scale_debug);
|
||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE);
|
||||
GST_DEBUG_CATEGORY_STATIC (CAT_PERFORMANCE);
|
||||
|
||||
#define DEFAULT_PROP_METHOD GST_VIDEO_SCALE_BILINEAR
|
||||
#define DEFAULT_PROP_ADD_BORDERS TRUE
|
||||
|
@ -517,7 +517,7 @@ gst_video_scale_set_info (GstVideoFilter * filter, GstCaps * in,
|
|||
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), TRUE);
|
||||
} else {
|
||||
GstStructure *options;
|
||||
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, filter, "setup videoscaling");
|
||||
GST_CAT_DEBUG_OBJECT (CAT_PERFORMANCE, filter, "setup videoscaling");
|
||||
gst_base_transform_set_passthrough (GST_BASE_TRANSFORM (filter), FALSE);
|
||||
|
||||
options = gst_structure_new_empty ("videoscale");
|
||||
|
@ -1079,7 +1079,7 @@ gst_video_scale_transform_frame (GstVideoFilter * filter,
|
|||
GstVideoScale *videoscale = GST_VIDEO_SCALE_CAST (filter);
|
||||
GstFlowReturn ret = GST_FLOW_OK;
|
||||
|
||||
GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, filter, "doing video scaling");
|
||||
GST_CAT_DEBUG_OBJECT (CAT_PERFORMANCE, filter, "doing video scaling");
|
||||
|
||||
gst_video_converter_frame (videoscale->convert, in_frame, out_frame);
|
||||
|
||||
|
@ -1134,7 +1134,7 @@ plugin_init (GstPlugin * plugin)
|
|||
|
||||
GST_DEBUG_CATEGORY_INIT (video_scale_debug, "videoscale", 0,
|
||||
"videoscale element");
|
||||
GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
GST_DEBUG_CATEGORY (gst_debug_x_image_pool);
|
||||
GST_DEBUG_CATEGORY (gst_debug_x_image_sink);
|
||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
|
||||
GST_DEBUG_CATEGORY (CAT_PERFORMANCE);
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
|
@ -39,7 +39,7 @@ plugin_init (GstPlugin * plugin)
|
|||
GST_DEBUG_CATEGORY_INIT (gst_debug_x_image_pool, "ximagepool", 0,
|
||||
"ximagepool object");
|
||||
|
||||
GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
#include <X11/XKBlib.h>
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (gst_debug_x_image_sink);
|
||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE);
|
||||
GST_DEBUG_CATEGORY_EXTERN (CAT_PERFORMANCE);
|
||||
#define GST_CAT_DEFAULT gst_debug_x_image_sink
|
||||
|
||||
typedef struct
|
||||
|
@ -1370,7 +1370,7 @@ gst_x_image_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
|
|||
if (res != GST_FLOW_OK)
|
||||
goto no_buffer;
|
||||
|
||||
GST_CAT_LOG_OBJECT (GST_CAT_PERFORMANCE, ximagesink,
|
||||
GST_CAT_LOG_OBJECT (CAT_PERFORMANCE, ximagesink,
|
||||
"slow copy into bufferpool buffer %p", to_put);
|
||||
|
||||
if (!gst_video_frame_map (&src, &ximagesink->info, buf, GST_MAP_READ))
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include <X11/XKBlib.h>
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (gst_debug_xv_context);
|
||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE);
|
||||
#define GST_CAT_DEFAULT gst_debug_xv_context
|
||||
|
||||
void
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
GST_DEBUG_CATEGORY (gst_debug_xv_context);
|
||||
GST_DEBUG_CATEGORY (gst_debug_xv_image_pool);
|
||||
GST_DEBUG_CATEGORY (gst_debug_xv_image_sink);
|
||||
GST_DEBUG_CATEGORY_STATIC (GST_CAT_PERFORMANCE);
|
||||
GST_DEBUG_CATEGORY (CAT_PERFORMANCE);
|
||||
|
||||
static gboolean
|
||||
plugin_init (GstPlugin * plugin)
|
||||
|
@ -42,7 +42,7 @@ plugin_init (GstPlugin * plugin)
|
|||
GST_DEBUG_CATEGORY_INIT (gst_debug_xv_image_pool, "xvimagepool", 0,
|
||||
"xvimagepool object");
|
||||
|
||||
GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||
GST_DEBUG_CATEGORY_GET (CAT_PERFORMANCE, "GST_PERFORMANCE");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@
|
|||
#include <X11/XKBlib.h>
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (gst_debug_xv_image_sink);
|
||||
GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE);
|
||||
GST_DEBUG_CATEGORY_EXTERN (CAT_PERFORMANCE);
|
||||
#define GST_CAT_DEFAULT gst_debug_xv_image_sink
|
||||
|
||||
typedef struct
|
||||
|
@ -956,7 +956,7 @@ gst_xv_image_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
|
|||
if (res != GST_FLOW_OK)
|
||||
goto no_buffer;
|
||||
|
||||
GST_CAT_LOG_OBJECT (GST_CAT_PERFORMANCE, xvimagesink,
|
||||
GST_CAT_LOG_OBJECT (CAT_PERFORMANCE, xvimagesink,
|
||||
"slow copy buffer %p into bufferpool buffer %p", buf, to_put);
|
||||
|
||||
if (!gst_video_frame_map (&src, &xvimagesink->info, buf, GST_MAP_READ))
|
||||
|
|
Loading…
Reference in a new issue