Next: GstInfo, Previous: GstIndexFactory, Up: Top
Generate indexes on objects
GstIndex is used to generate a stream index of one or more elements in a pipeline.
This
<gobject>
class defines the following properties:
resolver
- Select a predefined object to string mapper
<gst-index-entry>
)Is emitted when a new entry is added to the index.
<gst-index>
) (id int
)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 it.
- index
- the index to commit
- id
- the writer that commited the index
<gst-index>
) (ret int
)Get the id of the current group.
- index
- the index to get the current group from
- ret
- the id of the current group.
<gst-index>
) (ret int
)Create a new group for the given index. It will be set as the current group.
- index
- the index to create the new group in
- ret
- the id of the newly created group.
<gst-index>
) (groupnum int
) (ret bool
)Set the current groupnumber to the given argument.
- index
- the index to set the new group in
- groupnum
- the groupnumber to set
- ret
- TRUE if the operation succeeded, FALSE if the group did not exist.
<gst-index>
) (certainty <gst-index-certainty>
)Set the certainty of the given index.
- index
- the index to set the certainty on
- certainty
- the certainty to set
<gst-index>
) (ret <gst-index-certainty>
)Get the certainty of the given index.
- index
- the index to get the certainty of
- ret
- the certainty of the index.
<gst-index>
) (filter <gst-index-filter>
) (user_data <gpointer>
) (user_data_destroy <g-destroy-notify>
)Lets the app register a custom filter function so that it can select what entries should be stored in the index.
- index
- the index to register the filter on
- filter
- the filter to register
- user-data
- data passed to the filter function
- user-data-destroy
- function to call when user-data is unset
<gst-index>
) (writer <gst-object>
) (ret bool
) (id int
)Before entries can be added to the index, a writer should obtain a unique id. The methods to add new entries to the index require this id as an argument.
The application can implement a custom function to map the writer object to a string. That string will be used to register or look up an id in the index.
- index
- the index to get a unique write id for
- writer
- the GstObject to allocate an id for
- id
- a pointer to a gint to hold the id
- ret
- TRUE if the writer would be mapped to an id.
<gst-index>
) (id int
) (format <gst-format>
) (ret <gst-index-entry*>
)Adds a format entry into the index. This function is used to map dynamic GstFormat ids to their original format key.
- index
- the index to add the entry to
- id
- the id of the index writer
- format
- the format to add to the index
- ret
- a pointer to the newly added entry in the index.
<gst-index>
) (id int
) (flags <gst-assoc-flags>
) (n int
) (list <gst-index-association*>
) (ret <gst-index-entry*>
)Associate given format/value pairs with each other.
- index
- the index to add the entry to
- id
- the id of the index writer
- flags
- optinal flags for this entry
- n
- number of associations
- list
- list of associations
- ret
- a pointer to the newly added entry in the index.
<gst-index>
) (id int
) (key mchars
) (type <gtype>
) (object <gpointer>
) (ret <gst-index-entry*>
)Add the given object to the index with the given key.
This function is not yet implemented.
- index
- the index to add the object to
- id
- the id of the index writer
- key
- a key for the object
- type
- the GType of the object
- object
- a pointer to the object to add
- ret
- a pointer to the newly added entry in the index.
<gst-index>
) (id int
) (description mchars
) (ret <gst-index-entry*>
)Add an id entry into the index.
- index
- the index to add the entry to
- id
- the id of the index writer
- description
- the description of the index writer
- ret
- a pointer to the newly added entry in the index.
<gst-index>
) (id int
) (method <gst-index-lookup-method>
) (flags <gst-assoc-flags>
) (format <gst-format>
) (value int64
) (ret <gst-index-entry*>
)Finds the given format/value in the index
- index
- the index to search
- id
- the id of the index writer
- method
- The lookup method to use
- flags
- Flags for the entry
- format
- the format of the value
- value
- the value to find
- ret
- the entry associated with the value or NULL if the value was not found.
<gst-index>
) (id int
) (method <gst-index-lookup-method>
) (flags <gst-assoc-flags>
) (format <gst-format>
) (value int64
) (func <g-compare-data-func>
) (user_data <gpointer>
) (ret <gst-index-entry*>
)Finds the given format/value in the index with the given compare function and user_data.
- index
- the index to search
- id
- the id of the index writer
- method
- The lookup method to use
- flags
- Flags for the entry
- format
- the format of the value
- value
- the value to find
- func
- the function used to compare entries
- user-data
- user data passed to the compare function
- ret
- the entry associated with the value or NULL if the value was not found.
<gst-index-entry*>
) (format <gst-format>
) (ret bool
) (value int64
)Gets alternative formats associated with the indexentry.
- entry
- the index to search
- format
- the format of the value the find
- value
- a pointer to store the value
- ret
- TRUE if there was a value associated with the given format.