ffmpegcolorspace: add perf-log-category and log suboptimal operation
authorStefan Kost <ensonic@users.sf.net>
Thu, 8 Oct 2009 14:49:39 +0000 (17:49 +0300)
committerStefan Kost <ensonic@users.sf.net>
Thu, 8 Oct 2009 15:09:52 +0000 (18:09 +0300)
Log if we use an intermediate colorspace for conversion.

gst/ffmpegcolorspace/gstffmpegcolorspace.c
gst/ffmpegcolorspace/imgconvert.c

index 9ae3c68..f4f1ae8 100644 (file)
@@ -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);
index 5577ea6..9af38f3 100644 (file)
@@ -35,6 +35,8 @@
 #include <string.h>
 #include <stdlib.h>
 
+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) {