mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
add comments to show what pipeline is being constructed.
Original commit message from CVS: add comments to show what pipeline is being constructed. change threadstate3 to be { { fakesrc ! fakesink } } which doesn't change state once it has started
This commit is contained in:
parent
aadf0570fa
commit
995c529609
3 changed files with 16 additions and 3 deletions
|
@ -1,5 +1,10 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
/* this pipeline is:
|
||||
* { fakesrc ! fakesink }
|
||||
*/
|
||||
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
GstElement *fakesrc, *fakesink;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
/* this pipeline is:
|
||||
* { filesrc ! mad ! osssink }
|
||||
*/
|
||||
|
||||
/* eos will be called when the src element has an end of stream */
|
||||
void eos(GstElement *element, gpointer data)
|
||||
{
|
||||
|
@ -51,7 +55,7 @@ int main(int argc,char *argv[])
|
|||
for (x = 0 ; x < 10 ; x++){
|
||||
g_print("playing %d\n", x);
|
||||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);
|
||||
sleep(5);
|
||||
sleep(2);
|
||||
|
||||
g_print("pausing %d\n", x);
|
||||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PAUSED);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#include <gst/gst.h>
|
||||
|
||||
/* this pipeline is:
|
||||
* { { fakesrc ! fakesink } }
|
||||
*/
|
||||
|
||||
int main(int argc,char *argv[])
|
||||
{
|
||||
GstElement *fakesrc, *fakesink;
|
||||
|
@ -30,8 +34,8 @@ int main(int argc,char *argv[])
|
|||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PLAYING);
|
||||
sleep(1);
|
||||
|
||||
g_print("pausing %d\n", x);
|
||||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_PAUSED);
|
||||
g_print("nulling %d\n", x);
|
||||
gst_element_set_state(GST_ELEMENT(thread), GST_STATE_NULL);
|
||||
sleep(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue