mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
meta: update for new API
This commit is contained in:
parent
92f9995d98
commit
f246c0e97d
4 changed files with 16 additions and 27 deletions
|
@ -35,28 +35,21 @@
|
||||||
#include "gstnetbuffer.h"
|
#include "gstnetbuffer.h"
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_net_address_copy (GstBuffer * copy, GstMetaNetAddress * meta,
|
meta_net_address_transform (GstBuffer * transbuf, GstMetaNetAddress * meta,
|
||||||
GstBuffer * buffer)
|
GstBuffer * buffer, GstMetaTransformData * data)
|
||||||
{
|
{
|
||||||
GstMetaNetAddress *naddr;
|
GstMetaNetAddress *naddr;
|
||||||
|
|
||||||
GST_DEBUG ("copy called from buffer %p to %p, meta %p", buffer, copy, meta);
|
switch (data->type) {
|
||||||
|
case GST_META_TRANSFORM_TRIM:
|
||||||
naddr = gst_buffer_add_meta_net_address (copy);
|
case GST_META_TRANSFORM_MAKE_WRITABLE:
|
||||||
memcpy (&naddr->naddr, &meta->naddr, sizeof (meta->naddr));
|
case GST_META_TRANSFORM_COPY:
|
||||||
}
|
default:
|
||||||
|
/* always copy */
|
||||||
static void
|
naddr = gst_buffer_add_meta_net_address (transbuf);
|
||||||
meta_net_address_sub (GstBuffer * sub, GstMetaNetAddress * meta,
|
memcpy (&naddr->naddr, &meta->naddr, sizeof (meta->naddr));
|
||||||
GstBuffer * buffer, guint offset, guint size)
|
break;
|
||||||
{
|
}
|
||||||
GstMetaNetAddress *naddr;
|
|
||||||
|
|
||||||
GST_DEBUG ("sub called from buffer %p to %p, meta %p, %u-%u", buffer, sub,
|
|
||||||
meta, offset, size);
|
|
||||||
|
|
||||||
naddr = gst_buffer_add_meta_net_address (sub);
|
|
||||||
memcpy (&naddr->naddr, &meta->naddr, sizeof (meta->naddr));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const GstMetaInfo *
|
const GstMetaInfo *
|
||||||
|
@ -69,8 +62,7 @@ gst_meta_net_address_get_info (void)
|
||||||
sizeof (GstMetaNetAddress),
|
sizeof (GstMetaNetAddress),
|
||||||
(GstMetaInitFunction) NULL,
|
(GstMetaInitFunction) NULL,
|
||||||
(GstMetaFreeFunction) NULL,
|
(GstMetaFreeFunction) NULL,
|
||||||
(GstMetaCopyFunction) meta_net_address_copy,
|
(GstMetaTransformFunction) meta_net_address_transform,
|
||||||
(GstMetaSubFunction) meta_net_address_sub,
|
|
||||||
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
|
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
|
||||||
}
|
}
|
||||||
return meta_info;
|
return meta_info;
|
||||||
|
|
|
@ -657,8 +657,7 @@ gst_meta_v4lsrc_get_info (void)
|
||||||
sizeof (GstMetaV4lSrc),
|
sizeof (GstMetaV4lSrc),
|
||||||
(GstMetaInitFunction) NULL,
|
(GstMetaInitFunction) NULL,
|
||||||
(GstMetaFreeFunction) meta_v4lsrc_free,
|
(GstMetaFreeFunction) meta_v4lsrc_free,
|
||||||
(GstMetaCopyFunction) NULL,
|
(GstMetaTransformFunction) NULL,
|
||||||
(GstMetaSubFunction) NULL,
|
|
||||||
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
|
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
|
||||||
}
|
}
|
||||||
return meta_v4lsrc_info;
|
return meta_v4lsrc_info;
|
||||||
|
|
|
@ -43,8 +43,7 @@ gst_meta_ximage_get_info (void)
|
||||||
sizeof (GstMetaXImage),
|
sizeof (GstMetaXImage),
|
||||||
(GstMetaInitFunction) NULL,
|
(GstMetaInitFunction) NULL,
|
||||||
(GstMetaFreeFunction) gst_meta_ximage_free,
|
(GstMetaFreeFunction) gst_meta_ximage_free,
|
||||||
(GstMetaCopyFunction) NULL,
|
(GstMetaTransformFunction) NULL,
|
||||||
(GstMetaSubFunction) NULL,
|
|
||||||
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
|
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
|
||||||
}
|
}
|
||||||
return meta_ximage_info;
|
return meta_ximage_info;
|
||||||
|
|
|
@ -208,8 +208,7 @@ gst_meta_xvimage_get_info (void)
|
||||||
sizeof (GstMetaXvImage),
|
sizeof (GstMetaXvImage),
|
||||||
(GstMetaInitFunction) NULL,
|
(GstMetaInitFunction) NULL,
|
||||||
(GstMetaFreeFunction) NULL,
|
(GstMetaFreeFunction) NULL,
|
||||||
(GstMetaCopyFunction) NULL,
|
(GstMetaTransformFunction) NULL,
|
||||||
(GstMetaSubFunction) NULL,
|
|
||||||
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
|
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
|
||||||
}
|
}
|
||||||
return meta_xvimage_info;
|
return meta_xvimage_info;
|
||||||
|
|
Loading…
Reference in a new issue