{
GstMetaItem *walk;
gsize bufsize;
+ gboolean region = FALSE;
g_return_if_fail (dest != NULL);
g_return_if_fail (src != NULL);
bufsize = gst_buffer_get_size (src);
g_return_if_fail (bufsize >= offset);
+ if (offset > 0)
+ region = TRUE;
if (size == -1)
size = bufsize - offset;
+ if (size < bufsize)
+ region = TRUE;
g_return_if_fail (bufsize >= offset + size);
GST_CAT_LOG (GST_CAT_BUFFER, "copy %p to %p, offset %" G_GSIZE_FORMAT
if (info->transform_func) {
GstMetaTransformCopy copy_data;
+ copy_data.region = region;
copy_data.offset = offset;
copy_data.size = size;
/**
* GstMetaTransformCopy:
- * @offset: the offset to copy
- * @size: the size to copy
+ * @region: %TRUE if only region is copied
+ * @offset: the offset to copy, 0 if @region is %FALSE, otherwise > 0
+ * @size: the size to copy, -1 or the buffer size when @region is %FALSE
*
* Extra data passed to a "gst-copy" transform #GstMetaTransformFunction.
*/
typedef struct {
+ gboolean region;
gsize offset;
gsize size;
} GstMetaTransformCopy;