#include <query.h>
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) |
Parse a segment query answer. | |
double | parse_rate () |
Parse a segment query answer, returning the rate. | |
Format | parse_format () |
Parse a segment query answer, returning the format. | |
gint64 | parse_start () |
Parse a segment query answer, returning the start value. | |
gint64 | parse_stop () |
Parse a segment query answer, returning the stop value. | |
Static Public Member Functions | |
static Glib::RefPtr<Gst::Query> | create (Format format) |
Constructs a new segment query object. |
See create() for more details.
Gst::QuerySegment::QuerySegment | ( | GstQuery * | query | ) | [explicit] |
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.
format | The Gst::Format for the new query. |
void Gst::QuerySegment::parse | ( | double & | rate, | |
Format& | format, | |||
gint64 & | start_value, | |||
gint64 & | stop_value | |||
) |
Parse a segment query answer.
See set() for an explanation of the function arguments. Use the other parse() methods to parse individual values.
rate | The storage for the rate of the segment. | |
format | The storage for the Gst::Format of the values. | |
start_value | The storage for the start value. | |
stop_value | The storage for the stop value. |
Format Gst::QuerySegment::parse_format | ( | ) |
Parse a segment query answer, returning the format.
See set() for an explanation of the function arguments.
double Gst::QuerySegment::parse_rate | ( | ) |
gint64 Gst::QuerySegment::parse_start | ( | ) |
gint64 Gst::QuerySegment::parse_stop | ( | ) |
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.
rate | The rate of the segment. | |
format | The Gst::Format of the segment values (start_value and stop_value). | |
start_value | The start value. | |
stop_value | The stop value. |