mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
meta: fix for new metadata api
This commit is contained in:
parent
2694086ace
commit
a5c1e5fd86
5 changed files with 11 additions and 9 deletions
|
@ -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) ||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue