Last active
December 20, 2015 05:09
-
-
Save yujuwon/6076433 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #include <gst/gst.h> | |
| int main(int argc, char* argv[]) | |
| { | |
| GstElement* pipeline; | |
| GstElement* source, *filter, *sink; | |
| gst_init(&argc, &argv); | |
| /* creatae pipeline */ | |
| pipeline = gst_pipeline_new("my_pipeline"); | |
| /* create element */ | |
| source = gst_element_factory_make("fakesrc", "source"); | |
| filter = gst_element_factory_make("identity", "filter"); | |
| sink = gst_element_factory_make("fakesink", "sink"); | |
| /* must add elements to pipeline before linking them */ | |
| gst_bin_add_many(GST_BIN(pipeline), source, filter, sink, NULL); | |
| /* link */ | |
| if(!gst_element_link_many(source, filter, sink, NULL)){ | |
| g_warning("Failed to link elements!"); | |
| } | |
| ..... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment