2004-04-20 22:22:01 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
do_test (void)
|
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
gst_init (NULL, NULL);
|
|
|
|
|
|
|
|
pipeline = gst_parse_launch ("fakesrc ! fakesink", NULL);
|
|
|
|
g_assert (pipeline != NULL);
|
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
|
|
|
|
for (i = 0; i < 100; i++) {
|
2005-03-10 12:51:45 +00:00
|
|
|
g_usleep (1000);
|
2004-04-20 22:22:01 +00:00
|
|
|
g_print ("%s", (i & 1) ? "+" : "-");
|
|
|
|
}
|
|
|
|
g_print ("\n");
|
|
|
|
|
2005-03-10 12:51:45 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
2005-06-28 09:59:01 +00:00
|
|
|
gst_object_unref (pipeline);
|
2004-04-20 22:22:01 +00:00
|
|
|
}
|