meta: fix for new metadata api

This commit is contained in:
Wim Taymans 2011-02-27 19:39:40 +01:00
parent 2694086ace
commit a5c1e5fd86
5 changed files with 11 additions and 9 deletions

View file

@ -195,7 +195,7 @@ gst_dfbsurface_dispose (GstBuffer * surface)
g_return_if_fail (surface != NULL);
meta = GST_META_DFBSURFACE_GET (surface, FALSE);
meta = GST_META_DFBSURFACE_GET (surface);
dfbvideosink = meta->dfbvideosink;
if (!dfbvideosink) {
@ -245,7 +245,7 @@ gst_dfbvideosink_surface_create (GstDfbVideoSink * dfbvideosink, GstCaps * caps,
surface = gst_buffer_new ();
GST_MINI_OBJECT_CAST (surface)->dispose =
(GstMiniObjectDisposeFunction) gst_dfbsurface_dispose;
meta = GST_META_DFBSURFACE_GET (surface, TRUE);
meta = GST_META_DFBSURFACE_ADD (surface);
/* Keep a ref to our sink */
meta->dfbvideosink = gst_object_ref (dfbvideosink);
@ -357,7 +357,7 @@ gst_dfbvideosink_surface_destroy (GstDfbVideoSink * dfbvideosink,
g_return_if_fail (GST_IS_DFBVIDEOSINK (dfbvideosink));
meta = GST_META_DFBSURFACE_GET (surface, FALSE);
meta = GST_META_DFBSURFACE_GET (surface);
/* Release our internal surface */
if (meta->surface) {
@ -1557,7 +1557,7 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
goto beach;
}
meta = GST_META_DFBSURFACE_GET (buf, FALSE);
meta = GST_META_DFBSURFACE_GET (buf);
/* Is that a buffer we allocated ourselves ? */
if (meta != NULL) {
@ -1840,7 +1840,7 @@ alloc:
g_slist_delete_link (dfbvideosink->buffer_pool,
dfbvideosink->buffer_pool);
meta = GST_META_DFBSURFACE_GET (surface, FALSE);
meta = GST_META_DFBSURFACE_GET (surface);
/* If the surface is invalid for our need, destroy */
if ((meta->width != width) ||

View file

@ -39,7 +39,8 @@ typedef struct _GstMetaDfbSurface GstMetaDfbSurface;
const GstMetaInfo * gst_meta_dfbsurface_get_info (void);
#define GST_META_DFBSURFACE_GET(buf,create) ((GstMetaDfbSurface *)gst_buffer_get_meta(buf,gst_meta_dfbsurface_get_info(),create))
#define GST_META_DFBSURFACE_GET(buf) ((GstMetaDfbSurface *)gst_buffer_get_meta(buf,gst_meta_dfbsurface_get_info()))
#define GST_META_DFBSURFACE_ADD(buf) ((GstMetaDfbSurface *)gst_buffer_add_meta(buf,gst_meta_dfbsurface_get_info(),NULL))
struct _GstMetaDfbSurface {
GstMeta meta;

View file

@ -125,7 +125,7 @@ rsn_parsetter_chain (GstPad * pad, GstBuffer * buf)
RsnParSetter *parset = RSN_PARSETTER (GST_OBJECT_PARENT (pad));
RsnMetaWrapped *meta;
meta = RSN_META_WRAPPED_GET (buf, FALSE);
meta = RSN_META_WRAPPED_GET (buf);
/* If this is a buffer we wrapped up earlier, unwrap it now */
if (meta != NULL) {

View file

@ -35,7 +35,7 @@ rsn_wrapped_buffer_new (GstBuffer * buf_to_wrap, GstElement * owner)
g_return_val_if_fail (buf_to_wrap, NULL);
buf = gst_buffer_new ();
meta = RSN_META_WRAPPED_GET (buf, TRUE);
meta = RSN_META_WRAPPED_ADD (buf);
meta->wrapped_buffer = buf_to_wrap;
meta->owner = gst_object_ref (owner);

View file

@ -41,7 +41,8 @@ void rsn_meta_wrapped_set_owner (RsnMetaWrapped *meta, GstElement *owner);
const GstMetaInfo * rsn_meta_wrapped_get_info (void);
#define RSN_META_WRAPPED_GET(buf,create) ((RsnMetaWrapped *)gst_buffer_get_meta(buf,rsn_meta_wrapped_get_info(),create))
#define RSN_META_WRAPPED_GET(buf) ((RsnMetaWrapped *)gst_buffer_get_meta(buf,rsn_meta_wrapped_get_info()))
#define RSN_META_WRAPPED_ADD(buf) ((RsnMetaWrapped *)gst_buffer_add_meta(buf,rsn_meta_wrapped_get_info(),NULL))
G_END_DECLS