mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
Updated the examples exit if the pipeline doesn't want to go to the playing state.
Original commit message from CVS: Updated the examples exit if the pipeline doesn't want to go to the playing state.
This commit is contained in:
parent
b285388f51
commit
d61cbc8ea0
2 changed files with 8 additions and 5 deletions
|
@ -64,13 +64,13 @@ Record sound from your sound input and encode it into an ogg file:
|
|||
gstreamer-launch not only handles audio but video as well:
|
||||
For mpeg1 files (video and audio streams respectively):
|
||||
|
||||
gstreamer-launch disksrc location=video.mpg ! mpeg1parse video_00! queue ! { mp1videoparse ! mpeg_play ! sdlvideosink }
|
||||
gstreamer-launch disksrc location=video.mpg ! mpeg1parse audio_00! queue ! { mad ! osssink }
|
||||
gstreamer-launch disksrc location=video.mpg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink }
|
||||
gstreamer-launch disksrc location=video.mpg ! mpegdemux audio_00! { queue ! mad ! osssink }
|
||||
|
||||
For mpeg2 files (video and audio streams respectively):
|
||||
|
||||
gstreamer-launch disksrc location=video.mpeg ! mpeg2parse video_0! queue ! { mpeg2dec ! sdlvideosink }
|
||||
gstreamer-launch disksrc location=video.mpeg ! mpeg2parse private_stream_1.0! queue ! { ac3dec ! osssink }
|
||||
gstreamer-launch disksrc location=video.mpeg ! mpegdemux video_00! { queue ! mpeg2dec ! sdlvideosink }
|
||||
gstreamer-launch disksrc location=video.mpeg ! mpegdemux private_stream_1.0! { queue ! ac3dec ! osssink }
|
||||
|
||||
Note: The types of audio streams in the mpeg files can vary!
|
||||
|
||||
|
|
|
@ -167,7 +167,10 @@ main(int argc, char *argv[])
|
|||
arg_search(GST_BIN(pipeline),"xid",xid_handler,NULL);
|
||||
|
||||
fprintf(stderr,"RUNNING pipeline\n");
|
||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS) {
|
||||
fprintf(stderr,"pipeline doesn't want to play\n");
|
||||
exit (-1);
|
||||
}
|
||||
|
||||
g_idle_add(idle_func,pipeline);
|
||||
#ifdef USE_GLIB2
|
||||
|
|
Loading…
Reference in a new issue