Last active
January 20, 2022 10:01
-
-
Save josebraga/6a72e85236d56d4af40dcf5671f90ae9 to your computer and use it in GitHub Desktop.
gstreamer: print name of all pipeline elements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
while (res == GST_ITERATOR_OK) { | |
GstElement* element = GST_ELEMENT_CAST (g_value_get_object (&item)); | |
gchar *name = gst_object_get_name(GST_OBJECT (element)); | |
g_print("\t- %s \n", name); | |
res = gst_iterator_next (iter, &item); | |
} | |
g_value_unset (&item); | |
gst_iterator_free (iter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment