/**
* SECTION:gstindex
+ * @title: GstIndexEntry
* @short_description: Generate indexes on objects
* @see_also: #GstIndexFactory
*
* The application that wants to index the stream will create a new index object
* using gst_index_new() or gst_index_factory_make(). The index is assigned to a
* specific element, a bin or the whole pipeline. This will cause indexable
- * elements to add entires to the index while playing.
+ * elements to add entries to the index while playing.
*/
/* FIXME: complete gobject annotations */
#endif
#include <gst/gst.h>
+#include "gst/glib-compat-private.h"
/* Index signals and args */
enum
gst_index_signals[ENTRY_ADDED] =
g_signal_new ("entry-added", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GstIndexClass, entry_added), NULL, NULL,
- g_cclosure_marshal_generic, G_TYPE_NONE, 1, GST_TYPE_INDEX_ENTRY);
+ NULL, G_TYPE_NONE, 1, GST_TYPE_INDEX_ENTRY);
gobject_class->set_property = gst_index_set_property;
gobject_class->get_property = gst_index_get_property;
{
GstIndex *index;
- index = g_object_newv (gst_index_get_type (), 0, NULL);
+ index = g_object_new (gst_index_get_type (), NULL);
return index;
}
/**
* gst_index_commit:
* @index: the index to commit
- * @id: the writer that commited the index
+ * @id: the writer that committed the index
*
* Tell the index that the writer with the given id is done
* with this index and is not going to write any more entries
* to a string. That string will be used to register or look up an id
* in the index.
*
- * <note>
- * The caller must not hold @writer's GST_OBJECT_LOCK(), as the default
- * resolver may call functions that take the object lock as well, and
- * the lock is not recursive.
- * </note>
+ * > The caller must not hold @writer's GST_OBJECT_LOCK(), as the default
+ * > resolver may call functions that take the object lock as well, and
+ * > the lock is not recursive.
*
* Returns: %TRUE if the writer would be mapped to an id.
*/
* gst_index_add_associationv:
* @index: the index to add the entry to
* @id: the id of the index writer
- * @flags: optinal flags for this entry
+ * @flags: optional flags for this entry
* @n: number of associations
- * @list: list of associations
+ * @list: (array length=n): list of associations
*
* Associate given format/value pairs with each other.
*
entry->type = GST_INDEX_ENTRY_ASSOCIATION;
entry->id = id;
entry->data.assoc.flags = flags;
- entry->data.assoc.assocs = g_memdup (list, sizeof (GstIndexAssociation) * n);
+ entry->data.assoc.assocs = g_memdup2 (list, sizeof (GstIndexAssociation) * n);
entry->data.assoc.nassocs = n;
gst_index_add_entry (index, entry);
* gst_index_add_association:
* @index: the index to add the entry to
* @id: the id of the index writer
- * @flags: optinal flags for this entry
+ * @flags: optional flags for this entry
* @format: the format of the value
* @value: the value
* @...: other format/value pairs or 0 to end the list
*
* Finds the given format/value in the index
*
- * Returns: the entry associated with the value or %NULL if the
+ * Returns: (nullable): the entry associated with the value or %NULL if the
* value was not found.
*/
GstIndexEntry *
* Finds the given format/value in the index with the given
* compare function and user_data.
*
- * Returns: the entry associated with the value or %NULL if the
+ * Returns: (nullable): the entry associated with the value or %NULL if the
* value was not found.
*/
GstIndexEntry *