Skip to content

Instantly share code, notes, and snippets.

@josebraga
josebraga / gstreamer-print-elements.c
Last active January 20, 2022 10:01
gstreamer: print name of all pipeline elements
g_print("\nPrint all elements of the pipeline\n");
GValue item = G_VALUE_INIT;
GstIterator *iter = gst_bin_iterate_elements(GST_BIN(data.pipeline));
GstIteratorResult res = gst_iterator_next (iter, &item);
@josebraga
josebraga / gstreamer-print-caps.c
Created January 20, 2022 10:00
gstreamer utility to print GstCaps
// Taken from tutorials
static gboolean print_field (GQuark field, const GValue * value, gpointer pfx) {
gchar *str = gst_value_serialize (value);
g_print ("%s %15s: %s\n", (gchar *) pfx, g_quark_to_string (field), str);
g_free (str);
return TRUE;
}