Functions returning glib::types:Type (aka GType)

Russel Winder russel at
Mon May 20 16:05:12 UTC 2019

On Mon, 2019-05-20 at 18:13 +0300, Sebastian Dröge wrote:
> On Mon, 2019-05-20 at 15:41 +0100, Russel Winder wrote:
> > Hi,
> > 
> > Many of the types in the MPEG-TS library have an associated _get_type
> > function, for example gst_mpegts_section_get_type. Doing a grep on the
> > GStreamer source, I see some usages of these functions and I see
> > declarations
> > of the functions, but I do not see any definitions of the functions. Where
> > are
> > the definitions of these functions?
> From the G_DEFINE_BOXED_TYPE macro, G_DEFINE_TYPE, etc.

Curses, I had forgotten that – and I was working with them last November!

I think enums must be treated differently to structs. In particular the audio
library has an enum AudioChannelPosition and there is a function
gst_audio_channel_position_get_type. However I cannot find any G_DEFINE…
applied to AudioChannelPosition in the GStreamer source. Hopefully this is
just a problem with my use of grep.

Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the gstreamer-devel mailing list