Format

class Format

Standard predefined formats

Methods

class Format
get_by_nick(nick: str) Format

Return the format registered with the given nick.

Parameters:

nick – The nick of the format

get_details(format: Format) FormatDefinition | None

Get details about the given format.

Parameters:

format – The format to get details of

get_name(format: Format) str | None

Get a printable name for the given format. Do not modify or free.

Parameters:

format – a Format

iterate_definitions() Iterator

Iterate all the registered formats. The format definition is read only.

register(nick: str, description: str) Format

Create a new GstFormat based on the nick or return an already registered format with that nick.

Parameters:
  • nick – The nick of the new format

  • description – The description of the new format

to_quark(format: Format) int

Get the unique quark for the given format.

Parameters:

format – a Format

Fields

class Format
BUFFERS

Buffers (few, if any, elements implement this as of May 2009)

BYTES

Bytes

DEFAULT

The default format of the pad/element. This can be samples for raw audio, frames/fields for raw video (some, but not all, elements support this; use GST_FORMAT_TIME if you don’t have a good reason to query for samples/frames)

PERCENT

Percentage of stream (few, if any, elements implement this as of May 2009)

TIME

Time in nanoseconds

UNDEFINED

Undefined format