Add logging categories for most video objects.
Remove some useless debug lines in video-info and videotestsrc.
Add a performance debug line in the video scaler.
#include <string.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 ("videometa", 0, "videometa");
+
+ g_once_init_leave (&cat_gonce, cat_done);
+ }
+
+ return (GstDebugCategory *) cat_gonce;
+}
+#else
+#define ensure_debug_category() /* NOOP */
+#endif /* GST_DISABLE_GST_DEBUG */
+
static gboolean
gst_video_meta_transform (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data)
#include "gst/video/gstvideometa.h"
#include "gst/video/gstvideopool.h"
+
+GST_DEBUG_CATEGORY_STATIC (gst_video_pool_debug);
+#define GST_CAT_DEFAULT gst_video_pool_debug
+
/**
* SECTION:gstvideopool
* @short_description: GstBufferPool for raw video buffers
gstbufferpool_class->get_options = video_buffer_pool_get_options;
gstbufferpool_class->set_config = video_buffer_pool_set_config;
gstbufferpool_class->alloc_buffer = video_buffer_pool_alloc;
+
+ GST_DEBUG_CATEGORY_INIT (gst_video_pool_debug, "videopool", 0,
+ "videopool object");
}
static void
#include "video-orc.h"
#include "video-format.h"
+
/**
* SECTION:gstvideochroma
* @short_description: Functions and utility object for operating on chroma video planes
*
*/
+#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 ("video-chroma", 0,
+ "video-chroma 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 struct
{
const gchar *name;
#include "video-color.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 ("video-color", 0,
+ "video-color 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 struct
{
const gchar *name;
* 9 : a -> b -> c -> d -> e* -> f* -> g* -> h -> i -> j -> k
* 10 : a -> b -> c -> d -> e* -> f* -> g* -> h -> i -> j -> k
*/
+
+#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 ("video-converter", 0,
+ "video-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 struct _GstLineCache GstLineCache;
#define SCALE (8)
#include "video-info.h"
#include "video-tile.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 ("video-info", 0,
+ "video-info structure");
+
+ g_once_init_leave (&cat_gonce, cat_done);
+ }
+
+ return (GstDebugCategory *) cat_gonce;
+}
+#else
+#define ensure_debug_category() /* NOOP */
+#endif /* GST_DISABLE_GST_DEBUG */
+
/**
* gst_video_info_copy:
* @info: a #GstVideoInfo
cr_h = GST_ROUND_UP_2 (cr_h);
info->offset[2] = info->offset[1] + info->stride[1] * cr_h;
info->size = info->offset[2] + info->stride[2] * cr_h;
- GST_DEBUG ("%d %d %d", GST_VIDEO_INFO_IS_INTERLACED (info),
- (int) info->offset[2], (int) info->size);
break;
case GST_VIDEO_FORMAT_Y41B:
info->stride[0] = GST_ROUND_UP_4 (width);
#include "video-resampler.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 ("video-resampler", 0,
+ "video-resampler object");
+
+ g_once_init_leave (&cat_gonce, cat_done);
+ }
+
+ return (GstDebugCategory *) cat_gonce;
+}
+#else
+#define ensure_debug_category() /* NOOP */
+#endif /* GST_DISABLE_GST_DEBUG */
+
/**
* SECTION:gstvideoresampler
* @short_description: Utility structure for resampler information
*
*/
+
#define DEFAULT_OPT_CUBIC_B (1.0 / 3.0)
#define DEFAULT_OPT_CUBIC_C (1.0 / 3.0)
#include "video-orc.h"
#include "video-scaler.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 ("video-scaler", 0,
+ "video-scaler 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 SCALE_U8 12
#define SCALE_U8_ROUND (1 << (SCALE_U8 -1))
#define SCALE_U8_LQ 6
#include "videooverlay.h"
+GST_DEBUG_CATEGORY_STATIC (gst_video_overlay_debug);
+#define GST_CAT_DEFAULT gst_video_overlay_debug
+
GType
gst_video_overlay_get_type (void)
{
gst_video_overlay_type = g_type_register_static (G_TYPE_INTERFACE,
"GstVideoOverlay", &gst_video_overlay_info, 0);
+
+ GST_DEBUG_CATEGORY_INIT (gst_video_overlay_debug, "videooverlay", 0,
+ "videooverlay interface");
}
return gst_video_overlay_type;
GstVideoScale *videoscale = GST_VIDEO_SCALE_CAST (filter);
GstFlowReturn ret = GST_FLOW_OK;
+ GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, filter, "doing video scaling");
+
gst_video_converter_frame (videoscale->convert, in_frame, out_frame);
return ret;
for (i = 0; i < n_lines; i++) {
idx = CLAMP (y + i + offset, 0, height - 1);
-
- GST_DEBUG ("line %d, %d, idx %d", i, y + i + offset, idx);
lines[i] = p->lines[idx % n_lines];
}
idx = y + i + offset;
if (idx > height - 1)
break;
- GST_DEBUG ("pack line %d", idx);
finfo->pack_func (finfo, GST_VIDEO_PACK_FLAG_NONE,
lines[i], 0, frame->data, frame->info.stride,
frame->info.chroma_site, idx, width);