miniobject: port to new 0.11 API

Remove miniobject and buffer subclassesusing GObject subclasses and
metadata.
This commit is contained in:
Wim Taymans 2011-02-26 13:39:01 +01:00
parent 2eb38991c6
commit cbb7fa5701
17 changed files with 419 additions and 456 deletions

View file

@ -132,10 +132,9 @@ static DFBSurfacePixelFormat gst_dfbvideosink_get_format_from_caps (GstCaps *
static void gst_dfbvideosink_update_colorbalance (GstDfbVideoSink *
dfbvideosink);
static void gst_dfbvideosink_surface_destroy (GstDfbVideoSink * dfbvideosink,
GstDfbSurface * surface);
GstBuffer * surface);
static GstVideoSinkClass *parent_class = NULL;
static GstBufferClass *surface_parent_class = NULL;
#ifndef GST_DISABLE_GST_DEBUG
static const char *
@ -188,12 +187,52 @@ gst_dfbvideosink_get_format_name (DFBSurfacePixelFormat format)
}
#endif /* GST_DISABLE_GST_DEBUG */
static void
gst_dfbsurface_dispose (GstBuffer * surface)
{
GstDfbVideoSink *dfbvideosink = NULL;
GstMetaDfbSurface *meta;
g_return_if_fail (surface != NULL);
meta = GST_META_DFBSURFACE_GET (surface, FALSE);
dfbvideosink = meta->dfbvideosink;
if (!dfbvideosink) {
GST_WARNING_OBJECT (surface, "no sink found");
goto beach;
}
/* If our geometry changed we can't reuse that image. */
if ((meta->width != dfbvideosink->video_width) ||
(meta->height != dfbvideosink->video_height) ||
(meta->pixel_format != dfbvideosink->pixel_format)) {
GST_DEBUG_OBJECT (dfbvideosink, "destroy surface %p as its size changed "
"%dx%d vs current %dx%d", surface, meta->width, meta->height,
dfbvideosink->video_width, dfbvideosink->video_height);
gst_dfbvideosink_surface_destroy (dfbvideosink, surface);
} else {
/* In that case we can reuse the image and add it to our image pool. */
GST_DEBUG_OBJECT (dfbvideosink, "recycling surface %p in pool", surface);
/* need to increment the refcount again to recycle */
gst_buffer_ref (surface);
g_mutex_lock (dfbvideosink->pool_lock);
dfbvideosink->buffer_pool = g_slist_prepend (dfbvideosink->buffer_pool,
surface);
g_mutex_unlock (dfbvideosink->pool_lock);
}
beach:
return;
}
/* Creates miniobject and our internal surface */
static GstDfbSurface *
static GstBuffer *
gst_dfbvideosink_surface_create (GstDfbVideoSink * dfbvideosink, GstCaps * caps,
size_t size)
{
GstDfbSurface *surface = NULL;
GstBuffer *surface = NULL;
GstMetaDfbSurface *meta = NULL;
GstStructure *structure = NULL;
DFBResult ret;
DFBSurfaceDescription s_dsc;
@ -203,25 +242,28 @@ gst_dfbvideosink_surface_create (GstDfbVideoSink * dfbvideosink, GstCaps * caps,
g_return_val_if_fail (GST_IS_DFBVIDEOSINK (dfbvideosink), NULL);
surface = (GstDfbSurface *) gst_mini_object_new (GST_TYPE_DFBSURFACE);
surface = gst_buffer_new ();
GST_MINI_OBJECT_CAST (surface)->dispose =
(GstMiniObjectDisposeFunction) gst_dfbsurface_dispose;
meta = GST_META_DFBSURFACE_GET (surface, TRUE);
/* Keep a ref to our sink */
surface->dfbvideosink = gst_object_ref (dfbvideosink);
meta->dfbvideosink = gst_object_ref (dfbvideosink);
/* Surface is not locked yet */
surface->locked = FALSE;
meta->locked = FALSE;
structure = gst_caps_get_structure (caps, 0);
if (!gst_structure_get_int (structure, "width", &surface->width) ||
!gst_structure_get_int (structure, "height", &surface->height)) {
if (!gst_structure_get_int (structure, "width", &meta->width) ||
!gst_structure_get_int (structure, "height", &meta->height)) {
GST_WARNING_OBJECT (dfbvideosink, "failed getting geometry from caps %"
GST_PTR_FORMAT, caps);
goto fallback;
}
/* Pixel format from caps */
surface->pixel_format = gst_dfbvideosink_get_format_from_caps (caps);
if (surface->pixel_format == DSPF_UNKNOWN) {
meta->pixel_format = gst_dfbvideosink_get_format_from_caps (caps);
if (meta->pixel_format == DSPF_UNKNOWN) {
goto fallback;
}
@ -236,41 +278,41 @@ gst_dfbvideosink_surface_create (GstDfbVideoSink * dfbvideosink, GstCaps * caps,
s_dsc.flags =
DSDESC_PIXELFORMAT | DSDESC_WIDTH | DSDESC_HEIGHT /*| DSDESC_CAPS */ ;
s_dsc.pixelformat = surface->pixel_format;
s_dsc.width = surface->width;
s_dsc.height = surface->height;
s_dsc.pixelformat = meta->pixel_format;
s_dsc.width = meta->width;
s_dsc.height = meta->height;
/*s_dsc.caps = DSCAPS_VIDEOONLY; */
ret = dfbvideosink->dfb->CreateSurface (dfbvideosink->dfb, &s_dsc,
&surface->surface);
&meta->surface);
if (ret != DFB_OK) {
GST_WARNING_OBJECT (dfbvideosink, "failed creating a DirectFB surface");
surface->surface = NULL;
meta->surface = NULL;
goto fallback;
}
/* Clearing surface */
surface->surface->Clear (surface->surface, 0x00, 0x00, 0x00, 0xFF);
meta->surface->Clear (meta->surface, 0x00, 0x00, 0x00, 0xFF);
/* Locking the surface to acquire the memory pointer */
surface->surface->Lock (surface->surface, DSLF_WRITE, &data, &pitch);
surface->locked = TRUE;
meta->surface->Lock (meta->surface, DSLF_WRITE, &data, &pitch);
meta->locked = TRUE;
GST_BUFFER_DATA (surface) = data;
GST_BUFFER_SIZE (surface) = pitch * surface->height;
GST_BUFFER_SIZE (surface) = pitch * meta->height;
/* Be carefull here. If size is different from the surface size
(pitch * height), we can't use that surface through buffer alloc system
or we are going to run into serious stride issues */
if (GST_BUFFER_SIZE (surface) != size) {
GST_WARNING_OBJECT (dfbvideosink, "DirectFB surface size (%dx%d=%d) "
"differs from GStreamer requested size %u", pitch, surface->height,
"differs from GStreamer requested size %u", pitch, meta->height,
GST_BUFFER_SIZE (surface), (guint) size);
goto fallback;
}
GST_DEBUG_OBJECT (dfbvideosink, "creating a %dx%d surface (%p) with %s "
"pixel format, line pitch %d", surface->width, surface->height, surface,
gst_dfbvideosink_get_format_name (surface->pixel_format), pitch);
"pixel format, line pitch %d", meta->width, meta->height, surface,
gst_dfbvideosink_get_format_name (meta->pixel_format), pitch);
succeeded = TRUE;
@ -280,16 +322,17 @@ fallback:
/* We allocate a standard buffer ourselves to store it in our buffer pool,
this is an optimisation for memory allocation */
GST_BUFFER (surface)->malloc_data = g_malloc (size);
GST_BUFFER_DATA (surface) = GST_BUFFER (surface)->malloc_data;
GST_BUFFER_MALLOCDATA (surface) = g_malloc (size);
GST_BUFFER_DATA (surface) = GST_BUFFER_MALLOCDATA (surface);
GST_BUFFER_SIZE (surface) = size;
if (surface->surface) {
if (surface->locked) {
surface->surface->Unlock (surface->surface);
surface->locked = FALSE;
if (meta->surface) {
if (meta->locked) {
meta->surface->Unlock (meta->surface);
meta->locked = FALSE;
}
surface->surface->Release (surface->surface);
surface->surface = NULL;
meta->surface->Release (meta->surface);
meta->surface = NULL;
}
GST_DEBUG_OBJECT (dfbvideosink, "allocating a buffer (%p) of %u bytes",
surface, (guint) size);
@ -308,28 +351,29 @@ beach:
* destroyed so we just have to clean our internal stuff */
static void
gst_dfbvideosink_surface_destroy (GstDfbVideoSink * dfbvideosink,
GstDfbSurface * surface)
GstBuffer * surface)
{
GstMetaDfbSurface *meta;
g_return_if_fail (GST_IS_DFBVIDEOSINK (dfbvideosink));
meta = GST_META_DFBSURFACE_GET (surface, FALSE);
/* Release our internal surface */
if (surface->surface) {
if (surface->locked) {
surface->surface->Unlock (surface->surface);
surface->locked = FALSE;
if (meta->surface) {
if (meta->locked) {
meta->surface->Unlock (meta->surface);
meta->locked = FALSE;
}
surface->surface->Release (surface->surface);
surface->surface = NULL;
meta->surface->Release (meta->surface);
meta->surface = NULL;
}
if (surface->dfbvideosink) {
if (meta->dfbvideosink) {
/* Release the ref to our sink */
surface->dfbvideosink = NULL;
meta->dfbvideosink = NULL;
gst_object_unref (dfbvideosink);
}
GST_MINI_OBJECT_CLASS (surface_parent_class)->finalize (GST_MINI_OBJECT
(surface));
}
static gpointer
@ -339,8 +383,8 @@ gst_dfbvideosink_event_thread (GstDfbVideoSink * dfbvideosink)
while (dfbvideosink->running) {
/* Wait for an event with a 50 ms timeout */
dfbvideosink->event_buffer->
WaitForEventWithTimeout (dfbvideosink->event_buffer, 0, 50);
dfbvideosink->event_buffer->WaitForEventWithTimeout (dfbvideosink->
event_buffer, 0, 50);
/* Do we have an event ? */
ret = dfbvideosink->event_buffer->HasEvent (dfbvideosink->event_buffer);
@ -1504,6 +1548,7 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
GstVideoRectangle dst, src, result;
GstFlowReturn ret = GST_FLOW_OK;
gboolean mem_cpy = TRUE;
GstMetaDfbSurface *meta;
dfbvideosink = GST_DFBVIDEOSINK (bsink);
@ -1512,12 +1557,12 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
goto beach;
}
/* Is that a buffer we allocated ourselves ? */
if (GST_IS_DFBSURFACE (buf)) {
GstDfbSurface *tmp_surface = GST_DFBSURFACE (buf);
meta = GST_META_DFBSURFACE_GET (buf, FALSE);
/* Is that a buffer we allocated ourselves ? */
if (meta != NULL) {
/* Does it have a surface ? */
if (tmp_surface->surface) {
if (meta->surface) {
mem_cpy = FALSE;
GST_DEBUG_OBJECT (dfbvideosink, "we have a buffer (%p) we allocated "
"ourselves and it has a surface, no memcpy then", buf);
@ -1613,8 +1658,6 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
}
} else {
/* Else we will [Stretch]Blit to our primary */
GstDfbSurface *surface = GST_DFBSURFACE (buf);
GST_DEBUG_OBJECT (dfbvideosink, "blitting to a primary surface (vsync %d)",
dfbvideosink->vsync);
@ -1624,9 +1667,9 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
dfbvideosink->primary->GetSize (dfbvideosink->primary, &dst.w, &dst.h);
/* Unlocking surface before blit */
if (surface->locked) {
surface->surface->Unlock (surface->surface);
surface->locked = FALSE;
if (meta->locked) {
meta->surface->Unlock (meta->surface);
meta->locked = FALSE;
}
gst_video_sink_center_rect (src, dst, &result, dfbvideosink->hw_scaling);
@ -1638,14 +1681,14 @@ gst_dfbvideosink_show_frame (GstBaseSink * bsink, GstBuffer * buf)
if (dfbvideosink->hw_scaling) {
dfbvideosink->primary->StretchBlit (dfbvideosink->primary,
surface->surface, NULL, (DFBRectangle *) (void *) &result);
meta->surface, NULL, (DFBRectangle *) (void *) &result);
} else {
DFBRectangle clip;
clip.x = clip.y = 0;
clip.w = result.w;
clip.h = result.h;
dfbvideosink->primary->Blit (dfbvideosink->primary, surface->surface,
dfbvideosink->primary->Blit (dfbvideosink->primary, meta->surface,
&clip, result.x, result.y);
}
@ -1668,7 +1711,7 @@ gst_dfbvideosink_bufferpool_clear (GstDfbVideoSink * dfbvideosink)
{
g_mutex_lock (dfbvideosink->pool_lock);
while (dfbvideosink->buffer_pool) {
GstDfbSurface *surface = dfbvideosink->buffer_pool->data;
GstBuffer *surface = dfbvideosink->buffer_pool->data;
dfbvideosink->buffer_pool = g_slist_delete_link (dfbvideosink->buffer_pool,
dfbvideosink->buffer_pool);
@ -1685,7 +1728,7 @@ gst_dfbvideosink_buffer_alloc (GstBaseSink * bsink, guint64 offset, guint size,
GstCaps * caps, GstBuffer ** buf)
{
GstDfbVideoSink *dfbvideosink;
GstDfbSurface *surface = NULL;
GstBuffer *surface = NULL;
GstFlowReturn ret = GST_FLOW_OK;
gboolean rev_nego = FALSE;
@ -1787,7 +1830,9 @@ alloc:
/* Inspect our buffer pool */
g_mutex_lock (dfbvideosink->pool_lock);
while (dfbvideosink->buffer_pool) {
surface = (GstDfbSurface *) dfbvideosink->buffer_pool->data;
GstMetaDfbSurface *meta;
surface = (GstBuffer *) dfbvideosink->buffer_pool->data;
if (surface) {
/* Removing from the pool */
@ -1795,10 +1840,12 @@ alloc:
g_slist_delete_link (dfbvideosink->buffer_pool,
dfbvideosink->buffer_pool);
meta = GST_META_DFBSURFACE_GET (surface, FALSE);
/* If the surface is invalid for our need, destroy */
if ((surface->width != width) ||
(surface->height != height) ||
(surface->pixel_format != dfbvideosink->pixel_format)) {
if ((meta->width != width) ||
(meta->height != height) ||
(meta->pixel_format != dfbvideosink->pixel_format)) {
gst_dfbvideosink_surface_destroy (dfbvideosink, surface);
surface = NULL;
} else {
@ -1821,100 +1868,35 @@ alloc:
/* Now we should have a surface, set appropriate caps on it */
if (surface) {
if (rev_nego) {
gst_buffer_set_caps (GST_BUFFER (surface), desired_caps);
gst_buffer_set_caps (surface, desired_caps);
} else {
gst_buffer_set_caps (GST_BUFFER (surface), caps);
gst_buffer_set_caps (surface, caps);
}
}
*buf = GST_BUFFER (surface);
*buf = surface;
gst_caps_unref (desired_caps);
return ret;
}
/* Our subclass of GstBuffer */
static void
gst_dfbsurface_finalize (GstDfbSurface * surface)
/* our metadata */
const GstMetaInfo *
gst_meta_dfbsurface_get_info (void)
{
GstDfbVideoSink *dfbvideosink = NULL;
static const GstMetaInfo *meta_info = NULL;
g_return_if_fail (surface != NULL);
dfbvideosink = surface->dfbvideosink;
if (!dfbvideosink) {
GST_WARNING_OBJECT (surface, "no sink found");
goto beach;
if (meta_info == NULL) {
meta_info = gst_meta_register ("GstMetaDfbSurface", "GstMetaDfbSurface",
sizeof (GstMetaDfbSurface),
(GstMetaInitFunction) NULL,
(GstMetaFreeFunction) NULL,
(GstMetaCopyFunction) NULL,
(GstMetaSubFunction) NULL,
(GstMetaSerializeFunction) NULL, (GstMetaDeserializeFunction) NULL);
}
/* If our geometry changed we can't reuse that image. */
if ((surface->width != dfbvideosink->video_width) ||
(surface->height != dfbvideosink->video_height) ||
(surface->pixel_format != dfbvideosink->pixel_format)) {
GST_DEBUG_OBJECT (dfbvideosink, "destroy surface %p as its size changed "
"%dx%d vs current %dx%d", surface, surface->width, surface->height,
dfbvideosink->video_width, dfbvideosink->video_height);
gst_dfbvideosink_surface_destroy (dfbvideosink, surface);
} else {
/* In that case we can reuse the image and add it to our image pool. */
GST_DEBUG_OBJECT (dfbvideosink, "recycling surface %p in pool", surface);
/* need to increment the refcount again to recycle */
gst_buffer_ref (GST_BUFFER (surface));
g_mutex_lock (dfbvideosink->pool_lock);
dfbvideosink->buffer_pool = g_slist_prepend (dfbvideosink->buffer_pool,
surface);
g_mutex_unlock (dfbvideosink->pool_lock);
}
beach:
return;
}
static void
gst_dfbsurface_init (GstDfbSurface * surface, gpointer g_class)
{
surface->surface = NULL;
surface->width = 0;
surface->height = 0;
surface->pixel_format = DSPF_UNKNOWN;
surface->dfbvideosink = NULL;
}
static void
gst_dfbsurface_class_init (gpointer g_class, gpointer class_data)
{
GstMiniObjectClass *mini_object_class = GST_MINI_OBJECT_CLASS (g_class);
surface_parent_class = g_type_class_peek_parent (g_class);
mini_object_class->finalize = (GstMiniObjectFinalizeFunction)
gst_dfbsurface_finalize;
}
GType
gst_dfbsurface_get_type (void)
{
static GType _gst_dfbsurface_type;
if (G_UNLIKELY (_gst_dfbsurface_type == 0)) {
static const GTypeInfo dfbsurface_info = {
sizeof (GstBufferClass),
NULL,
NULL,
gst_dfbsurface_class_init,
NULL,
NULL,
sizeof (GstDfbSurface),
0,
(GInstanceInitFunc) gst_dfbsurface_init,
NULL
};
_gst_dfbsurface_type = g_type_register_static (GST_TYPE_BUFFER,
"GstDfbSurface", &dfbsurface_info, 0);
}
return _gst_dfbsurface_type;
return meta_info;
}
/* Interfaces stuff */

View file

@ -35,25 +35,24 @@ G_BEGIN_DECLS
typedef struct _GstDfbVideoSink GstDfbVideoSink;
typedef struct _GstDfbVideoSinkClass GstDfbVideoSinkClass;
#define GST_TYPE_DFBSURFACE (gst_dfbsurface_get_type())
typedef struct _GstMetaDfbSurface GstMetaDfbSurface;
#define GST_IS_DFBSURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_DFBSURFACE))
#define GST_DFBSURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_DFBSURFACE, GstDfbSurface))
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))
struct _GstMetaDfbSurface {
GstMeta meta;
typedef struct _GstDfbSurface GstDfbSurface;
struct _GstDfbSurface {
GstBuffer buffer; /* We extend GstBuffer */
IDirectFBSurface *surface;
gint width;
gint height;
gboolean locked;
DFBSurfacePixelFormat pixel_format;
GstDfbVideoSink *dfbvideosink;
};
@ -123,7 +122,6 @@ struct _GstDfbVideoSinkClass {
};
GType gst_dfbvideosink_get_type (void);
GType gst_dfbsurface_get_type (void);
G_END_DECLS

View file

@ -201,9 +201,10 @@ gst_camerabin_image_dispose (GstCameraBinImage * img)
taken by bin and therefore gst_object_sink is called for
these elements (they may still be in floating state
and not unreffed properly without sinking first)
FIXME, something else is wrong if you have to sink here
*/
if (img->app_enc) {
gst_object_sink (img->app_enc);
//gst_object_ref_sink (img->app_enc);
GST_LOG_OBJECT (img, "disposing %s with refcount %d",
GST_ELEMENT_NAME (img->app_enc),
GST_OBJECT_REFCOUNT_VALUE (img->app_enc));
@ -212,7 +213,7 @@ gst_camerabin_image_dispose (GstCameraBinImage * img)
}
if (img->post) {
gst_object_sink (img->post);
//gst_object_ref_sink (img->post);
GST_LOG_OBJECT (img, "disposing %s with refcount %d",
GST_ELEMENT_NAME (img->post), GST_OBJECT_REFCOUNT_VALUE (img->post));
gst_object_unref (img->post);

View file

@ -220,33 +220,34 @@ gst_camerabin_video_dispose (GstCameraBinVideo * vid)
taken by bin and therefore gst_object_sink is called for
these elements (they may still be in floating state
and not unreffed properly without sinking first)
FIXME, something else is wrong when you have to sink here
*/
if (vid->app_post) {
gst_object_sink (vid->app_post);
//gst_object_sink (vid->app_post);
gst_object_unref (vid->app_post);
vid->app_post = NULL;
}
if (vid->app_vid_enc) {
gst_object_sink (vid->app_vid_enc);
//gst_object_sink (vid->app_vid_enc);
gst_object_unref (vid->app_vid_enc);
vid->app_vid_enc = NULL;
}
if (vid->app_aud_enc) {
gst_object_sink (vid->app_aud_enc);
//gst_object_sink (vid->app_aud_enc);
gst_object_unref (vid->app_aud_enc);
vid->app_aud_enc = NULL;
}
if (vid->app_aud_src) {
gst_object_sink (vid->app_aud_src);
//gst_object_sink (vid->app_aud_src);
gst_object_unref (vid->app_aud_src);
vid->app_aud_src = NULL;
}
if (vid->app_mux) {
gst_object_sink (vid->app_mux);
//gst_object_sink (vid->app_mux);
gst_object_unref (vid->app_mux);
vid->app_mux = NULL;
}

View file

@ -483,7 +483,7 @@ add_id3v2frame_tag (GstId3v2Tag * id3v2tag, const GstTagList * list,
GstBuffer *buf;
val = gst_tag_list_get_value_index (list, tag, i);
buf = (GstBuffer *) gst_value_get_mini_object (val);
buf = gst_value_get_buffer (val);
if (buf && GST_BUFFER_CAPS (buf)) {
GstStructure *s;
@ -693,7 +693,7 @@ add_image_tag (GstId3v2Tag * id3v2tag, const GstTagList * list,
GST_DEBUG ("image %u/%u", n + 1, num_tags);
val = gst_tag_list_get_value_index (list, tag, n);
image = (GstBuffer *) gst_value_get_mini_object (val);
image = gst_value_get_buffer (val);
if (GST_IS_BUFFER (image) && GST_BUFFER_SIZE (image) > 0 &&
GST_BUFFER_CAPS (image) != NULL &&

View file

@ -540,7 +540,7 @@ G_DEFINE_TYPE (MXFMetadataAES3AudioEssenceDescriptor,
MXF_TYPE_METADATA_WAVE_AUDIO_ESSENCE_DESCRIPTOR);
static void
mxf_metadata_aes3_audio_essence_descriptor_finalize (GstMiniObject * object)
mxf_metadata_aes3_audio_essence_descriptor_finalize (GObject * object)
{
MXFMetadataAES3AudioEssenceDescriptor *self =
MXF_METADATA_AES3_AUDIO_ESSENCE_DESCRIPTOR (object);
@ -554,7 +554,7 @@ mxf_metadata_aes3_audio_essence_descriptor_finalize (GstMiniObject * object)
g_free (self->fixed_user_data);
self->fixed_user_data = NULL;
GST_MINI_OBJECT_CLASS
G_OBJECT_CLASS
(mxf_metadata_aes3_audio_essence_descriptor_parent_class)->finalize
(object);
}
@ -1058,11 +1058,10 @@ static void
(MXFMetadataAES3AudioEssenceDescriptorClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize =
mxf_metadata_aes3_audio_essence_descriptor_finalize;
object_class->finalize = mxf_metadata_aes3_audio_essence_descriptor_finalize;
metadata_base_class->handle_tag =
mxf_metadata_aes3_audio_essence_descriptor_handle_tag;
metadata_base_class->name_quark = MXF_QUARK (AES3_AUDIO_ESSENCE_DESCRIPTOR);
@ -1353,24 +1352,24 @@ mxf_aes_bwf_create_caps (MXFMetadataTimelineTrack * track, GstTagList ** tags,
if (!track->parent.descriptor[i])
continue;
if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->
parent.descriptor[i])
if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent.
descriptor[i])
&& (track->parent.descriptor[i]->essence_container.u[14] == 0x01
|| track->parent.descriptor[i]->essence_container.u[14] == 0x02
|| track->parent.descriptor[i]->essence_container.u[14] == 0x08)) {
s = (MXFMetadataGenericSoundEssenceDescriptor *) track->
parent.descriptor[i];
s = (MXFMetadataGenericSoundEssenceDescriptor *) track->parent.
descriptor[i];
bwf = TRUE;
break;
} else
if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->
parent.descriptor[i])
if (MXF_IS_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR (track->parent.
descriptor[i])
&& (track->parent.descriptor[i]->essence_container.u[14] == 0x03
|| track->parent.descriptor[i]->essence_container.u[14] == 0x04
|| track->parent.descriptor[i]->essence_container.u[14] == 0x09)) {
s = (MXFMetadataGenericSoundEssenceDescriptor *) track->
parent.descriptor[i];
s = (MXFMetadataGenericSoundEssenceDescriptor *) track->parent.
descriptor[i];
bwf = FALSE;
break;
}
@ -1461,7 +1460,7 @@ mxf_bwf_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
}
ret = (MXFMetadataWaveAudioEssenceDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_WAVE_AUDIO_ESSENCE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_WAVE_AUDIO_ESSENCE_DESCRIPTOR, NULL);
memcpy (&ret->parent.parent.essence_container, &bwf_essence_container_ul, 16);
if (endianness == G_LITTLE_ENDIAN)
@ -1477,7 +1476,7 @@ mxf_bwf_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (!mxf_metadata_generic_sound_essence_descriptor_from_caps (&ret->parent,
caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}

View file

@ -210,14 +210,14 @@ mxf_alaw_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
}
ret = (MXFMetadataGenericSoundEssenceDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR, NULL);
memcpy (&ret->parent.essence_container, &alaw_essence_container_ul, 16);
memcpy (&ret->sound_essence_compression, &mxf_sound_essence_compression_alaw,
16);
if (!mxf_metadata_generic_sound_essence_descriptor_from_caps (ret, caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}

File diff suppressed because it is too large Load diff

View file

@ -175,14 +175,14 @@ mxf_dv_dif_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
MXFMetadataCDCIPictureEssenceDescriptor *ret;
ret = (MXFMetadataCDCIPictureEssenceDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR, NULL);
memcpy (&ret->parent.parent.essence_container, &dv_dif_essence_container_ul,
16);
if (!mxf_metadata_generic_picture_essence_descriptor_from_caps (&ret->parent,
caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}
*handler = mxf_dv_dif_write_func;

View file

@ -239,7 +239,7 @@ mxf_jpeg2000_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
}
ret = (MXFMetadataRGBAPictureEssenceDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR, NULL);
memcpy (&ret->parent.parent.essence_container, &jpeg2000_essence_container_ul,
16);
@ -270,7 +270,7 @@ mxf_jpeg2000_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (!mxf_metadata_generic_picture_essence_descriptor_from_caps (&ret->parent,
caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}

View file

@ -31,11 +31,10 @@
GST_DEBUG_CATEGORY_EXTERN (mxf_debug);
#define GST_CAT_DEFAULT mxf_debug
G_DEFINE_ABSTRACT_TYPE (MXFMetadataBase, mxf_metadata_base,
GST_TYPE_MINI_OBJECT);
G_DEFINE_ABSTRACT_TYPE (MXFMetadataBase, mxf_metadata_base, G_TYPE_OBJECT);
static void
mxf_metadata_base_finalize (GstMiniObject * object)
mxf_metadata_base_finalize (GObject * object)
{
MXFMetadataBase *self = MXF_METADATA_BASE (object);
@ -44,7 +43,7 @@ mxf_metadata_base_finalize (GstMiniObject * object)
self->other_tags = NULL;
}
GST_MINI_OBJECT_CLASS (mxf_metadata_base_parent_class)->finalize (object);
G_OBJECT_CLASS (mxf_metadata_base_parent_class)->finalize (object);
}
static gboolean
@ -131,9 +130,9 @@ mxf_metadata_base_init (MXFMetadataBase * self)
static void
mxf_metadata_base_class_init (MXFMetadataBaseClass * klass)
{
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
miniobject_class->finalize = mxf_metadata_base_finalize;
object_class->finalize = mxf_metadata_base_finalize;
klass->handle_tag = mxf_metadata_base_handle_tag;
klass->resolve = mxf_metadata_base_resolve_default;
klass->to_structure = mxf_metadata_base_to_structure_default;
@ -490,7 +489,7 @@ mxf_metadata_new (guint16 type, MXFPrimerPack * primer, guint64 offset,
ret = (MXFMetadata *) g_type_create_instance (t);
if (!mxf_metadata_base_parse (MXF_METADATA_BASE (ret), primer, data, size)) {
GST_ERROR ("Parsing metadata failed");
gst_mini_object_unref ((GstMiniObject *) ret);
g_object_unref (ret);
return NULL;
}
@ -501,7 +500,7 @@ mxf_metadata_new (guint16 type, MXFPrimerPack * primer, guint64 offset,
G_DEFINE_TYPE (MXFMetadataPreface, mxf_metadata_preface, MXF_TYPE_METADATA);
static void
mxf_metadata_preface_finalize (GstMiniObject * object)
mxf_metadata_preface_finalize (GObject * object)
{
MXFMetadataPreface *self = MXF_METADATA_PREFACE (object);
@ -517,7 +516,7 @@ mxf_metadata_preface_finalize (GstMiniObject * object)
g_free (self->dm_schemes);
self->dm_schemes = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_preface_parent_class)->finalize (object);
G_OBJECT_CLASS (mxf_metadata_preface_parent_class)->finalize (object);
}
static gboolean
@ -947,10 +946,10 @@ static void
mxf_metadata_preface_class_init (MXFMetadataPrefaceClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_preface_finalize;
object_class->finalize = mxf_metadata_preface_finalize;
metadata_base_class->handle_tag = mxf_metadata_preface_handle_tag;
metadata_base_class->resolve = mxf_metadata_preface_resolve;
metadata_base_class->to_structure = mxf_metadata_preface_to_structure;
@ -963,7 +962,7 @@ G_DEFINE_TYPE (MXFMetadataIdentification, mxf_metadata_identification,
MXF_TYPE_METADATA);
static void
mxf_metadata_identification_finalize (GstMiniObject * object)
mxf_metadata_identification_finalize (GObject * object)
{
MXFMetadataIdentification *self = MXF_METADATA_IDENTIFICATION (object);
@ -979,8 +978,7 @@ mxf_metadata_identification_finalize (GstMiniObject * object)
g_free (self->platform);
self->platform = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_identification_parent_class)->finalize
(object);
G_OBJECT_CLASS (mxf_metadata_identification_parent_class)->finalize (object);
}
static gboolean
@ -1237,10 +1235,10 @@ static void
mxf_metadata_identification_class_init (MXFMetadataIdentificationClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_identification_finalize;
object_class->finalize = mxf_metadata_identification_finalize;
metadata_base_class->handle_tag = mxf_metadata_identification_handle_tag;
metadata_base_class->name_quark = MXF_QUARK (IDENTIFICATION);
metadata_base_class->to_structure = mxf_metadata_identification_to_structure;
@ -1252,7 +1250,7 @@ G_DEFINE_TYPE (MXFMetadataContentStorage, mxf_metadata_content_storage,
MXF_TYPE_METADATA);
static void
mxf_metadata_content_storage_finalize (GstMiniObject * object)
mxf_metadata_content_storage_finalize (GObject * object)
{
MXFMetadataContentStorage *self = MXF_METADATA_CONTENT_STORAGE (object);
@ -1265,8 +1263,7 @@ mxf_metadata_content_storage_finalize (GstMiniObject * object)
g_free (self->essence_container_data_uids);
self->essence_container_data_uids = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_content_storage_parent_class)->finalize
(object);
G_OBJECT_CLASS (mxf_metadata_content_storage_parent_class)->finalize (object);
}
static gboolean
@ -1532,10 +1529,10 @@ static void
mxf_metadata_content_storage_class_init (MXFMetadataContentStorageClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_content_storage_finalize;
object_class->finalize = mxf_metadata_content_storage_finalize;
metadata_base_class->handle_tag = mxf_metadata_content_storage_handle_tag;
metadata_base_class->resolve = mxf_metadata_content_storage_resolve;
metadata_base_class->name_quark = MXF_QUARK (CONTENT_STORAGE);
@ -1729,7 +1726,7 @@ G_DEFINE_ABSTRACT_TYPE (MXFMetadataGenericPackage, mxf_metadata_generic_package,
MXF_TYPE_METADATA);
static void
mxf_metadata_generic_package_finalize (GstMiniObject * object)
mxf_metadata_generic_package_finalize (GObject * object)
{
MXFMetadataGenericPackage *self = MXF_METADATA_GENERIC_PACKAGE (object);
@ -1741,8 +1738,7 @@ mxf_metadata_generic_package_finalize (GstMiniObject * object)
g_free (self->tracks);
self->tracks = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_generic_package_parent_class)->finalize
(object);
G_OBJECT_CLASS (mxf_metadata_generic_package_parent_class)->finalize (object);
}
static gboolean
@ -2001,9 +1997,9 @@ static void
mxf_metadata_generic_package_class_init (MXFMetadataGenericPackageClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
miniobject_class->finalize = mxf_metadata_generic_package_finalize;
object_class->finalize = mxf_metadata_generic_package_finalize;
metadata_base_class->handle_tag = mxf_metadata_generic_package_handle_tag;
metadata_base_class->resolve = mxf_metadata_generic_package_resolve;
metadata_base_class->to_structure = mxf_metadata_generic_package_to_structure;
@ -2070,8 +2066,8 @@ mxf_metadata_material_package_resolve (MXFMetadataBase * m,
MXFMetadataTimelineTrack *tmp;
if (!sc->source_package->parent.tracks[k] ||
!MXF_IS_METADATA_TIMELINE_TRACK (sc->source_package->parent.
tracks[k]))
!MXF_IS_METADATA_TIMELINE_TRACK (sc->source_package->
parent.tracks[k]))
continue;
tmp =
@ -2324,7 +2320,7 @@ G_DEFINE_ABSTRACT_TYPE (MXFMetadataTrack, mxf_metadata_track,
MXF_TYPE_METADATA);
static void
mxf_metadata_track_finalize (GstMiniObject * object)
mxf_metadata_track_finalize (GObject * object)
{
MXFMetadataTrack *self = MXF_METADATA_TRACK (object);
@ -2333,7 +2329,7 @@ mxf_metadata_track_finalize (GstMiniObject * object)
g_free (self->descriptor);
self->descriptor = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_track_parent_class)->finalize (object);
G_OBJECT_CLASS (mxf_metadata_track_parent_class)->finalize (object);
}
static gboolean
@ -2515,9 +2511,9 @@ static void
mxf_metadata_track_class_init (MXFMetadataTrackClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
miniobject_class->finalize = mxf_metadata_track_finalize;
object_class->finalize = mxf_metadata_track_finalize;
metadata_base_class->handle_tag = mxf_metadata_track_handle_tag;
metadata_base_class->resolve = mxf_metadata_track_resolve;
metadata_base_class->to_structure = mxf_metadata_track_to_structure;
@ -2805,7 +2801,7 @@ mxf_metadata_static_track_class_init (MXFMetadataStaticTrackClass * klass)
G_DEFINE_TYPE (MXFMetadataSequence, mxf_metadata_sequence, MXF_TYPE_METADATA);
static void
mxf_metadata_sequence_finalize (GstMiniObject * object)
mxf_metadata_sequence_finalize (GObject * object)
{
MXFMetadataSequence *self = MXF_METADATA_SEQUENCE (object);
@ -2814,7 +2810,7 @@ mxf_metadata_sequence_finalize (GstMiniObject * object)
g_free (self->structural_components);
self->structural_components = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_sequence_parent_class)->finalize (object);
G_OBJECT_CLASS (mxf_metadata_sequence_parent_class)->finalize (object);
}
static gboolean
@ -3022,10 +3018,10 @@ static void
mxf_metadata_sequence_class_init (MXFMetadataSequenceClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_sequence_finalize;
object_class->finalize = mxf_metadata_sequence_finalize;
metadata_base_class->handle_tag = mxf_metadata_sequence_handle_tag;
metadata_base_class->resolve = mxf_metadata_sequence_resolve;
metadata_base_class->name_quark = MXF_QUARK (SEQUENCE);
@ -3434,15 +3430,14 @@ G_DEFINE_TYPE (MXFMetadataDMSourceClip, mxf_metadata_dm_source_clip,
MXF_TYPE_METADATA_SOURCE_CLIP);
static void
mxf_metadata_dm_source_clip_finalize (GstMiniObject * object)
mxf_metadata_dm_source_clip_finalize (GObject * object)
{
MXFMetadataDMSourceClip *self = MXF_METADATA_DM_SOURCE_CLIP (object);
g_free (self->track_ids);
self->track_ids = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_dm_source_clip_parent_class)->finalize
(object);
G_OBJECT_CLASS (mxf_metadata_dm_source_clip_parent_class)->finalize (object);
}
static gboolean
@ -3577,10 +3572,10 @@ static void
mxf_metadata_dm_source_clip_class_init (MXFMetadataDMSourceClipClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_dm_source_clip_finalize;
object_class->finalize = mxf_metadata_dm_source_clip_finalize;
metadata_base_class->handle_tag = mxf_metadata_dm_source_clip_handle_tag;
metadata_base_class->name_quark = MXF_QUARK (DM_SOURCE_CLIP);
metadata_base_class->to_structure = mxf_metadata_dm_source_clip_to_structure;
@ -3592,7 +3587,7 @@ G_DEFINE_TYPE (MXFMetadataDMSegment, mxf_metadata_dm_segment,
MXF_TYPE_METADATA_STRUCTURAL_COMPONENT);
static void
mxf_metadata_dm_segment_finalize (GstMiniObject * object)
mxf_metadata_dm_segment_finalize (GObject * object)
{
MXFMetadataDMSegment *self = MXF_METADATA_DM_SEGMENT (object);
@ -3602,8 +3597,7 @@ mxf_metadata_dm_segment_finalize (GstMiniObject * object)
g_free (self->event_comment);
self->event_comment = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_dm_segment_parent_class)->finalize
(object);
G_OBJECT_CLASS (mxf_metadata_dm_segment_parent_class)->finalize (object);
}
static gboolean
@ -3830,10 +3824,10 @@ static void
mxf_metadata_dm_segment_class_init (MXFMetadataDMSegmentClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_dm_segment_finalize;
object_class->finalize = mxf_metadata_dm_segment_finalize;
metadata_base_class->handle_tag = mxf_metadata_dm_segment_handle_tag;
metadata_base_class->resolve = mxf_metadata_dm_segment_resolve;
metadata_base_class->name_quark = MXF_QUARK (DM_SEGMENT);
@ -3846,7 +3840,7 @@ G_DEFINE_ABSTRACT_TYPE (MXFMetadataGenericDescriptor,
mxf_metadata_generic_descriptor, MXF_TYPE_METADATA);
static void
mxf_metadata_generic_descriptor_finalize (GstMiniObject * object)
mxf_metadata_generic_descriptor_finalize (GObject * object)
{
MXFMetadataGenericDescriptor *self = MXF_METADATA_GENERIC_DESCRIPTOR (object);
@ -3856,7 +3850,7 @@ mxf_metadata_generic_descriptor_finalize (GstMiniObject * object)
g_free (self->locators);
self->locators = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_generic_descriptor_parent_class)->finalize
G_OBJECT_CLASS (mxf_metadata_generic_descriptor_parent_class)->finalize
(object);
}
@ -4029,9 +4023,9 @@ mxf_metadata_generic_descriptor_class_init (MXFMetadataGenericDescriptorClass *
klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
miniobject_class->finalize = mxf_metadata_generic_descriptor_finalize;
object_class->finalize = mxf_metadata_generic_descriptor_finalize;
metadata_base_class->handle_tag = mxf_metadata_generic_descriptor_handle_tag;
metadata_base_class->resolve = mxf_metadata_generic_descriptor_resolve;
metadata_base_class->to_structure =
@ -4401,8 +4395,8 @@ mxf_metadata_generic_picture_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
(mxf_metadata_generic_picture_essence_descriptor_parent_class)->handle_tag
(metadata, primer, tag, tag_data, tag_size);
(mxf_metadata_generic_picture_essence_descriptor_parent_class)->
handle_tag (metadata, primer, tag, tag_data, tag_size);
break;
}
@ -4423,8 +4417,8 @@ mxf_metadata_generic_picture_essence_descriptor_to_structure (MXFMetadataBase *
{
GstStructure *ret =
MXF_METADATA_BASE_CLASS
(mxf_metadata_generic_picture_essence_descriptor_parent_class)->to_structure
(m);
(mxf_metadata_generic_picture_essence_descriptor_parent_class)->
to_structure (m);
MXFMetadataGenericPictureEssenceDescriptor *self =
MXF_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR (m);
gchar str[48];
@ -5018,8 +5012,8 @@ mxf_metadata_generic_sound_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
(mxf_metadata_generic_sound_essence_descriptor_parent_class)->handle_tag
(metadata, primer, tag, tag_data, tag_size);
(mxf_metadata_generic_sound_essence_descriptor_parent_class)->
handle_tag (metadata, primer, tag, tag_data, tag_size);
break;
}
@ -5339,8 +5333,8 @@ mxf_metadata_cdci_picture_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
(mxf_metadata_cdci_picture_essence_descriptor_parent_class)->handle_tag
(metadata, primer, tag, tag_data, tag_size);
(mxf_metadata_cdci_picture_essence_descriptor_parent_class)->
handle_tag (metadata, primer, tag, tag_data, tag_size);
break;
}
@ -5561,7 +5555,7 @@ G_DEFINE_TYPE (MXFMetadataRGBAPictureEssenceDescriptor,
MXF_TYPE_METADATA_GENERIC_PICTURE_ESSENCE_DESCRIPTOR);
static void
mxf_metadata_rgba_picture_essence_descriptor_finalize (GstMiniObject * object)
mxf_metadata_rgba_picture_essence_descriptor_finalize (GObject * object)
{
MXFMetadataRGBAPictureEssenceDescriptor *self =
MXF_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR (object);
@ -5569,7 +5563,7 @@ mxf_metadata_rgba_picture_essence_descriptor_finalize (GstMiniObject * object)
g_free (self->pixel_layout);
self->pixel_layout = NULL;
GST_MINI_OBJECT_CLASS
G_OBJECT_CLASS
(mxf_metadata_rgba_picture_essence_descriptor_parent_class)->finalize
(object);
}
@ -5649,8 +5643,8 @@ mxf_metadata_rgba_picture_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
(mxf_metadata_rgba_picture_essence_descriptor_parent_class)->handle_tag
(metadata, primer, tag, tag_data, tag_size);
(mxf_metadata_rgba_picture_essence_descriptor_parent_class)->
handle_tag (metadata, primer, tag, tag_data, tag_size);
break;
}
@ -5804,10 +5798,10 @@ static void
(MXFMetadataRGBAPictureEssenceDescriptorClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize =
object_class->finalize =
mxf_metadata_rgba_picture_essence_descriptor_finalize;
metadata_base_class->handle_tag =
mxf_metadata_rgba_picture_essence_descriptor_handle_tag;
@ -5846,8 +5840,8 @@ mxf_metadata_generic_data_essence_descriptor_handle_tag (MXFMetadataBase *
default:
ret =
MXF_METADATA_BASE_CLASS
(mxf_metadata_generic_data_essence_descriptor_parent_class)->handle_tag
(metadata, primer, tag, tag_data, tag_size);
(mxf_metadata_generic_data_essence_descriptor_parent_class)->
handle_tag (metadata, primer, tag, tag_data, tag_size);
break;
}
@ -5936,7 +5930,7 @@ G_DEFINE_TYPE (MXFMetadataMultipleDescriptor, mxf_metadata_multiple_descriptor,
MXF_TYPE_METADATA_FILE_DESCRIPTOR);
static void
mxf_metadata_multiple_descriptor_finalize (GstMiniObject * object)
mxf_metadata_multiple_descriptor_finalize (GObject * object)
{
MXFMetadataMultipleDescriptor *self =
MXF_METADATA_MULTIPLE_DESCRIPTOR (object);
@ -5946,7 +5940,7 @@ mxf_metadata_multiple_descriptor_finalize (GstMiniObject * object)
g_free (self->sub_descriptors);
self->sub_descriptors = NULL;
GST_MINI_OBJECT_CLASS
G_OBJECT_CLASS
(mxf_metadata_multiple_descriptor_parent_class)->finalize (object);
}
@ -6119,10 +6113,10 @@ mxf_metadata_multiple_descriptor_class_init (MXFMetadataMultipleDescriptorClass
* klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_multiple_descriptor_finalize;
object_class->finalize = mxf_metadata_multiple_descriptor_finalize;
metadata_base_class->handle_tag = mxf_metadata_multiple_descriptor_handle_tag;
metadata_base_class->resolve = mxf_metadata_multiple_descriptor_resolve;
metadata_base_class->name_quark = MXF_QUARK (MULTIPLE_DESCRIPTOR);
@ -6149,15 +6143,14 @@ G_DEFINE_TYPE (MXFMetadataTextLocator, mxf_metadata_text_locator,
MXF_TYPE_METADATA_LOCATOR);
static void
mxf_metadata_text_locator_finalize (GstMiniObject * object)
mxf_metadata_text_locator_finalize (GObject * object)
{
MXFMetadataTextLocator *self = MXF_METADATA_TEXT_LOCATOR (object);
g_free (self->locator_name);
self->locator_name = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_text_locator_parent_class)->finalize
(object);
G_OBJECT_CLASS (mxf_metadata_text_locator_parent_class)->finalize (object);
}
static gboolean
@ -6229,10 +6222,10 @@ static void
mxf_metadata_text_locator_class_init (MXFMetadataTextLocatorClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_text_locator_finalize;
object_class->finalize = mxf_metadata_text_locator_finalize;
metadata_base_class->handle_tag = mxf_metadata_text_locator_handle_tag;
metadata_base_class->name_quark = MXF_QUARK (TEXT_LOCATOR);
metadata_base_class->to_structure = mxf_metadata_text_locator_to_structure;
@ -6244,15 +6237,14 @@ G_DEFINE_TYPE (MXFMetadataNetworkLocator, mxf_metadata_network_locator,
MXF_TYPE_METADATA_LOCATOR);
static void
mxf_metadata_network_locator_finalize (GstMiniObject * object)
mxf_metadata_network_locator_finalize (GObject * object)
{
MXFMetadataNetworkLocator *self = MXF_METADATA_NETWORK_LOCATOR (object);
g_free (self->url_string);
self->url_string = NULL;
GST_MINI_OBJECT_CLASS (mxf_metadata_network_locator_parent_class)->finalize
(object);
G_OBJECT_CLASS (mxf_metadata_network_locator_parent_class)->finalize (object);
}
static gboolean
@ -6323,10 +6315,10 @@ static void
mxf_metadata_network_locator_class_init (MXFMetadataNetworkLocatorClass * klass)
{
MXFMetadataBaseClass *metadata_base_class = (MXFMetadataBaseClass *) klass;
GstMiniObjectClass *miniobject_class = (GstMiniObjectClass *) klass;
GObjectClass *object_class = (GObjectClass *) klass;
MXFMetadataClass *metadata_class = (MXFMetadataClass *) klass;
miniobject_class->finalize = mxf_metadata_network_locator_finalize;
object_class->finalize = mxf_metadata_network_locator_finalize;
metadata_base_class->handle_tag = mxf_metadata_network_locator_handle_tag;
metadata_base_class->name_quark = MXF_QUARK (NETWORK_LOCATOR);
metadata_base_class->to_structure = mxf_metadata_network_locator_to_structure;
@ -6425,7 +6417,7 @@ mxf_descriptive_metadata_new (guint8 scheme, guint32 type,
ret = (MXFDescriptiveMetadata *) g_type_create_instance (t);
if (!mxf_metadata_base_parse (MXF_METADATA_BASE (ret), primer, data, size)) {
GST_ERROR ("Parsing metadata failed");
gst_mini_object_unref ((GstMiniObject *) ret);
g_object_unref (ret);
return NULL;
}
@ -6467,5 +6459,5 @@ mxf_metadata_hash_table_new (void)
{
return g_hash_table_new_full ((GHashFunc) mxf_uuid_hash,
(GEqualFunc) mxf_uuid_is_equal, (GDestroyNotify) NULL,
(GDestroyNotify) gst_mini_object_unref);
(GDestroyNotify) g_object_unref);
}

View file

@ -368,7 +368,7 @@ typedef enum {
} MXFMetadataBaseResolveState;
struct _MXFMetadataBase {
GstMiniObject parent;
GObject parent;
MXFUUID instance_uid;
MXFUUID generation_uid;
@ -381,7 +381,7 @@ struct _MXFMetadataBase {
};
struct _MXFMetadataBaseClass {
GstMiniObjectClass parent;
GObjectClass parent;
gboolean (*handle_tag) (MXFMetadataBase *self, MXFPrimerPack *primer, guint16 tag, const guint8 *tag_data, guint tag_size);
gboolean (*resolve) (MXFMetadataBase *self, GHashTable *metadata);

View file

@ -894,7 +894,7 @@ mxf_mpeg_audio_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
*mapping_data = md;
ret = (MXFMetadataGenericSoundEssenceDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_GENERIC_SOUND_ESSENCE_DESCRIPTOR, NULL);
s = gst_caps_get_structure (caps, 0);
if (strcmp (gst_structure_get_name (s), "audio/mpeg") == 0) {
@ -902,7 +902,7 @@ mxf_mpeg_audio_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (!gst_structure_get_int (s, "mpegversion", &mpegversion)) {
GST_ERROR ("Invalid caps %" GST_PTR_FORMAT, caps);
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}
@ -946,7 +946,7 @@ mxf_mpeg_audio_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (!gst_structure_get_int (s, "rate", &rate)) {
GST_ERROR ("Invalid rate");
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}
md->rate = rate;
@ -954,7 +954,7 @@ mxf_mpeg_audio_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
memcpy (&ret->parent.essence_container, &mpeg_essence_container_ul, 16);
if (!mxf_metadata_generic_sound_essence_descriptor_from_caps (ret, caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}
@ -1154,7 +1154,7 @@ mxf_mpeg_video_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
GstStructure *s;
ret = (MXFMetadataMPEGVideoDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_MPEG_VIDEO_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_MPEG_VIDEO_DESCRIPTOR, NULL);
s = gst_caps_get_structure (caps, 0);
@ -1167,7 +1167,7 @@ mxf_mpeg_video_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (!gst_structure_get_int (s, "mpegversion", &mpegversion)) {
GST_ERROR ("Invalid caps %" GST_PTR_FORMAT, caps);
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}
@ -1214,7 +1214,7 @@ mxf_mpeg_video_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (!mxf_metadata_generic_picture_essence_descriptor_from_caps (&ret->
parent.parent, caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}

View file

@ -474,7 +474,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
/* Preface */
mux->preface =
(MXFMetadataPreface *) gst_mini_object_new (MXF_TYPE_METADATA_PREFACE);
(MXFMetadataPreface *) g_object_new (MXF_TYPE_METADATA_PREFACE, NULL);
mxf_uuid_init (&MXF_METADATA_BASE (mux->preface)->instance_uid,
mux->metadata);
g_hash_table_insert (mux->metadata,
@ -530,7 +530,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
mux->preface->identifications = g_new0 (MXFMetadataIdentification *, 1);
identification = mux->preface->identifications[0] =
(MXFMetadataIdentification *)
gst_mini_object_new (MXF_TYPE_METADATA_IDENTIFICATION);
g_object_new (MXF_TYPE_METADATA_IDENTIFICATION, NULL);
mxf_uuid_init (&MXF_METADATA_BASE (identification)->instance_uid,
mux->metadata);
@ -589,7 +589,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
guint i;
cstorage = mux->preface->content_storage = (MXFMetadataContentStorage *)
gst_mini_object_new (MXF_TYPE_METADATA_CONTENT_STORAGE);
g_object_new (MXF_TYPE_METADATA_CONTENT_STORAGE, NULL);
mxf_uuid_init (&MXF_METADATA_BASE (cstorage)->instance_uid, mux->metadata);
g_hash_table_insert (mux->metadata,
&MXF_METADATA_BASE (cstorage)->instance_uid, cstorage);
@ -603,7 +603,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
MXFMetadataSourcePackage *p;
cstorage->packages[1] = (MXFMetadataGenericPackage *)
gst_mini_object_new (MXF_TYPE_METADATA_SOURCE_PACKAGE);
g_object_new (MXF_TYPE_METADATA_SOURCE_PACKAGE, NULL);
mxf_uuid_init (&MXF_METADATA_BASE (cstorage->packages[1])->instance_uid,
mux->metadata);
g_hash_table_insert (mux->metadata,
@ -627,7 +627,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
MXFMetadataMultipleDescriptor *d;
p->descriptor = (MXFMetadataGenericDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_MULTIPLE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_MULTIPLE_DESCRIPTOR, NULL);
d = (MXFMetadataMultipleDescriptor *) p->descriptor;
d->n_sub_descriptors = p->parent.n_tracks;
d->sub_descriptors =
@ -651,7 +651,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
MXFMetadataSourceClip *clip;
p->parent.tracks[n] = (MXFMetadataTrack *)
gst_mini_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK);
g_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK, NULL);
track = (MXFMetadataTimelineTrack *) p->parent.tracks[n];
mxf_uuid_init (&MXF_METADATA_BASE (track)->instance_uid,
mux->metadata);
@ -669,7 +669,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
cpad->collect.buffer, p, track, &track->edit_rate);
sequence = track->parent.sequence = (MXFMetadataSequence *)
gst_mini_object_new (MXF_TYPE_METADATA_SEQUENCE);
g_object_new (MXF_TYPE_METADATA_SEQUENCE, NULL);
mxf_uuid_init (&MXF_METADATA_BASE (sequence)->instance_uid,
mux->metadata);
g_hash_table_insert (mux->metadata,
@ -684,7 +684,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
g_new0 (MXFMetadataStructuralComponent *, 1);
clip = (MXFMetadataSourceClip *)
gst_mini_object_new (MXF_TYPE_METADATA_SOURCE_CLIP);
g_object_new (MXF_TYPE_METADATA_SOURCE_CLIP, NULL);
sequence->structural_components[0] =
(MXFMetadataStructuralComponent *) clip;
mxf_uuid_init (&MXF_METADATA_BASE (clip)->instance_uid,
@ -720,7 +720,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
gdouble min_edit_rate_d = G_MAXDOUBLE;
cstorage->packages[0] = (MXFMetadataGenericPackage *)
gst_mini_object_new (MXF_TYPE_METADATA_MATERIAL_PACKAGE);
g_object_new (MXF_TYPE_METADATA_MATERIAL_PACKAGE, NULL);
memcpy (&MXF_METADATA_BASE (cstorage->packages[0])->instance_uid,
&mux->preface->primary_package_uid, 16);
g_hash_table_insert (mux->metadata,
@ -759,7 +759,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
1]);
p->tracks[n] = (MXFMetadataTrack *)
gst_mini_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK);
g_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK, NULL);
track = (MXFMetadataTimelineTrack *) p->tracks[n];
mxf_uuid_init (&MXF_METADATA_BASE (track)->instance_uid,
mux->metadata);
@ -794,7 +794,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
}
sequence = track->parent.sequence = (MXFMetadataSequence *)
gst_mini_object_new (MXF_TYPE_METADATA_SEQUENCE);
g_object_new (MXF_TYPE_METADATA_SEQUENCE, NULL);
mxf_uuid_init (&MXF_METADATA_BASE (sequence)->instance_uid,
mux->metadata);
g_hash_table_insert (mux->metadata,
@ -808,7 +808,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
g_new0 (MXFMetadataStructuralComponent *, 1);
clip = (MXFMetadataSourceClip *)
gst_mini_object_new (MXF_TYPE_METADATA_SOURCE_CLIP);
g_object_new (MXF_TYPE_METADATA_SOURCE_CLIP, NULL);
sequence->structural_components[0] =
(MXFMetadataStructuralComponent *) clip;
mxf_uuid_init (&MXF_METADATA_BASE (clip)->instance_uid,
@ -836,7 +836,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
MXFMetadataTimecodeComponent *component;
p->tracks[n] = (MXFMetadataTrack *)
gst_mini_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK);
g_object_new (MXF_TYPE_METADATA_TIMELINE_TRACK, NULL);
track = (MXFMetadataTimelineTrack *) p->tracks[n];
mxf_uuid_init (&MXF_METADATA_BASE (track)->instance_uid,
mux->metadata);
@ -851,7 +851,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
memcpy (&track->edit_rate, &min_edit_rate, sizeof (MXFFraction));
sequence = track->parent.sequence = (MXFMetadataSequence *)
gst_mini_object_new (MXF_TYPE_METADATA_SEQUENCE);
g_object_new (MXF_TYPE_METADATA_SEQUENCE, NULL);
mxf_uuid_init (&MXF_METADATA_BASE (sequence)->instance_uid,
mux->metadata);
g_hash_table_insert (mux->metadata,
@ -867,7 +867,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
g_new0 (MXFMetadataStructuralComponent *, 1);
component = (MXFMetadataTimecodeComponent *)
gst_mini_object_new (MXF_TYPE_METADATA_TIMECODE_COMPONENT);
g_object_new (MXF_TYPE_METADATA_TIMECODE_COMPONENT, NULL);
sequence->structural_components[0] =
(MXFMetadataStructuralComponent *) component;
mxf_uuid_init (&MXF_METADATA_BASE (component)->instance_uid,
@ -925,7 +925,7 @@ gst_mxf_mux_create_metadata (GstMXFMux * mux)
cstorage->essence_container_data =
g_new0 (MXFMetadataEssenceContainerData *, 1);
cstorage->essence_container_data[0] = (MXFMetadataEssenceContainerData *)
gst_mini_object_new (MXF_TYPE_METADATA_ESSENCE_CONTAINER_DATA);
g_object_new (MXF_TYPE_METADATA_ESSENCE_CONTAINER_DATA, NULL);
mxf_uuid_init (&MXF_METADATA_BASE (cstorage->essence_container_data[0])->
instance_uid, mux->metadata);
g_hash_table_insert (mux->metadata,

View file

@ -404,7 +404,7 @@ mxf_up_get_rgba_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
*mapping_data = md;
ret = (MXFMetadataRGBAPictureEssenceDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_RGBA_PICTURE_ESSENCE_DESCRIPTOR, NULL);
for (i = 0; i < G_N_ELEMENTS (_rgba_mapping_table); i++) {
tmp = gst_caps_from_string (_rgba_mapping_table[i].caps);
@ -426,7 +426,7 @@ mxf_up_get_rgba_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (md->fourcc == 0) {
GST_ERROR ("Invalid caps %" GST_PTR_FORMAT, caps);
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}
@ -435,7 +435,7 @@ mxf_up_get_rgba_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (!mxf_metadata_generic_picture_essence_descriptor_from_caps (&ret->parent,
caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}
@ -459,7 +459,7 @@ mxf_up_get_cdci_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
*mapping_data = md;
ret = (MXFMetadataCDCIPictureEssenceDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR, NULL);
for (i = 0; i < G_N_ELEMENTS (_cdci_mapping_table); i++) {
tmp = gst_caps_from_string (_cdci_mapping_table[i].caps);
@ -481,7 +481,7 @@ mxf_up_get_cdci_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (md->fourcc == 0) {
GST_ERROR ("Invalid caps %" GST_PTR_FORMAT, caps);
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}
@ -489,7 +489,7 @@ mxf_up_get_cdci_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
if (!mxf_metadata_generic_picture_essence_descriptor_from_caps (&ret->parent,
caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}

View file

@ -185,13 +185,13 @@ mxf_vc3_get_descriptor (GstPadTemplate * tmpl, GstCaps * caps,
}
ret = (MXFMetadataCDCIPictureEssenceDescriptor *)
gst_mini_object_new (MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR);
g_object_new (MXF_TYPE_METADATA_CDCI_PICTURE_ESSENCE_DESCRIPTOR, NULL);
memcpy (&ret->parent.parent.essence_container, &vc3_essence_container_ul, 16);
if (!mxf_metadata_generic_picture_essence_descriptor_from_caps (&ret->parent,
caps)) {
gst_mini_object_unref (GST_MINI_OBJECT_CAST (ret));
g_object_unref (ret);
return NULL;
}

View file

@ -1081,7 +1081,7 @@ gst_qt_mux_add_metadata_tags (GstQTMux * qtmux, const GstTagList * list)
GstCaps *caps = NULL;
val = gst_tag_list_get_value_index (list, GST_QT_DEMUX_PRIVATE_TAG, i);
buf = (GstBuffer *) gst_value_get_mini_object (val);
buf = gst_value_get_buffer (val);
if (buf && (caps = gst_buffer_get_caps (buf))) {
GstStructure *s;