update for metadata changes

This commit is contained in:
Wim Taymans 2012-02-24 10:26:04 +01:00
parent 06ccd80811
commit 525f330142
4 changed files with 34 additions and 33 deletions

View file

@ -47,8 +47,8 @@ gst_audio_downmix_meta_free (GstMeta * meta, GstBuffer * buffer)
}
static void
gst_audio_downmix_meta_copy (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, gsize offset, gsize size)
gst_audio_downmix_meta_transform (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data)
{
GstAudioDownmixMeta *smeta;
@ -158,9 +158,8 @@ gst_audio_downmix_meta_get_info (void)
audio_downmix_meta_info =
gst_meta_register (GST_AUDIO_DOWNMIX_META_API, "GstAudioDownmixMeta",
sizeof (GstAudioDownmixMeta),
(GstMetaInitFunction) gst_audio_downmix_meta_init,
(GstMetaFreeFunction) gst_audio_downmix_meta_free,
gst_audio_downmix_meta_copy, (GstMetaTransformFunction) NULL);
gst_audio_downmix_meta_init,
gst_audio_downmix_meta_free, gst_audio_downmix_meta_transform);
}
return audio_downmix_meta_info;
}

View file

@ -20,28 +20,30 @@
#include "gstvideometa.h"
static void
gst_video_meta_copy (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, gsize offset, gsize size)
gst_video_meta_transform (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data)
{
GstVideoMeta *dmeta, *smeta;
guint i;
smeta = (GstVideoMeta *) meta;
dmeta =
(GstVideoMeta *) gst_buffer_add_meta (dest, GST_VIDEO_META_INFO, NULL);
dmeta->buffer = dest;
if (GST_META_TRANSFORM_IS_COPY (type)) {
dmeta =
(GstVideoMeta *) gst_buffer_add_meta (dest, GST_VIDEO_META_INFO, NULL);
dmeta->buffer = dest;
dmeta->flags = smeta->flags;
dmeta->id = smeta->id;
dmeta->format = smeta->format;
dmeta->width = smeta->width;
dmeta->height = smeta->height;
dmeta->flags = smeta->flags;
dmeta->id = smeta->id;
dmeta->format = smeta->format;
dmeta->width = smeta->width;
dmeta->height = smeta->height;
dmeta->n_planes = smeta->n_planes;
for (i = 0; i < dmeta->n_planes; i++) {
dmeta->offset[i] = smeta->offset[i];
dmeta->stride[i] = smeta->stride[i];
dmeta->n_planes = smeta->n_planes;
for (i = 0; i < dmeta->n_planes; i++) {
dmeta->offset[i] = smeta->offset[i];
dmeta->stride[i] = smeta->stride[i];
}
}
}
@ -55,8 +57,7 @@ gst_video_meta_get_info (void)
video_meta_info = gst_meta_register (GST_VIDEO_META_API, "GstVideoMeta",
sizeof (GstVideoMeta),
(GstMetaInitFunction) NULL,
(GstMetaFreeFunction) NULL,
gst_video_meta_copy, (GstMetaTransformFunction) NULL);
(GstMetaFreeFunction) NULL, gst_video_meta_transform);
}
return video_meta_info;
}
@ -285,18 +286,20 @@ gst_video_meta_unmap (GstVideoMeta * meta, guint plane, GstMapInfo * info)
}
static void
gst_video_crop_meta_copy (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, gsize offset, gsize size)
gst_video_crop_meta_transform (GstBuffer * dest, GstMeta * meta,
GstBuffer * buffer, GQuark type, gpointer data)
{
GstVideoCropMeta *dmeta, *smeta;
smeta = (GstVideoCropMeta *) meta;
dmeta = gst_buffer_add_video_crop_meta (dest);
if (GST_META_TRANSFORM_IS_COPY (type)) {
smeta = (GstVideoCropMeta *) meta;
dmeta = gst_buffer_add_video_crop_meta (dest);
dmeta->x = smeta->x;
dmeta->y = smeta->y;
dmeta->width = smeta->width;
dmeta->height = smeta->height;
dmeta->x = smeta->x;
dmeta->y = smeta->y;
dmeta->width = smeta->width;
dmeta->height = smeta->height;
}
}
const GstMetaInfo *
@ -308,8 +311,7 @@ gst_video_crop_meta_get_info (void)
video_crop_meta_info =
gst_meta_register (GST_VIDEO_CROP_META_API, "GstVideoCropMeta",
sizeof (GstVideoCropMeta), (GstMetaInitFunction) NULL,
(GstMetaFreeFunction) NULL, gst_video_crop_meta_copy,
(GstMetaTransformFunction) NULL);
(GstMetaFreeFunction) NULL, gst_video_crop_meta_transform);
}
return video_crop_meta_info;
}

View file

@ -59,7 +59,7 @@ gst_ximage_meta_get_info (void)
sizeof (GstXImageMeta),
(GstMetaInitFunction) NULL,
(GstMetaFreeFunction) gst_ximage_meta_free,
(GstMetaCopyFunction) NULL, (GstMetaTransformFunction) NULL);
(GstMetaTransformFunction) NULL);
}
return ximage_meta_info;
}

View file

@ -62,7 +62,7 @@ gst_xvimage_meta_get_info (void)
sizeof (GstXvImageMeta),
(GstMetaInitFunction) NULL,
(GstMetaFreeFunction) gst_xvimage_meta_free,
(GstMetaCopyFunction) NULL, (GstMetaTransformFunction) NULL);
(GstMetaTransformFunction) NULL);
}
return xvimage_meta_info;
}