mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 05:38:58 +00:00
Original commit message from CVS: 2005-06-28 Andy Wingo <wingo@pobox.com> * *.c: Don't cast to GST_OBJECT when reffing or unreffing. Large source-munging commit!!!
26 lines
454 B
C
26 lines
454 B
C
|
|
#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++) {
|
|
g_usleep (1000);
|
|
g_print ("%s", (i & 1) ? "+" : "-");
|
|
}
|
|
g_print ("\n");
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
gst_object_unref (pipeline);
|
|
}
|