|
gstreamermm
0.10.10.2
|
A class that generates a stream index of one or more elements in a pipeline. More...


Public Types | |
| typedef sigc::slot< bool, const Glib::RefPtr< Gst::Index > &, Gst::IndexEntry > | SlotFilter |
| For example, bool on_filter(const Glib::RefPtr<Gst::Index>& index, Gst::IndexEntry entry);. | |
| typedef sigc::slot< bool, const Glib::RefPtr< Gst::Index > &, const Glib::RefPtr < Gst::Object > &, Glib::ustring& > | SlotResolver |
| For example, bool on_resolve(const Glib::RefPtr<Gst::Object>& writer, Glib::ustring& writer_string);. | |
Public Member Functions | |
| virtual | ~Index () |
| GstIndex* | gobj () |
| Provides access to the underlying C GObject. | |
| const GstIndex* | gobj () const |
| Provides access to the underlying C GObject. | |
| GstIndex* | gobj_copy () |
| Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
| bool | is_readable () const |
| Check if the index can be read from. | |
| bool | is_writable () const |
| Check if the index can be written to. | |
| void | commit (int id) |
| 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. | |
| int | get_group () const |
| Get the id of the current group. | |
| int | new_group () |
| Create a new group for the given index. | |
| bool | set_group (int group_number) |
| Set the current groupnumber to the given argument. | |
| void | set_certainty (IndexCertainty certainty) |
| Set the certainty of the given index. | |
| IndexCertainty | get_certainty () const |
| Get the certainty of the given index. | |
| bool | get_writer_id (const Glib::RefPtr< Gst::Object >& writer, int& id) const |
| Before entries can be added to the index, a writer should obtain a unique id. | |
| Gst::IndexEntry | add_format (int id, Format format) |
| Adds a format entry into the index. | |
| Gst::IndexEntry | add_association (int id, AssocFlags flags, int n, const Glib::ArrayHandle< const Gst::IndexAssociation >& list) |
| Associate given format/value pairs with each other. | |
| Gst::IndexEntry | add_id (int id, const Glib::ustring& description) |
| Add an id entry into the index. | |
| Gst::IndexEntry | get_assoc_entry (int id, gint64 value, IndexLookupMethod method=Gst::INDEX_LOOKUP_EXACT, AssocFlags flags=Gst::ASSOCIATION_FLAG_NONE, Format format=Gst::FORMAT_DEFAULT) const |
| Finds the given format/value in the index. | |
| void | set_filter (const SlotFilter& slot) |
| Lets the app register a custom filter slot so that it can select what entries should be stored in the index. | |
| void | set_resolver (const SlotResolver& slot) |
| Lets the app register a custom slot to map index ids to writer descriptions. | |
| Glib::PropertyProxy < Gst::Index::SlotResolver > | property_resolver () |
| Select a predefined object to string mapper. | |
| Glib::PropertyProxy_ReadOnly < Gst::Index::SlotResolver > | property_resolver () const |
| Select a predefined object to string mapper. | |
| Glib::SignalProxy1< void, const Gst::IndexEntry& > | signal_entry_added () |
| Emitted when a new entry is added to the index. | |
| virtual bool | get_writer_id_vfunc (int& writer_id, const Glib::ustring& writer_string) const |
| virtual void | commit_vfunc (gint id) |
| virtual void | add_entry_vfunc (Gst::IndexEntry& entry) |
Protected Member Functions | |
| Index () | |
| virtual void | on_entry_added (const Gst::IndexEntry& entry) |
| This is a default handler for the signal signal_entry_added(). | |
Related Functions | |
(Note that these are not member functions.) | |
| Glib::RefPtr< Gst::Index > | wrap (GstIndex* object, bool take_copy=false) |
| A Glib::wrap() method for this object. | |
A class that generates a stream index of one or more elements in a pipeline.
| typedef sigc::slot<bool, const Glib::RefPtr<Gst::Index>&, Gst::IndexEntry> Gst::Index::SlotFilter |
For example, bool on_filter(const Glib::RefPtr<Gst::Index>& index, Gst::IndexEntry entry);.
The filter function should return true if the entry is to be added to the index, false otherwise.
| typedef sigc::slot<bool, const Glib::RefPtr<Gst::Index>&, const Glib::RefPtr<Gst::Object>&, Glib::ustring&> Gst::Index::SlotResolver |
For example, bool on_resolve(const Glib::RefPtr<Gst::Object>& writer, Glib::ustring& writer_string);.
The resolve function should return true if an id could be assigned to writer.
| virtual Gst::Index::~Index | ( | ) | [virtual] |
| Gst::Index::Index | ( | ) | [protected] |
| Gst::IndexEntry Gst::Index::add_association | ( | int | id, |
| AssocFlags | flags, | ||
| int | n, | ||
| const Glib::ArrayHandle< const Gst::IndexAssociation >& | list | ||
| ) |
Associate given format/value pairs with each other.
| id | The id of the index writer. |
| flags | Optinal flags for this entry. |
| n | Number of associations. |
| list | List of associations. |
| virtual void Gst::Index::add_entry_vfunc | ( | Gst::IndexEntry& | entry | ) | [virtual] |
| Gst::IndexEntry Gst::Index::add_format | ( | int | id, |
| Format | format | ||
| ) |
Adds a format entry into the index.
This function is used to map dynamic GstFormat ids to their original format key.
Free-function: gst_index_entry_free
| id | The id of the index writer. |
| format | The format to add to the index. |
| Gst::IndexEntry Gst::Index::add_id | ( | int | id, |
| const Glib::ustring & | description | ||
| ) |
Add an id entry into the index.
| id | The id of the index writer. |
| description | The description of the index writer. |
| void Gst::Index::commit | ( | int | id | ) |
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.
| id | The writer that commited the index. |
| virtual void Gst::Index::commit_vfunc | ( | gint | id | ) | [virtual] |
| Gst::IndexEntry Gst::Index::get_assoc_entry | ( | int | id, |
| gint64 | value, | ||
| IndexLookupMethod | method = Gst::INDEX_LOOKUP_EXACT, |
||
| AssocFlags | flags = Gst::ASSOCIATION_FLAG_NONE, |
||
| Format | format = Gst::FORMAT_DEFAULT |
||
| ) | const |
Finds the given format/value in the index.
| id | The id of the index writer. |
| value | The value to find. |
| method | The lookup method to use. |
| flags | Flags for the entry. |
| format | The format of the value. |
| IndexCertainty Gst::Index::get_certainty | ( | ) | const |
Get the certainty of the given index.
| int Gst::Index::get_group | ( | ) | const |
Get the id of the current group.
| bool Gst::Index::get_writer_id | ( | const Glib::RefPtr< Gst::Object >& | writer, |
| int & | id | ||
| ) | const |
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.
<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>
| writer | The GstObject to allocate an id for. |
| id | A pointer to a int to hold the id. |
true if the writer would be mapped to an id. | virtual bool Gst::Index::get_writer_id_vfunc | ( | int & | writer_id, |
| const Glib::ustring & | writer_string | ||
| ) | const [virtual] |
| GstIndex* Gst::Index::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gst::Object.
| const GstIndex* Gst::Index::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Gst::Object.
| GstIndex* Gst::Index::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
Reimplemented from Gst::Object.
| bool Gst::Index::is_readable | ( | ) | const |
Check if the index can be read from.
| bool Gst::Index::is_writable | ( | ) | const |
Check if the index can be written to.
| int Gst::Index::new_group | ( | ) |
Create a new group for the given index.
It will be set as the current group.
| virtual void Gst::Index::on_entry_added | ( | const Gst::IndexEntry& | entry | ) | [protected, virtual] |
This is a default handler for the signal signal_entry_added().
Select a predefined object to string mapper.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Select a predefined object to string mapper.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
| void Gst::Index::set_certainty | ( | IndexCertainty | certainty | ) |
Set the certainty of the given index.
| certainty | The certainty to set. |
| void Gst::Index::set_filter | ( | const SlotFilter& | slot | ) |
Lets the app register a custom filter slot so that it can select what entries should be stored in the index.
| slot | The filter slot to register. |
| bool Gst::Index::set_group | ( | int | group_number | ) |
Set the current groupnumber to the given argument.
| groupnum | The groupnumber to set. |
true if the operation succeeded, false if the group did not exist. | void Gst::Index::set_resolver | ( | const SlotResolver& | slot | ) |
Lets the app register a custom slot to map index ids to writer descriptions.
| slot | The resolver slot to register. |
| Glib::SignalProxy1< void,const Gst::IndexEntry& > Gst::Index::signal_entry_added | ( | ) |
Emitted when a new entry is added to the index.
void on_my_entry_added(const Gst::IndexEntry& entry) | Glib::RefPtr< Gst::Index > wrap | ( | GstIndex * | object, |
| bool | take_copy = false |
||
| ) | [related] |
A Glib::wrap() method for this object.
| object | The C instance. |
| take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |
1.7.6.1