gstreamermm 1.8.0

Public Member Functions | Public Attributes | List of all members
Gst::Fourcc Class Reference
gstreamermm Helper Classes

A class that represents a 4 byte identifier (used in codecs). More...

`#include <gstreamermm/value.h>`

## Public Member Functions
| Fourcc ()
| Construct an undefined Gst::Fourcc. More...
| Fourcc (const Fourcc& src)
| Construct a Gst::Fourcc from another. More...
| Fourcc (char first, char second, char third, char fourth)
| Construct a Gst::Fourcc from 4 characters. More...
| Fourcc (const Glib::ustring& s)
| Construct a Gst::Fourcc from an input string. More...
| Fourcc (guint32 fourcc)
| Construct a Gst::Fourcc from a 32 bit unsigned integer. More...
Fourcc& | operator= (const Fourcc& src)

## Public Attributes
char | first
char | second
char | third
char | fourth

## Detailed Description

A class that represents a 4 byte identifier (used in codecs).

Gst::Fourcc is used to store a four byte identifier in Gst::Structure of Gst::Caps as a value representing a property (see GStreamer Application Development Manual section 8.2.2 and GstValue docs). When the value is set, it is transformed to a GStreamer GType so retrieving the value is a bit different. The class can be used in setting and getting a Gst::Structure field like so:

Glib::Value<Gst::Fourcc> value;
value.init(Glib::Value<Gst::Fourcc>::value_type());
value.set(Gst::Fourcc('M', 'J', 'P', 'G'));
Gst::Structure structure("my-structure");
structure.set_field("id", value);
...
Glib::ValueBase gst_value;
structure.get_field("id", gst_value);
Gst::Fourcc fourcc(gst_value);
char first_char = fourcc.first;
...

Last reviewed on 2016-08-27 (1.8.0)

## Constructor & Destructor Documentation

## § Fourcc() [1/5]

Gst::Fourcc::Fourcc | ( |  | ) |

Construct an undefined Gst::Fourcc.

## § Fourcc() [2/5]

Gst::Fourcc::Fourcc | ( | const Fourcc& | src | ) |

Construct a Gst::Fourcc from another.

## § Fourcc() [3/5]

Gst::Fourcc::Fourcc | ( | char | first,
|  | char | second,
|  | char | third,
|  | char | fourth
| ) |  |

Construct a Gst::Fourcc from 4 characters.

## § Fourcc() [4/5]

Gst::Fourcc::Fourcc | ( | const Glib::ustring & | s | ) |
| explicit

Construct a Gst::Fourcc from an input string.

Caller is responsible for ensuring the input string consists of at least four characters.

## § Fourcc() [5/5]

Gst::Fourcc::Fourcc | ( | guint32 | fourcc | ) |
| explicit

Construct a Gst::Fourcc from a 32 bit unsigned integer.

## Member Function Documentation

## § operator=()

Fourcc& Gst::Fourcc::operator= | ( | const Fourcc& | src | ) |

## Member Data Documentation

## § first

char Gst::Fourcc::first

## § fourth

char Gst::Fourcc::fourth

## § second

char Gst::Fourcc::second

## § third

char Gst::Fourcc::third