From f2d1c9b0b78910f3ba9e1d9f17ba09914fb27e31 Mon Sep 17 00:00:00 2001 From: Stefan Kost Date: Thu, 8 Oct 2009 17:49:39 +0300 Subject: [PATCH] ffmpegcolorspace: add perf-log-category and log suboptimal operation Log if we use an intermediate colorspace for conversion. --- gst/ffmpegcolorspace/gstffmpegcolorspace.c | 2 ++ gst/ffmpegcolorspace/imgconvert.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/gst/ffmpegcolorspace/gstffmpegcolorspace.c b/gst/ffmpegcolorspace/gstffmpegcolorspace.c index 9ae3c68..f4f1ae8 100644 --- a/gst/ffmpegcolorspace/gstffmpegcolorspace.c +++ b/gst/ffmpegcolorspace/gstffmpegcolorspace.c @@ -41,6 +41,7 @@ GST_DEBUG_CATEGORY (ffmpegcolorspace_debug); #define GST_CAT_DEFAULT ffmpegcolorspace_debug +GST_DEBUG_CATEGORY (GST_CAT_PERFORMANCE); /* elementfactory information */ static const GstElementDetails ffmpegcsp_details = @@ -488,6 +489,7 @@ gst_ffmpegcolorspace_register (GstPlugin * plugin) GST_DEBUG_CATEGORY_INIT (ffmpegcolorspace_debug, "ffmpegcolorspace", 0, "FFMPEG-based colorspace converter"); + GST_DEBUG_CATEGORY_GET (GST_CAT_PERFORMANCE, "GST_PERFORMANCE"); /* template caps */ caps = gst_ffmpegcsp_codectype_to_caps (CODEC_TYPE_VIDEO, NULL); diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index 5577ea6..9af38f3 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -35,6 +35,8 @@ #include #include +GST_DEBUG_CATEGORY_EXTERN (GST_CAT_PERFORMANCE); + #define xglue(x, y) x ## y #define glue(x, y) xglue(x, y) @@ -3121,6 +3123,8 @@ img_convert (AVPicture * dst, int dst_pix_fmt, return 0; } no_chroma_filter: + GST_CAT_INFO (GST_CAT_PERFORMANCE, "no direct path to convert colorspace " + "from %s -> %s", src_pix->name, dst_pix->name); /* try to use an intermediate format */ if (src_pix_fmt == PIX_FMT_YUV422 || dst_pix_fmt == PIX_FMT_YUV422) { -- 2.7.4