gstindex.h   gstindex.h 
skipping to change at line 33 skipping to change at line 33
#ifndef __GST_INDEX_H__ #ifndef __GST_INDEX_H__
#define __GST_INDEX_H__ #define __GST_INDEX_H__
#include <gst/gstobject.h> #include <gst/gstobject.h>
#include <gst/gstformat.h> #include <gst/gstformat.h>
#include <gst/gstpluginfeature.h> #include <gst/gstpluginfeature.h>
G_BEGIN_DECLS G_BEGIN_DECLS
#define GST_TYPE_INDEX (gst_index_get_type ()) #define GST_TYPE_INDEX (gst_index_get_type ())
#define GST_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), #define GST_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GST_TYPE_INDEX, GstIndex)) GST_TYPE_INDEX, GstIndex))
#define GST_IS_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), #define GST_IS_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GST_TYPE_INDEX)) GST_TYPE_INDEX))
#define GST_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), G #define GST_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
ST_TYPE_INDEX, GstIndexClass)) GST_TYPE_INDEX, GstIndexClass))
#define GST_IS_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), G #define GST_IS_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
ST_TYPE_INDEX)) GST_TYPE_INDEX))
#define GST_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), G #define GST_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
ST_TYPE_INDEX, GstIndexClass)) GST_TYPE_INDEX, GstIndexClass))
#define GST_TYPE_INDEX_ENTRY (gst_index_entry_get_type()) #define GST_TYPE_INDEX_ENTRY (gst_index_entry_get_type())
typedef struct _GstIndexEntry GstIndexEntry; typedef struct _GstIndexEntry GstIndexEntry;
typedef struct _GstIndexGroup GstIndexGroup; typedef struct _GstIndexGroup GstIndexGroup;
typedef struct _GstIndex GstIndex; typedef struct _GstIndex GstIndex;
typedef struct _GstIndexClass GstIndexClass; typedef struct _GstIndexClass GstIndexClass;
/** /**
* GstIndexCertainty: * GstIndexCertainty:
skipping to change at line 97 skipping to change at line 97
GST_INDEX_LOOKUP_BEFORE, GST_INDEX_LOOKUP_BEFORE,
GST_INDEX_LOOKUP_AFTER GST_INDEX_LOOKUP_AFTER
} GstIndexLookupMethod; } GstIndexLookupMethod;
/** /**
* GST_INDEX_NASSOCS: * GST_INDEX_NASSOCS:
* @entry: The entry to query * @entry: The entry to query
* *
* Get the number of associations in the entry. * Get the number of associations in the entry.
*/ */
#define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassocs ) #define GST_INDEX_NASSOCS(entry) ((entry)->data.assoc.nassoc s)
/** /**
* GST_INDEX_ASSOC_FLAGS: * GST_INDEX_ASSOC_FLAGS:
* @entry: The entry to query * @entry: The entry to query
* *
* Get the flags for this entry. * Get the flags for this entry.
*/ */
#define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags) #define GST_INDEX_ASSOC_FLAGS(entry) ((entry)->data.assoc.flags)
/** /**
* GST_INDEX_ASSOC_FORMAT: * GST_INDEX_ASSOC_FORMAT:
* @entry: The entry to query * @entry: The entry to query
* @i: The format index * @i: The format index
* *
* Get the i-th format of the entry. * Get the i-th format of the entry.
*/ */
#define GST_INDEX_ASSOC_FORMAT(entry,i) ((entry)->data.assoc .assocs[(i)].format) #define GST_INDEX_ASSOC_FORMAT(entry,i) ((entry)->data.assoc.assocs [(i)].format)
/** /**
* GST_INDEX_ASSOC_VALUE: * GST_INDEX_ASSOC_VALUE:
* @entry: The entry to query * @entry: The entry to query
* @i: The value index * @i: The value index
* *
* Get the i-th value of the entry. * Get the i-th value of the entry.
*/ */
#define GST_INDEX_ASSOC_VALUE(entry,i) ((entry)->data.assoc.assocs[ (i)].value) #define GST_INDEX_ASSOC_VALUE(entry,i) ((entry)->data.assoc.assocs [(i)].value)
typedef struct _GstIndexAssociation GstIndexAssociation; typedef struct _GstIndexAssociation GstIndexAssociation;
/** /**
* GstIndexAssociation: * GstIndexAssociation:
* @format: the format of the association * @format: the format of the association
* @value: the value of the association * @value: the value of the association
* *
* An association in an entry. * An association in an entry.
*/ */
struct _GstIndexAssociation { struct _GstIndexAssociation {
GstFormat format; GstFormat format;
gint64 value; gint64 value;
}; };
/** /**
* GstAssocFlags: * GstAssocFlags:
* @GST_ASSOCIATION_FLAG_NONE: no extra flags * @GST_ASSOCIATION_FLAG_NONE: no extra flags
* @GST_ASSOCIATION_FLAG_KEY_UNIT: the entry marks a key unit, a key unit i s one * @GST_ASSOCIATION_FLAG_KEY_UNIT: the entry marks a key unit, a key unit i s one
* that marks a place where one can randomly seek to. * that marks a place where one can randomly seek to.
* @GST_ASSOCIATION_FLAG_DELTA_UNIT: the entry marks a delta unit, a delta unit * @GST_ASSOCIATION_FLAG_DELTA_UNIT: the entry marks a delta unit, a delta unit
* is one that marks a place where one can relatively seek to. * is one that marks a place where one can relatively seek to.
* @GST_ASSOCIATION_FLAG_LAST: extra user defined flags should start here. * @GST_ASSOCIATION_FLAG_LAST: extra user defined flags should start here.
* *
* Flags for an association entry. * Flags for an association entry.
*/ */
typedef enum { typedef enum {
GST_ASSOCIATION_FLAG_NONE = 0, GST_ASSOCIATION_FLAG_NONE = 0,
GST_ASSOCIATION_FLAG_KEY_UNIT = (1 << 0), GST_ASSOCIATION_FLAG_KEY_UNIT = (1 << 0),
GST_ASSOCIATION_FLAG_DELTA_UNIT = (1 << 1), GST_ASSOCIATION_FLAG_DELTA_UNIT = (1 << 1),
/* new flags should start here */ /* new flags should start here */
GST_ASSOCIATION_FLAG_LAST = (1 << 8) GST_ASSOCIATION_FLAG_LAST = (1 << 8)
} GstAssocFlags; } GstAssocFlags;
/** /**
* GST_INDEX_FORMAT_FORMAT: * GST_INDEX_FORMAT_FORMAT:
* @entry: The entry to query * @entry: The entry to query
* *
* Get the format of the format entry * Get the format of the format entry
*/ */
#define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.format ) #define GST_INDEX_FORMAT_FORMAT(entry) ((entry)->data.format.forma t)
/** /**
* GST_INDEX_FORMAT_KEY: * GST_INDEX_FORMAT_KEY:
* @entry: The entry to query * @entry: The entry to query
* *
* Get the key of the format entry * Get the key of the format entry
*/ */
#define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key) #define GST_INDEX_FORMAT_KEY(entry) ((entry)->data.format.key)
/** /**
* GST_INDEX_ID_INVALID: * GST_INDEX_ID_INVALID:
* *
* Constant for an invalid index id * Constant for an invalid index id
*/ */
#define GST_INDEX_ID_INVALID (-1) #define GST_INDEX_ID_INVALID (-1)
/** /**
* GST_INDEX_ID_DESCRIPTION: * GST_INDEX_ID_DESCRIPTION:
* @entry: The entry to query * @entry: The entry to query
* *
* Get the description of the id entry * Get the description of the id entry
*/ */
#define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.de scription) #define GST_INDEX_ID_DESCRIPTION(entry) ((entry)->data.id.descripti on)
/** /**
* GstIndexEntry: * GstIndexEntry:
* *
* The basic element of an index. * The basic element of an index.
*/ */
struct _GstIndexEntry { struct _GstIndexEntry {
/*< private >*/ /*< private >*/
GstIndexEntryType type; GstIndexEntryType type;
gint id; gint id;
union { union {
struct { struct {
gchar *description; gchar *description;
} id; } id;
struct { struct {
gint nassocs; gint nassocs;
GstIndexAssociation GstIndexAssociation
*assocs; *assocs;
GstAssocFlags flags; GstAssocFlags flags;
} assoc; } assoc;
struct { struct {
gchar *key; gchar *key;
GType type; GType type;
gpointer object; gpointer object;
} object; } object;
struct { struct {
GstFormat format; GstFormat format;
const gchar *key; const gchar *key;
} format; } format;
} data; } data;
}; };
/** /**
* GstIndexGroup: * GstIndexGroup:
* *
* A group of related entries in an index. * A group of related entries in an index.
*/ */
skipping to change at line 255 skipping to change at line 255
* @index: The index being queried * @index: The index being queried
* @entry: The entry to be added. * @entry: The entry to be added.
* @user_data: User data passed to the function. * @user_data: User data passed to the function.
* *
* Function to filter out entries in the index. * Function to filter out entries in the index.
* *
* Returns: This function should return %TRUE if the entry is to be added * Returns: This function should return %TRUE if the entry is to be added
* to the index, %FALSE otherwise. * to the index, %FALSE otherwise.
* *
*/ */
typedef gboolean (*GstIndexFilter) (GstIndex *index, typedef gboolean (*GstIndexFilter) (GstIndex *index,
GstIndexEntry *entr GstIndexEntry *ent
y, ry,
gpointer user_data ); gpointer user_data );
/** /**
* GstIndexResolverMethod: * GstIndexResolverMethod:
* @GST_INDEX_RESOLVER_CUSTOM: Use a custom resolver * @GST_INDEX_RESOLVER_CUSTOM: Use a custom resolver
* @GST_INDEX_RESOLVER_GTYPE: Resolve based on the GType of the object * @GST_INDEX_RESOLVER_GTYPE: Resolve based on the GType of the object
* @GST_INDEX_RESOLVER_PATH: Resolve on the path in graph * @GST_INDEX_RESOLVER_PATH: Resolve on the path in graph
* *
* The method used to resolve index writers * The method used to resolve index writers
*/ */
typedef enum { typedef enum {
skipping to change at line 283 skipping to change at line 283
* GstIndexResolver: * GstIndexResolver:
* @index: the index being queried. * @index: the index being queried.
* @writer: The object that wants to write * @writer: The object that wants to write
* @writer_string: A description of the writer. * @writer_string: A description of the writer.
* @user_data: user_data as registered * @user_data: user_data as registered
* *
* Function to resolve ids to writer descriptions. * Function to resolve ids to writer descriptions.
* *
* Returns: %TRUE if an id could be assigned to the writer. * Returns: %TRUE if an id could be assigned to the writer.
*/ */
typedef gboolean (*GstIndexResolver) (GstIndex *index, typedef gboolean (*GstIndexResolver) (GstIndex *index,
GstObject *writer, GstObject *writer,
gchar **writer_stri gchar **writer_str
ng, ing,
gpointer user_data) gpointer user_data
; );
/** /**
* GstIndexFlags: * GstIndexFlags:
* @GST_INDEX_WRITABLE: The index is writable * @GST_INDEX_WRITABLE: The index is writable
* @GST_INDEX_READABLE: The index is readable * @GST_INDEX_READABLE: The index is readable
* @GST_INDEX_FLAG_LAST: First flag that can be used by subclasses * @GST_INDEX_FLAG_LAST: First flag that can be used by subclasses
* *
* Flags for this index * Flags for this index
*/ */
typedef enum { typedef enum {
skipping to change at line 325 skipping to change at line 325
* Check if the index can be written to * Check if the index can be written to
*/ */
#define GST_INDEX_IS_WRITABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_IND EX_WRITABLE)) #define GST_INDEX_IS_WRITABLE(obj) (GST_OBJECT_FLAG_IS_SET (obj, GST_IND EX_WRITABLE))
/** /**
* GstIndex: * GstIndex:
* *
* Opaque #GstIndex structure. * Opaque #GstIndex structure.
*/ */
struct _GstIndex { struct _GstIndex {
GstObject object; GstObject object;
/*< private >*/ /*< private >*/
GList *groups; GList *groups;
GstIndexGroup *curgroup; GstIndexGroup *curgroup;
gint maxgroup; gint maxgroup;
GstIndexResolverMethod method; GstIndexResolverMethod method;
GstIndexResolver resolver; GstIndexResolver resolver;
gpointer resolver_user_data; gpointer resolver_user_data;
GstIndexFilter filter; GstIndexFilter filter;
gpointer filter_user_data; gpointer filter_user_data;
GDestroyNotify filter_user_data_destroy; GDestroyNotify filter_user_data_destroy;
GHashTable *writers; GHashTable *writers;
gint last_id; gint last_id;
/* ABI added since 0.10.18 */ /* ABI added since 0.10.18 */
GDestroyNotify resolver_user_data_destroy; GDestroyNotify resolver_user_data_destroy;
/*< private >*/ /*< private >*/
gpointer _gst_reserved[GST_PADDING - 1]; gpointer _gst_reserved[GST_PADDING - 1];
}; };
struct _GstIndexClass { struct _GstIndexClass {
GstObjectClass parent_class; GstObjectClass parent_class;
/*< protected >*/ /*< protected >*/
gboolean (*get_writer_id) (GstIndex *index, gint *writer_id, g char *writer_string); gboolean (*get_writer_id) (GstIndex *index, gint *writer_id, gchar *writer_string);
void (*commit) (GstIndex *index, gint id); void (*commit) (GstIndex *index, gint id);
/* abstract methods */ /* abstract methods */
void (*add_entry) (GstIndex *index, GstIndexEntry *ent ry); void (*add_entry) (GstIndex *index, GstIndexEntry *en try);
GstIndexEntry* (*get_assoc_entry) (GstIndex *index, gint id, GstIndexEntry* (*get_assoc_entry) (GstIndex *index, gint id,
GstIndexLookupMethod method, GstAss GstIndexLookupMethod method, GstAs
ocFlags flags, socFlags flags,
GstFormat format, gint64 value, GstFormat format, gint64 value,
GCompareDataFunc func, GCompareDataFunc func,
gpointer user_data); gpointer user_data);
/* signals */ /* signals */
void (*entry_added) (GstIndex *index, GstIndexEntry *ent ry); void (*entry_added) (GstIndex *index, GstIndexEntry *en try);
/*< private >*/ /*< private >*/
gpointer _gst_reserved[GST_PADDING]; gpointer _gst_reserved[GST_PADDING];
}; };
GType gst_index_get_type (void); GType gst_index_get_type (void);
GstIndex* gst_index_new (void); GstIndex* gst_index_new (void);
void gst_index_commit (GstIndex *index, gi void gst_index_commit (GstIndex *index, g
nt id); int id);
gint gst_index_get_group (GstIndex *index); gint gst_index_get_group (GstIndex *index);
gint gst_index_new_group (GstIndex *index); gint gst_index_new_group (GstIndex *index);
gboolean gst_index_set_group (GstIndex *index, gi gboolean gst_index_set_group (GstIndex *index, g
nt groupnum); int groupnum);
void gst_index_set_certainty (GstIndex *index, void gst_index_set_certainty (GstIndex *index,
GstIndexCertainty c GstIndexCertainty
ertainty); certainty);
GstIndexCertainty gst_index_get_certainty (GstIndex *index); GstIndexCertainty gst_index_get_certainty (GstIndex *index);
void gst_index_set_filter (GstIndex *index, void gst_index_set_filter (GstIndex *index,
GstIndexFilter filt GstIndexFilter fil
er, gpointer user_data); ter, gpointer user_data);
void gst_index_set_filter_full (GstIndex *index, void gst_index_set_filter_full (GstIndex *index,
GstIndexFilter filt GstIndexFilter fil
er, gpointer user_data, ter, gpointer user_data,
GDestroyNotify use r_data_destroy); GDestroyNotify use r_data_destroy);
void gst_index_set_resolver (GstIndex *index, void gst_index_set_resolver (GstIndex *index,
GstIndexResolver re GstIndexResolver r
solver, gpointer user_data); esolver, gpointer user_data);
void gst_index_set_resolver_full (GstIndex *index, Gs void gst_index_set_resolver_full (GstIndex *index, G
tIndexResolver resolver, stIndexResolver resolver,
gpointer user_data , gpointer user_data ,
GDestroyNotify use r_data_destroy); GDestroyNotify use r_data_destroy);
gboolean gst_index_get_writer_id (GstIndex *index, Gs tObject *writer, gint *id); gboolean gst_index_get_writer_id (GstIndex *index, G stObject *writer, gint *id);
GstIndexEntry* gst_index_add_format (GstIndex *index, gi GstIndexEntry* gst_index_add_format (GstIndex *index, g
nt id, GstFormat format); int id, GstFormat format);
GstIndexEntry* gst_index_add_associationv (GstIndex * index, g GstIndexEntry* gst_index_add_associationv (GstIndex * index,
int id, GstAssocFlags flags, gint id, GstAssocFlags flags,
gint n, const GstI ndexAssociation * list); gint n, const GstI ndexAssociation * list);
GstIndexEntry* gst_index_add_association (GstIndex *index, gi GstIndexEntry* gst_index_add_association (GstIndex *index, g
nt id, GstAssocFlags flags, int id, GstAssocFlags flags,
GstFormat format, g GstFormat format,
int64 value, ...); gint64 value, ...);
GstIndexEntry* gst_index_add_object (GstIndex *index, gi GstIndexEntry* gst_index_add_object (GstIndex *index, g
nt id, gchar *key, int id, gchar *key,
GType type, gpointe GType type, gpoint
r object); er object);
GstIndexEntry* gst_index_add_id (GstIndex *index, gi GstIndexEntry* gst_index_add_id (GstIndex *index, g
nt id, int id,
gchar *description) gchar *description
; );
GstIndexEntry* gst_index_get_assoc_entry (GstIndex *index, gi GstIndexEntry* gst_index_get_assoc_entry (GstIndex *index, g
nt id, int id,
GstIndexLookupMetho GstIndexLookupMeth
d method, GstAssocFlags flags, od method, GstAssocFlags flags,
GstFormat format, g GstFormat format,
int64 value); gint64 value);
GstIndexEntry* gst_index_get_assoc_entry_full (GstIndex *index, gi GstIndexEntry* gst_index_get_assoc_entry_full (GstIndex *index, g
nt id, int id,
GstIndexLookupMetho GstIndexLookupMeth
d method, GstAssocFlags flags, od method, GstAssocFlags flags,
GstFormat format, g GstFormat format,
int64 value, gint64 value,
GCompareDataFunc fu GCompareDataFunc f
nc, unc,
gpointer user_data) gpointer user_data
; );
/* working with index entries */ /* working with index entries */
GType gst_index_entry_get_type (void); GType gst_index_entry_get_type (void);
GstIndexEntry * gst_index_entry_copy (GstIndexEntry *ent ry); GstIndexEntry * gst_index_entry_copy (GstIndexEntry *ent ry);
void gst_index_entry_free (GstIndexEntry *entr void gst_index_entry_free (GstIndexEntry *ent
y); ry);
gboolean gst_index_entry_assoc_map (GstIndexEntry *entr gboolean gst_index_entry_assoc_map (GstIndexEntry *ent
y, ry,
GstFormat format, g GstFormat format,
int64 *value); gint64 *value);
G_END_DECLS G_END_DECLS
#endif /* __GST_INDEX_H__ */ #endif /* __GST_INDEX_H__ */
 End of changes. 37 change blocks. 
131 lines changed or deleted 131 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/