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

A new segment query object. More...

#include <gstreamermm/query.h>

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

Public Member Functions

void set (double rate, Format format, gint64 start_value, gint64 stop_value)
 Answer a segment query by setting the requested values. More...
 
void parse (double& rate, Format& format, gint64& start_value, gint64& stop_value) const
 Parse a segment query answer. More...
 
double parse_rate () const
 Parse a segment query answer, returning the rate. More...
 
Format parse_format () const
 Parse a segment query answer, returning the format. More...
 
gint64 parse_start () const
 Parse a segment query answer, returning the start value. More...
 
gint64 parse_stop () const
 Parse a segment query answer, returning the stop value. 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::QuerySegmentcreate (Format format)
 Constructs a new segment query object. 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 segment query object.

See create() for more details.

Member Function Documentation

◆ create()

static Glib::RefPtr<Gst::QuerySegment> Gst::QuerySegment::create ( Format  format)
static

Constructs a new segment query object.

A segment query is used to discover information about the currently configured segment for playback.

Parameters
formatThe Gst::Format for the new query.
Returns
The new Gst::QuerySegment.

◆ parse()

void Gst::QuerySegment::parse ( double &  rate,
Format format,
gint64 &  start_value,
gint64 &  stop_value 
) const

Parse a segment query answer.

See set() for an explanation of the function arguments. Use the other parse() methods to parse individual values.

Parameters
rateThe storage for the rate of the segment.
formatThe storage for the Gst::Format of the values.
start_valueThe storage for the start value.
stop_valueThe storage for the stop value.

◆ parse_format()

Format Gst::QuerySegment::parse_format ( ) const

Parse a segment query answer, returning the format.

See set() for an explanation of the function arguments.

Returns
The Gst::Format of the start and stop values.

◆ parse_rate()

double Gst::QuerySegment::parse_rate ( ) const

Parse a segment query answer, returning the rate.

See set() for an explanation of the function arguments.

Returns
The rate of the segment.

◆ parse_start()

gint64 Gst::QuerySegment::parse_start ( ) const

Parse a segment query answer, returning the start value.

See set() for an explanation of the function arguments.

Returns
The start value.

◆ parse_stop()

gint64 Gst::QuerySegment::parse_stop ( ) const

Parse a segment query answer, returning the stop value.

See set() for an explanation of the function arguments.

Returns
The stop value.

◆ set()

void Gst::QuerySegment::set ( double  rate,
Format  format,
gint64  start_value,
gint64  stop_value 
)

Answer a segment query by setting the requested values.

The normal playback segment of a pipeline is 0 to duration at the default rate of 1.0. If a seek was performed on the pipeline to play a different segment, this query will return the range specified in the last seek.

start_value and stop_value will respectively contain the configured playback range start and stop values expressed in format. The values are always between 0 and the duration of the media and start_value <= stop_value. rate will contain the playback rate. For negative rates, playback will actually happen from stop_value to start_value.

Parameters
rateThe rate of the segment.
formatThe Gst::Format of the segment values (start_value and stop_value).
start_valueThe start value.
stop_valueThe stop value.