mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-16 19:25:18 +00:00
bufferlist: Add boxed type for GstBufferListIterator for gobject-introspection
This commit is contained in:
parent
2d7c81f1d7
commit
379d5dfb07
3 changed files with 31 additions and 0 deletions
|
@ -756,6 +756,7 @@ init_post (GOptionContext * context, GOptionGroup * group, gpointer data,
|
|||
_gst_event_initialize ();
|
||||
_gst_buffer_initialize ();
|
||||
_gst_buffer_list_initialize ();
|
||||
gst_buffer_list_iterator_get_type ();
|
||||
_gst_message_initialize ();
|
||||
_gst_tag_initialize ();
|
||||
gst_parse_context_get_type ();
|
||||
|
|
|
@ -425,6 +425,33 @@ gst_buffer_list_get (GstBufferList * list, guint group, guint idx)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static GstBufferListIterator *
|
||||
gst_buffer_list_iterator_copy (const GstBufferListIterator * it)
|
||||
{
|
||||
GstBufferListIterator *ret;
|
||||
|
||||
ret = g_slice_new (GstBufferListIterator);
|
||||
ret->list = it->list;
|
||||
ret->next = it->next;
|
||||
ret->last_returned = it->last_returned;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
GType
|
||||
gst_buffer_list_iterator_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (G_UNLIKELY (type == 0)) {
|
||||
type = g_boxed_type_register_static ("GstBufferListIterator",
|
||||
(GBoxedCopyFunc) gst_buffer_list_iterator_copy,
|
||||
(GBoxedFreeFunc) gst_buffer_list_iterator_free);
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_buffer_list_iterate:
|
||||
* @list: a #GstBufferList
|
||||
|
|
|
@ -35,6 +35,8 @@ G_BEGIN_DECLS
|
|||
#define GST_BUFFER_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BUFFER_LIST, GstBufferListClass))
|
||||
#define GST_BUFFER_LIST_CAST(obj) ((GstBufferList *)obj)
|
||||
|
||||
#define GST_TYPE_BUFFER_LIST_ITERATOR (gst_buffer_list_iterator_get_type ())
|
||||
|
||||
typedef struct _GstBufferList GstBufferList;
|
||||
typedef struct _GstBufferListClass GstBufferListClass;
|
||||
typedef struct _GstBufferListIterator GstBufferListIterator;
|
||||
|
@ -215,6 +217,7 @@ void gst_buffer_list_foreach (GstBufferList *l
|
|||
GstBuffer * gst_buffer_list_get (GstBufferList *list, guint group, guint idx);
|
||||
|
||||
/* iterator */
|
||||
GType gst_buffer_list_iterator_get_type (void);
|
||||
GstBufferListIterator * gst_buffer_list_iterate (GstBufferList *list);
|
||||
void gst_buffer_list_iterator_free (GstBufferListIterator *it);
|
||||
|
||||
|
|
Loading…
Reference in a new issue