gstreamermm  1.10.0
Public Member Functions | Static Public Member Functions | List of all members
Gst::QueryAllocation Class Reference

A new scheduling query object. More...

#include <gstreamermm/query.h>

Inheritance diagram for Gst::QueryAllocation:
Inheritance graph
[legend]

Public Member Functions

void parse (Glib::RefPtr< Gst::Caps >& caps, bool& need_pool) const
 Parse an allocation query, writing the requested caps in caps and whether a pool is needed in need_pool, if the respective parameters are non-NULL. More...
 
guint get_n_allocation_pools () const
 Retrieve the number of values currently stored in the pool array of the query's structure. More...
 
void remove_nth_allocation_pool (guint index)
 Remove the allocation pool at index of the allocation pool array. More...
 
void add_allocation_param (const Glib::RefPtr< Gst::Allocator >& allocator, const Gst::AllocationParams& params)
 Add allocator and its params as a supported memory allocator. More...
 
guint get_n_allocation_params () const
 Retrieve the number of values currently stored in the allocator params array of the query's structure. More...
 
void parse_nth_allocation_param (guint index, Glib::RefPtr< Gst::Allocator >& allocator, Gst::AllocationParams& params) const
 Parse an available query and get the alloctor and its params at index of the allocator array. More...
 
void set_nth_allocation_param (guint index, const Glib::RefPtr< Gst::Allocator >& allocator, const Gst::AllocationParams& params)
 Parse an available query and get the alloctor and its params at index of the allocator array. More...
 
void remove_nth_allocation_param (guint index)
 Remove the allocation param at index of the allocation param array. More...
 
void add_allocation_meta (GType api, const Gst::Structure& params)
 Add api with params as one of the supported metadata API to query. More...
 
guint get_n_allocation_metas () const
 Retrieve the number of values currently stored in the meta API array of the query's structure. More...
 
GType parse_nth_allocation_meta (guint index, Gst::Structure& params) const
 Parse an available query and get the metadata API at index of the metadata API array. More...
 
void remove_nth_allocation_meta (guint index)
 Remove the metadata API at index of the metadata API array. More...
 
bool find_allocation_meta (GType api, guint& index) const
 Check if query has metadata api set. More...
 
- Public Member Functions inherited from Gst::Query
void reference () const
 Increment the reference count for this object. More...
 
void unreference () const
 Decrement the reference count for this object. More...
 
GstQuery* gobj ()
 Provides access to the underlying C instance. More...
 
const GstQuery* gobj () const
 Provides access to the underlying C instance. More...
 
GstQuery* gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
 Query ()=delete
 
 Query (const Query&)=delete
 
Queryoperator= (const Query&)=delete
 
Glib::RefPtr< Gst::Querycreate_writable ()
 Makes a writable query from the given query. More...
 
Gst::Structure get_structure () const
 Get the structure of a query. More...
 
QueryType get_query_type () const
 Get the Gst::QueryType of the query. More...
 
Glib::RefPtr< Gst::Querycopy ()
 Copies the given query using the copy function of the parent Gst::Structure. More...
 
- Public Member Functions inherited from Gst::MiniObject
void reference () const
 Increment the reference count for this object. More...
 
void unreference () const
 Decrement the reference count for this object. More...
 
GstMiniObject* gobj ()
 Provides access to the underlying C instance. More...
 
const GstMiniObject* gobj () const
 Provides access to the underlying C instance. More...
 
GstMiniObject* gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
 MiniObject ()=delete
 
 MiniObject (const MiniObject&)=delete
 
MiniObjectoperator= (const MiniObject&)=delete
 
 ~MiniObject ()
 
guint get_flags () const
 
void set_flags (const guint& value)
 
gint get_refcount () const
 
gint get_lockstate () const
 
bool lock (LockFlags flags)
 Lock the mini-object with the specified access mode in flags. More...
 
void unlock (LockFlags flags)
 Unlock the mini-object with the specified access mode in flags. More...
 
bool is_writable () const
 If mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE lock on object is the only one, this means that changes to the object will not be visible to any other object. More...
 
