gstreamermm 0.10.10
Public Member Functions | Static Public Member Functions

Gst::QuerySegment Class Reference

A new segment query object. More...

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

List of all members.

Public Member Functions

 QuerySegment (GstQuery* query)
void set (double rate, Format format, gint64 start_value, gint64 stop_value)
 Answer a segment query by setting the requested values.
void parse (double& rate, Format& format, gint64& start_value, gint64& stop_value) const
 Parse a segment query answer.
double parse_rate () const
 Parse a segment query answer, returning the rate.
Format parse_format () const
 Parse a segment query answer, returning the format.
gint64 parse_start () const
 Parse a segment query answer, returning the start value.
gint64 parse_stop () const
 Parse a segment query answer, returning the stop value.

Static Public Member Functions

static Glib::RefPtr< Gst::Querycreate (Format format)
 Constructs a new segment query object.

Detailed Description

A new segment query object.

See create() for more details.


Constructor & Destructor Documentation

Gst::QuerySegment::QuerySegment ( GstQuery *  query) [explicit]

Member Function Documentation

static Glib::RefPtr<Gst::Query> 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.
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.
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.
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.
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.
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.
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.

The documentation for this class was generated from the following file: