Created
December 8, 2016 18:30
-
-
Save tetkuz/23d618f2a73e6f6dd1dd5f9d276d87f9 to your computer and use it in GitHub Desktop.
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
#include <gst/gst.h> | |
#include <glib.h> | |
int main(int argc, char *argv[]) | |
{ | |
GString *launch_str; | |
GstElement *pipeline; | |
GstBus *bus; | |
GstMessage *msg; | |
gst_init(&argc, &argv); | |
launch_str = g_string_new("fakesrc num-buffers=100 ! fakesink"); | |
pipeline = gst_parse_launch (launch_str->str, NULL); | |
if (pipeline == NULL) { | |
g_print("parse_launch fail.\n"); | |
return 1; | |
} | |
gst_element_set_state (pipeline, GST_STATE_PLAYING); | |
bus = gst_element_get_bus (pipeline); | |
msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR, GST_CLOCK_TIME_NONE); | |
if (msg) { | |
(void)msg; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment