fixing *wtay*'s code

Original commit message from CVS:
fixing *wtay*'s code
This commit is contained in:
Thomas Vander Stichele 2002-06-02 15:48:30 +00:00
parent 07e1cc4b5c
commit fc20b3f975

View file

@ -88,23 +88,25 @@ make_mp3_pipeline (const gchar *location)
{ {
GstElement *pipeline; GstElement *pipeline;
GstElement *src, *decoder, *osssink; GstElement *src, *decoder, *osssink;
GstElement *thread, *queue;
GstPad *seekable; GstPad *seekable;
pipeline = gst_pipeline_new ("app"); pipeline = gst_pipeline_new ("app");
src = gst_element_factory_make ("filesrc", "src"); src = gst_element_factory_make_or_warn ("filesrc", "src");
decoder = gst_element_factory_make ("mad", "dec"); decoder = gst_element_factory_make_or_warn ("mad", "dec");
osssink = gst_element_factory_make ("osssink", "sink"); osssink = gst_element_factory_make_or_warn ("osssink", "sink");
queue = gst_element_factory_make_or_warn ("queue", "queue");
thread = gst_thread_new ("playback");
g_object_set (G_OBJECT (src), "location", location, NULL); g_object_set (G_OBJECT (src), "location", location, NULL);
g_object_set (G_OBJECT (osssink), "fragment", 0x00180008, NULL); g_object_set (G_OBJECT (osssink), "fragment", 0x00180008, NULL);
gst_bin_add (GST_BIN (pipeline), src); gst_bin_add_many (GST_BIN (thread), queue, osssink, NULL);
gst_bin_add (GST_BIN (pipeline), decoder); gst_bin_add_many (GST_BIN (pipeline), src, decoder, thread, NULL);
gst_bin_add (GST_BIN (pipeline), osssink);
gst_element_connect (src, decoder); gst_element_connect_many (src, decoder, queue, NULL);
gst_element_connect (decoder, osssink); gst_element_connect_many (queue, osssink, NULL);
seekable = gst_element_get_pad (decoder, "src"); seekable = gst_element_get_pad (decoder, "src");
seekables = g_list_prepend (seekables, seekable); seekables = g_list_prepend (seekables, seekable);
@ -158,7 +160,7 @@ make_avi_pipeline (const gchar *location)
//v_decoder = gst_element_factory_make ("identity", "v_dec"); //v_decoder = gst_element_factory_make ("identity", "v_dec");
v_decoder = gst_element_factory_make ("windec", "v_dec"); v_decoder = gst_element_factory_make ("windec", "v_dec");
video_thread = gst_thread_new ("v_decoder_thread"); video_thread = gst_thread_new ("v_decoder_thread");
videosink = gst_element_factory_make ("xvideosink", "v_sink"); videosink = gst_element_factory_make ("sdlvideosink", "v_sink");
//videosink = gst_element_factory_make ("fakesink", "v_sink"); //videosink = gst_element_factory_make ("fakesink", "v_sink");
//g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL); //g_object_set (G_OBJECT (videosink), "sync", TRUE, NULL);
v_queue = gst_element_factory_make ("queue", "v_queue"); v_queue = gst_element_factory_make ("queue", "v_queue");
@ -268,9 +270,7 @@ static seek_format seek_formats[] =
{ {
{ "tim", GST_FORMAT_TIME }, { "tim", GST_FORMAT_TIME },
{ "byt", GST_FORMAT_BYTES }, { "byt", GST_FORMAT_BYTES },
{ "smp", GST_FORMAT_SAMPLES }, { "uni", GST_FORMAT_UNITS },
{ "frm", GST_FORMAT_FRAMES },
{ "fld", GST_FORMAT_FIELDS },
{ "buf", GST_FORMAT_BUFFERS }, { "buf", GST_FORMAT_BUFFERS },
{ "def", GST_FORMAT_DEFAULT }, { "def", GST_FORMAT_DEFAULT },
{ NULL, 0 }, { NULL, 0 },