Glib::RefPtr< MiniObjectcreate_writable ()
 Checks if a mini-object is writable. More...
 
void set_qdata (GQuark quark, QuarkData* data)
 This sets an opaque, named pointer on a miniobject. More...
 
QuarkDataget_qdata (GQuark quark) const
 This function gets back user data pointers stored via set_qdata(). More...
 
QuarkDatasteal_qdata (GQuark quark)
 This function gets back user data pointers stored via set_qdata() and removes the data from object without invoking its destroy() function (if any was set). More...
 
void add_finalize_notifier (const SlotFinalizer& slot)
 Adds notifier when mini object is finalized. More...
 
void remove_finalize_notifier ()
 Remove finalize notifier. More...
 

Static Public Member Functions

static Glib::RefPtr< Gst::QueryAllocationcreate (const Glib::RefPtr< Gst::Caps >& caps, bool need_pool)
 Constructs a new query object for querying the allocation properties. More...
 
- Static Public Member Functions inherited from Gst::Query
static Glib::RefPtr< Gst::Querycreate_buffering (Gst::Format format)
 Constructs a new query object for querying the buffering status of a stream. More...
 
static Glib::RefPtr< Gst::Querycreate_allocation (Glib::RefPtr< Gst::Caps > caps, bool need_pool)
 Constructs a new query object for querying the allocation properties. More...
 
static Glib::RefPtr< Gst::Querycreate_uri ()
 Constructs a new query URI query object. More...
 
static Glib::RefPtr< Gst::Querycreate_scheduling ()
 Constructs a new query object for querying the scheduling properties. More...
 
static Glib::RefPtr< Gst::Querycreate_drain ()
 Constructs a new query object for querying the drain state. More...
 
static Glib::RefPtr< Gst::Querycreate_custom (Gst::QueryType type, const Gst::Structure& structure)
 Constructs a new custom query object. More...
 
static Glib::RefPtr< Gst::Querycreate_convert (Gst::Format format, gint64 value, Gst::Format dest_format)
 Constructs a new convert query object. More...
 
static Glib::RefPtr< Gst::Querycreate_position (Gst::Format format)
 Constructs a new query stream position query object. More...
 
static Glib::RefPtr< Gst::Querycreate_duration (Gst::Format format)
 Constructs a new stream duration query object to query in the given format. More...
 
static Glib::RefPtr< Gst::Querycreate_latency ()
 Constructs a new latency query object. More...
 
static Glib::RefPtr< Gst::Querycreate_seeking (Gst::Format format)
 Constructs a new query object for querying seeking properties of the stream. More...
 
static Glib::RefPtr< Gst::Querycreate_formats ()
 Constructs a new query object for querying formats of the stream. More...
 
static Glib::RefPtr< Gst::Querycreate_segment (Gst::Format format)
 Constructs a new segment query object. More...
 
static Glib::RefPtr< Gst::Querycreate_caps (Glib::RefPtr< Gst::Caps > filter)
 Constructs a new query object for querying the caps. More...
 
static Glib::RefPtr< Gst::Querycreate_accept_caps (Glib::RefPtr< Gst::Caps > filter)
 Constructs a new query object for querying if filter are accepted. More...
 

Additional Inherited Members

- Public Types inherited from Gst::MiniObject
typedef sigc::slot< void > SlotFinalizer
 
- Protected Member Functions inherited from Gst::Query
void operator delete (void*, std::size_t)
 
- Protected Member Functions inherited from Gst::MiniObject
void operator delete (void*, std::size_t)
 
- Static Protected Member Functions inherited from Gst::Query
template<class QueryType >
static Glib::RefPtr< QueryTypewrap (GstQuery* query, bool take_copy=false)
 

Detailed Description

A new scheduling query object.

See create() for more details.

Member Function Documentation

◆ add_allocation_meta()

void Gst::QueryAllocation::add_allocation_meta ( GType  api,
const Gst::Structure params 
)

Add api with params as one of the supported metadata API to query.

Parameters
apithe metadata API.
paramsAPI specific parameters.

