Skip to content

Instantly share code, notes, and snippets.

@yujuwon
Created July 26, 2013 06:50
Show Gist options
  • Select an option

  • Save yujuwon/6086816 to your computer and use it in GitHub Desktop.

Select an option

Save yujuwon/6086816 to your computer and use it in GitHub Desktop.
#inlcude <gst/gst.h>
int main(int argc, char* argv[])
{
GstElement* bin, *sink;
gstpad* pad;
/* init */
gst_init(&argc, &argv);
/* create element, add to bin */
sink = gst_element_factory_make("fakesink", "sink");
bin = gst_bin_new("mybin");
gst_bin_add(GST_BIN(bin), sink);
/* add ghostpad */
pad = gst_element_get_static_pad(sink, "sink");
gst_element_add_pad(bin, gst_ghost_pad_new("sink", pad));
gst_object_unref(GST_OBJECT(pad));
[...]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment