GstV4l2Meta *meta;
GstV4l2Object *obj;
GstVideoInfo *info;
+ GstVideoAlignment *align;
guint index;
gint i;
obj = pool->obj;
info = &obj->info;
+ align = &obj->align;
switch (obj->mode) {
case GST_V4L2_IO_RW:
GST_VIDEO_INFO_FORMAT (info), width, height, n_gst_planes,
offset, stride);
}
+
+ if (pool->add_cropmeta) {
+ GstVideoCropMeta *crop;
+ crop = gst_buffer_add_video_crop_meta (newbuf);
+ crop->x = align->padding_left;
+ crop->y = align->padding_top;
+ crop->width = info->width;
+ crop->width = info->height;
+ }
break;
}
case GST_V4L2_IO_USERPTR:
return FALSE;
}
}
+
+void
+gst_v4l2_buffer_pool_add_crop_meta (GstV4l2BufferPool * bpool, gboolean add)
+{
+ bpool->add_cropmeta = add;
+}