# Gst::QueryFormats Class Reference

A formats query object. More...

Inherits Gst::Query.

Collaboration diagram for Gst::QueryFormats:
[legend]

List of all members.

## Public Member Functions

| QueryFormats (GstQuery* query)
void | set (const Glib::ArrayHandle< Format >& formats)
| Set the formats query result fields.
void | set (int n_formats, const Glib::ArrayHandle< Format >& formats)
| Set the formats query result fields using only n_formats from formats.
guint | parse_length () const
| Parse and return the number of formats in the formats query.
Format | parse (guint nth) const
| Parse the format query and return the nth format from it.

## Static Public Member Functions

static Glib::RefPtr< Gst::Query > | create ()
| Constructs a new query object for querying formats of the stream.

## Detailed Description

A formats query object.

See create() for more details.

## Constructor & Destructor Documentation

Gst::QueryFormats::QueryFormats | ( | GstQuery * | query | ) | `[explicit]`

## Member Function Documentation

static Glib::RefPtr<Gst::Query> Gst::QueryFormats::create | ( |  | ) | `[static]`

Constructs a new query object for querying formats of the stream.

Returns:
  The new Gst::QueryFormats.

Format Gst::QueryFormats::parse | ( | guint | nth | ) | const

Parse the format query and return the nth format from it.

If the list contains less elements than nth, Gst::FORMAT_UNDEFINED will be returned.

Parameters:

  | nth | The index of the format to return.

Returns:
  the nth format or Gst::FORMAT_UNDEFINED.

guint Gst::QueryFormats::parse_length | ( |  | ) | const

Parse and return the number of formats in the formats query.

Returns:
  The number of formats in this query.

void Gst::QueryFormats::set | ( | int | n_formats,
|  | const Glib::ArrayHandle< Format >& | formats |
| ) |  |  |

Set the formats query result fields using only n_formats from formats.

The number of formats passed in the formats array must be greater than or equal to n_formats.

Parameters:

  | n_formats | The number of formats to set.
  | formats | An array containing at least n_formats Gst::Format values.

void Gst::QueryFormats::set | ( | const Glib::ArrayHandle< Format >& | formats | ) |

Set the formats query result fields.

All the formats in the array are used.

Parameters:

  | formats | An array containing Gst::Format values.

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

- gstreamermm/query.h