Store the dimensions of the unpadded image in the metadata and use that info to
display the valid region of the image.
meta->SHMInfo.shmaddr = ((void *) -1);
meta->SHMInfo.shmid = -1;
#endif
- meta->width = width;
- meta->height = height;
+ meta->x = priv->align.padding_left;
+ meta->y = priv->align.padding_top;
+ meta->width = priv->info.width;
+ meta->height = priv->info.height;
meta->sink = gst_object_ref (xvimagesink);
meta->im_format = im_format;
XShmSegmentInfo SHMInfo;
#endif /* HAVE_XSHM */
- gint width, height, im_format;
+ gint x, y;
+ gint width, height;
+ gint im_format;
size_t size;
};
crop = gst_buffer_get_meta_video_crop (xvimage);
if (crop) {
- src.x = crop->x;
- src.y = crop->y;
+ src.x = crop->x + meta->x;
+ src.y = crop->y + meta->y;
src.w = crop->width;
src.h = crop->height;
} else {
- src.x = 0;
- src.y = 0;
+ src.x = meta->x;
+ src.y = meta->y;
src.w = meta->width;
src.h = meta->height;
}