#include <query.h>
Public Member Functions | |
virtual | ~Query () |
GstQuery* | gobj () |
Provides access to the underlying C GstMiniObject. | |
const GstQuery* | gobj () const |
Provides access to the underlying C GstMiniObject. | |
GstQuery* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
Glib::RefPtr<Gst::Query> | copy () const |
Copies the given query using the query copy function. | |
Glib::RefPtr<Gst::Query> | create_writable () |
Makes a writable query from the given query. | |
const Gst::Structure | get_structure () const |
Get the structure of a query. | |
QueryType | get_query_type () const |
Get the Gst::QueryType of the query. | |
bool | get_details (QueryType type, QueryTypeDefinition& def) |
Get details about the given Gst::QueryType. | |
Static Public Member Functions | |
static Glib::RefPtr<Gst::Query> | wrap (GstQuery* query, bool take_copy=false) |
Wrap a GstQuery* in a C++ instance, creating an instance of a derived Gst::Query. | |
static QueryType | register_query_type (const Glib::ustring& nick, const Glib::ustring& description) |
Create a new GstQueryType based on the nick or return an already registered query with that nick. | |
static QueryType | get_query_type (const Glib::ustring& nick) |
Get the query type registered with nick. | |
static bool | query_types_contain (const Glib::ArrayHandle<QueryType>& types, QueryType type) |
See if the given Gst::QueryType is inside the types query types array. | |
static Gst::IteratorBasic < const Gst::QueryTypeDefinition > | iterate_definitions () |
Get a Gst::IteratorBasic of all the registered query types. |
Queries can be created using the derived Gst::Query classes create() methods. Query values can be set using derived classes set() methods, and parsed using derived classes parse() methods.
New query types may also be registered to the GStreamer core using register_query_type().
The following example shows how to query the duration of a pipeline:
Glib::RefPtr<Gst::Query> query = Gst::QueryDuration::create(Gst::FORMAT_TIME); bool res = pipeline->query(query); if (res) { gint64 duration = query.parse(); ... }
virtual Gst::Query::~Query | ( | ) | [virtual] |
Glib::RefPtr<Gst::Query> Gst::Query::copy | ( | ) | const |
Copies the given query using the query copy function.
Reimplemented from Gst::MiniObject.
Glib::RefPtr<Gst::Query> Gst::Query::create_writable | ( | ) |
Makes a writable query from the given query.
Does exactly what Gst::MiniObject::create_writable() does for the Gst::Query.
Reimplemented from Gst::MiniObject.
bool Gst::Query::get_details | ( | QueryType | type, | |
QueryTypeDefinition& | def | |||
) |
Get details about the given Gst::QueryType.
type | A Gst::QueryType. | |
def | A Gst::QueryTypeDefinition in which to store the details. |
static QueryType Gst::Query::get_query_type | ( | const Glib::ustring & | nick | ) | [static] |
Get the query type registered with nick.
nick | The nick of the query. |
QueryType Gst::Query::get_query_type | ( | ) | const |
Get the Gst::QueryType of the query.
const Gst::Structure Gst::Query::get_structure | ( | ) | const |
Get the structure of a query.
const GstQuery* Gst::Query::gobj | ( | ) | const [inline] |
Provides access to the underlying C GstMiniObject.
Reimplemented from Gst::MiniObject.
References Gst::MiniObject::gobject_.
GstQuery* Gst::Query::gobj | ( | ) | [inline] |
Provides access to the underlying C GstMiniObject.
Reimplemented from Gst::MiniObject.
References Gst::MiniObject::gobject_.
GstQuery* Gst::Query::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
static Gst::IteratorBasic<const Gst::QueryTypeDefinition> Gst::Query::iterate_definitions | ( | ) | [static] |
Get a Gst::IteratorBasic of all the registered query types.
The definitions iterated over are read only.
static bool Gst::Query::query_types_contain | ( | const Glib::ArrayHandle<QueryType>& | types, | |
QueryType | type | |||
) | [static] |
See if the given Gst::QueryType is inside the types query types array.
type | The Gst::QueryType to find. |
true
if the type is found inside the array. static QueryType Gst::Query::register_query_type | ( | const Glib::ustring & | nick, | |
const Glib::ustring & | description | |||
) | [static] |
Create a new GstQueryType based on the nick or return an already registered query with that nick.
nick | The nick of the new query. | |
description | The description of the new query. |
Glib::RefPtr<Gst::Query> wrap | ( | GstQuery * | query, | |
bool | take_copy = false | |||
) | [static] |
Wrap a GstQuery* in a C++ instance, creating an instance of a derived Gst::Query.
Gst::wrap() would just create a Gst::Query (rather than a derived one) because the derived Gst::Query classes do not correspond to GType types in the GStreamer API.
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. |