mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
iterator: register as a boxed type
https://bugzilla.gnome.org/show_bug.cgi?id=638987
This commit is contained in:
parent
b5a4aad134
commit
62c7339847
2 changed files with 21 additions and 0 deletions
|
@ -71,6 +71,23 @@
|
|||
#include "gst_private.h"
|
||||
#include <gst/gstiterator.h>
|
||||
|
||||
static GstIterator *
|
||||
gst_iterator_copy (GstIterator * it)
|
||||
{
|
||||
return g_slice_copy (it->size, it);
|
||||
}
|
||||
|
||||
GType
|
||||
gst_iterator_get_type (void)
|
||||
{
|
||||
static GType type = 0;
|
||||
|
||||
if (G_UNLIKELY (type == 0))
|
||||
type = g_boxed_type_register_static ("GstIterator",
|
||||
(GBoxedCopyFunc) gst_iterator_copy, (GBoxedFreeFunc) gst_iterator_free);
|
||||
return type;
|
||||
}
|
||||
|
||||
static void
|
||||
gst_iterator_init (GstIterator * it,
|
||||
guint size,
|
||||
|
|
|
@ -27,6 +27,8 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_TYPE_ITERATOR (gst_iterator_get_type ())
|
||||
|
||||
/**
|
||||
* GstIteratorResult:
|
||||
* @GST_ITERATOR_DONE: No more items in the iterator
|
||||
|
@ -222,6 +224,8 @@ struct _GstIterator {
|
|||
gpointer _gst_reserved[GST_PADDING-1];
|
||||
};
|
||||
|
||||
GType gst_iterator_get_type (void);
|
||||
|
||||
/* creating iterators */
|
||||
GstIterator* gst_iterator_new (guint size,
|
||||
GType type,
|
||||
|
|
Loading…
Reference in a new issue