From 337cfb764aa95d61cd14d4c96a50c0da800286de Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 28 Feb 2012 16:49:10 +0100 Subject: [PATCH] add more debug about cropping --- ext/theora/gsttheoradec.c | 9 +++++++-- sys/ximage/ximagesink.c | 2 ++ sys/xvimage/xvimagesink.c | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ext/theora/gsttheoradec.c b/ext/theora/gsttheoradec.c index d15738bf1d..91e8a3b6fd 100644 --- a/ext/theora/gsttheoradec.c +++ b/ext/theora/gsttheoradec.c @@ -820,6 +820,8 @@ theora_negotiate_pool (GstTheoraDec * dec, GstCaps * caps, GstVideoInfo * info) dec->has_cropping = gst_query_has_allocation_meta (query, GST_VIDEO_CROP_META_API); + GST_DEBUG_OBJECT (dec, "downstream cropping %d", dec->has_cropping); + gst_buffer_pool_set_config (pool, config); /* and activate */ gst_buffer_pool_set_active (pool, TRUE); @@ -899,10 +901,13 @@ theora_handle_type_packet (GstTheoraDec * dec, ogg_packet * packet) } if (dec->info.pic_width != dec->info.frame_width || dec->info.pic_height != dec->info.frame_height || - dec->info.pic_x != 0 || dec->info.pic_y != 0) + dec->info.pic_x != 0 || dec->info.pic_y != 0) { + GST_DEBUG_OBJECT (dec, "we need to crop"); dec->need_cropping = TRUE; - else + } else { + GST_DEBUG_OBJECT (dec, "no cropping needed"); dec->need_cropping = FALSE; + } /* done */ dec->decoder = th_decode_alloc (&dec->info, dec->setup); diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c index 3a1faee126..bf2cc012c5 100644 --- a/sys/ximage/ximagesink.c +++ b/sys/ximage/ximagesink.c @@ -276,6 +276,8 @@ gst_ximagesink_ximage_put (GstXImageSink * ximagesink, GstBuffer * ximage) src.y = crop->y + meta->y; src.w = crop->width; src.h = crop->height; + GST_LOG_OBJECT (ximagesink, + "crop %dx%d-%dx%d", crop->x, crop->y, crop->width, crop->height); } else { src.x = meta->x; src.y = meta->y; diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index e223f0c277..a273b8ea66 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -316,6 +316,8 @@ gst_xvimagesink_xvimage_put (GstXvImageSink * xvimagesink, GstBuffer * xvimage) src.y = crop->y + meta->y; src.w = crop->width; src.h = crop->height; + GST_LOG_OBJECT (xvimagesink, + "crop %dx%d-%dx%d", crop->x, crop->y, crop->width, crop->height); } else { src.x = meta->x; src.y = meta->y;