Skip to content

Instantly share code, notes, and snippets.

@yujuwon
Created July 17, 2013 04:25
Show Gist options
  • Select an option

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

Select an option

Save yujuwon/6017689 to your computer and use it in GitHub Desktop.
#include <gst/gst.h>
int main(int argc, char* argv[])
{
GstElement *bin, *pipeline, *source, *sink;
/* init */
gst_init(&argc, &argv);
/* create */
pipeline = gst_pipeline_new("my_pipeline");
bin = gst_bin_new("my_bin");
source = gst_element_factory_make("fakesrc", "source");
sink = gst_element_factory_make("fakesink", "sink");
/* First add the elements to the bin */
gst_bin_add_many(GST_BIN(bin), source, sink, NULL);
/* add the bin to the pipeline */
gst_bin_add(GST_BIN(pipeline), bin);
/* link the elements */
gst_element_link(source, sink);
[...]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment