mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
add more debug about cropping
This commit is contained in:
parent
a232714065
commit
337cfb764a
3 changed files with 11 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue