diff -r bfc97f675c60 -r f92cd43fea7d gmyth-stream/gmemcoder/src/gmencoder.c --- a/gmyth-stream/gmemcoder/src/gmencoder.c Wed May 23 21:34:48 2007 +0100 +++ b/gmyth-stream/gmemcoder/src/gmencoder.c Mon Jun 04 19:05:36 2007 +0100 @@ -662,12 +662,13 @@ gchar** audio_encode_prop, guint audio_rate) { - GstBus *bus = NULL; - GstElement *pipe = NULL; - GstElement *sink = NULL; + GstBus *bus = NULL; + GstElement *pipe = NULL; + GstElement *sink = NULL; GstElement *mux = NULL; GstElement *abin = NULL; GstElement *vbin = NULL; + GstElement *queue= NULL; GstPad *aux_pad = NULL; GstPad *mux_pad = NULL; #ifdef SUPPORT_MULT_INPUT @@ -688,6 +689,8 @@ if (mux == NULL) goto error; + queue = gst_element_factory_make ("queue", "queueu_sink"); + sink = gst_element_factory_make ("fdsink", "sink"); if (sink == NULL) @@ -695,6 +698,7 @@ g_object_set (G_OBJECT(sink), "fd", priv->fd, + "sync", FALSE, NULL); abin = _create_audio_bin (audio_encode, audio_encode_prop, audio_rate); @@ -706,7 +710,7 @@ goto error; // Finish Pipe - gst_bin_add_many (GST_BIN (pipe), abin, vbin, mux, sink, NULL); + gst_bin_add_many (GST_BIN (pipe), abin, vbin, mux, queue, sink, NULL); #ifdef SUPPORT_MULT_INPUT @@ -753,7 +757,7 @@ mux_pad = NULL; //Link mux with sink - gst_element_link (mux, sink); + gst_element_link_many (mux, queue, sink, NULL); bus = gst_pipeline_get_bus (GST_PIPELINE (pipe)); gst_bus_add_watch (bus, _pipeline_bus_cb, self); @@ -808,6 +812,7 @@ GstElement *bsrc = NULL; GstElement *src = NULL; + GstElement *queue = NULL; GstElement *aqueue = NULL; GstElement *vqueue = NULL; GstElement *decode = NULL; @@ -822,10 +827,11 @@ if (src == NULL) goto error; - decode = gst_element_factory_make ("decodebin2", "decode"); + decode = gst_element_factory_make ("decodebin", "decode"); if (decode == NULL) goto error; + queue = gst_element_factory_make ("queue", "queue_src"); aqueue = gst_element_factory_make ("queue", "aqueue"); if (aqueue == NULL) goto error; @@ -834,8 +840,8 @@ if (vqueue == NULL) goto error; - gst_bin_add_many (GST_BIN (bsrc), src, decode, aqueue, vqueue, NULL); - gst_element_link (src, decode); + gst_bin_add_many (GST_BIN (bsrc), src, queue, decode, aqueue, vqueue, NULL); + gst_element_link_many (src, queue, decode, NULL); g_signal_connect (G_OBJECT (decode), "new-decoded-pad",