◆ add_allocation_param()

void Gst::QueryAllocation::add_allocation_param ( const Glib::RefPtr< Gst::Allocator >&  allocator,
const Gst::AllocationParams params 
)

Add allocator and its params as a supported memory allocator.

Parameters
allocatorthe memory allocator.
paramsa Gst::AllocationParams.

◆ create()

static Glib::RefPtr<Gst::QueryAllocation> Gst::QueryAllocation::create ( const Glib::RefPtr< Gst::Caps >&  caps,
bool  need_pool 
)
static

Constructs a new query object for querying the allocation properties.

Parameters
capsthe negotiated caps.
need_poolreturn a pool.
Returns
a new Gst::Query.

◆ find_allocation_meta()

bool Gst::QueryAllocation::find_allocation_meta ( GType  api,
guint &  index 
) const

Check if query has metadata api set.

When this function returns TRUE, index will contain the index where the requested API and the flags can be found.

Parameters
apithe metadata API.
indexthe index
Returns
true when api is in the list of metadata.

◆ get_n_allocation_metas()

guint Gst::QueryAllocation::get_n_allocation_metas ( ) const

Retrieve the number of values currently stored in the meta API array of the query's structure.

Returns
the metadata API array size as a guint.

◆ get_n_allocation_params()

guint Gst::QueryAllocation::get_n_allocation_params ( ) const

Retrieve the number of values currently stored in the allocator params array of the query's structure.

If no memory allocator is specified, the downstream element can handle the default memory allocator. The first memory allocator in the query should be generic and allow mapping to system memory, all following allocators should be ordered by preference with the preferred one first.

Returns
the allocator array size as guint.

◆ get_n_allocation_pools()

guint Gst::QueryAllocation::get_n_allocation_pools ( ) const

Retrieve the number of values currently stored in the pool array of the query's structure.

Returns
the pool array size as a guint.

◆ parse()

void Gst::QueryAllocation::parse ( Glib::RefPtr< Gst::Caps >&  caps,
bool &  need_pool 
) const

Parse an allocation query, writing the requested caps in caps and whether a pool is needed in need_pool, if the respective parameters are non-NULL.

Parameters
capsthe Gst::Caps.
need_poolwhether a Gst::BufferPool is needed.

◆ parse_nth_allocation_meta()

GType Gst::QueryAllocation::parse_nth_allocation_meta ( guint  index,
Gst::Structure params 
) const

Parse an available query and get the metadata API at index of the metadata API array.

Parameters
indexposition in the metadata API array to read.
paramsAPI specific flags.

◆ parse_nth_allocation_param()

void Gst::QueryAllocation::parse_nth_allocation_param ( guint  index,
Glib::RefPtr< Gst::Allocator >&  allocator,
Gst::AllocationParams params 
) const

Parse an available query and get the alloctor and its params at index of the allocator array.

Parameters
indexposition in the allocator array to read.
allocatorvariable to hold the result.
paramsparameters for the allocator.

◆ remove_nth_allocation_meta()

void Gst::QueryAllocation::remove_nth_allocation_meta ( guint  index)

Remove the metadata API at index of the metadata API array.

Parameters
indexpositon in the metadata API array to remove.

◆ remove_nth_allocation_param()

void Gst::QueryAllocation::remove_nth_allocation_param ( guint  index)

Remove the allocation param at index of the allocation param array.

Parameters
indexposition in the allocation param array to remove

◆ remove_nth_allocation_pool()

void Gst::QueryAllocation::remove_nth_allocation_pool ( guint  index)

Remove the allocation pool at index of the allocation pool array.

Parameters
indexposition in the allocation pool array to remove.

◆ set_nth_allocation_param()

void Gst::QueryAllocation::set_nth_allocation_param ( guint  index,
const Glib::RefPtr< Gst::Allocator >&  allocator,
const Gst::AllocationParams params 
)

Parse an available query and get the alloctor and its params at index of the allocator array.

Parameters
indexposition in the allocator array to set.
allocatornew allocator to set.
paramsparameters for the allocator.