# Gst::QuerySegment Class Reference

A new segment query object. More...

Inherits Gst::Query.

Collaboration diagram for Gst::QuerySegment:
[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::Query > | create (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:

  | format | The 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:

  | 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 | ( |  | ) | 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:

  | 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.

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

- gstreamermm/query.h