Skip to content

Instantly share code, notes, and snippets.

@anselmobattisti
Created July 24, 2019 21:49
Show Gist options
  • Save anselmobattisti/0a7c765f4e50b98dbf2a6ea153b94329 to your computer and use it in GitHub Desktop.
Save anselmobattisti/0a7c765f4e50b98dbf2a6ea153b94329 to your computer and use it in GitHub Desktop.
Get the name os an object gstreamer
#include <glib.h>
#include <gst/gst.h>
int main(int argc, char *argv[]) {
gst_init (&argc, &argv);
GstElement *element;
element = gst_element_factory_make("fakesrc","source");
if (!element) g_print("Erro");
g_print("\n%s\n", gst_object_get_name(GST_OBJECT (element)));
gst_object_unref(GST_OBJECT (element));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment