add more debug about cropping

This commit is contained in:
Wim Taymans 2012-02-28 16:49:10 +01:00
parent a232714065
commit 337cfb764a
3 changed files with 11 additions and 2 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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;