<pre>Hi, sirs
Thank you very much for you reply of my questions!
And can you give me further support on the problems I found later that I
have posted above? 
Thank you!<br><br>I have build a simple player to process the "about-to-finish" signal, the
player uses playbin2 to build a pipeline and filesrc element to source the
MP4 files.
I used two mp4 files for testing the gapless playback, and the mp4 video can
play succesively except some problems:
1. there is no audio for the second clip
2. when the second clip start, the play position value get with function
"gst_element_query_position" keeps the value equaling to the duration of
first clip, which means it can not get the real play position of the second
clip
3. if I do a seek operation during the playing of the second mp4, the audio
will come and play position value will be the real position

So, could you please give me some more advices, thank you very much!<br><br>P.S. The following codes are used in my testing and pasted here for your information.<br><br>///********************************************************************************************///<br>void player_play (const char *uri)<br>{<br>    loop = g_main_loop_new (NULL, FALSE);<br><br>    pipeline = gst_pipeline_new ("gst-player");<br><br>    bin = gst_element_factory_make ("playbin2", "bin");<br>    videosink = gst_element_factory_make ("ximagesink", "videosink");<br>    audiosink = gst_element_factory_make ("alsasink", "alsasink");<br><br>    g_object_set (G_OBJECT (bin), "video-sink", videosink, NULL);<br>    g_object_set (G_OBJECT (bin), "audio-sink", audiosink, NULL);<br><br>    g_object_set (G_OBJECT (bin), "uri", uri, NULL);<br><br>    gst_bin_add (GST_BIN (pipeline), bin);<br><br>    if (GST_IS_X_OVERLAY (videosink))<br>    {<br>        gst_x_overlay_set_xwindow_id (GST_X_OVERLAY (videosink), GPOINTER_TO_INT (window));<br>    }    <br><br>   {<br>        GstBus *bus;<br>        bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));<br>        gst_bus_add_watch (bus, bus_cb, loop);<br>        g_signal_connect (bin, "about-to-finish", G_CALLBACK (about_to_finish_cb), uri_to_play);<br>        gst_object_unref (bus);<br>    }<br><br>    gst_element_set_state (pipeline, GST_STATE_PLAYING);<br><br>    g_print ("Running\n");<br>        <br>    ProgressBarID = g_timeout_add (1000, timeout, pipeline);<br><br>    g_main_loop_run (loop);<br>}<br><br>void about_to_finish_cb (GstElement * element, gchar * uri)<br>{<br>    g_object_set (G_OBJECT (element), "uri", uri, NULL);<br>}<br><br>///********************************************************************************************///<br><br><br>2011-06-09&nbsp;19:36:00£¬"Stefan&nbsp;Kost"&nbsp;&lt;<a href="http://gstreamer-devel.966125.n4.nabble.com/user/SendEmail.jtp?type=node&amp;node=3635265&amp;i=0" target="_top" rel="nofollow">[hidden email]</a>&gt; wrote£º
&gt;Am&nbsp;09.06.2011&nbsp;10:30,&nbsp;schrieb&nbsp;BING&nbsp;SHUANG:
&gt;&gt;&nbsp;Hi,
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;am&nbsp;working&nbsp;on&nbsp;a&nbsp;project&nbsp;needs&nbsp;to&nbsp;play&nbsp;several&nbsp;MP4&nbsp;files&nbsp;succesively,
&gt;&gt;&nbsp;which&nbsp;should&nbsp;be&nbsp;played&nbsp;continuously&nbsp;(succesively&nbsp;as&nbsp;it&nbsp;was&nbsp;only&nbsp;one&nbsp;file).
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Is&nbsp;it&nbsp;possible&nbsp;for&nbsp;this&nbsp;functions&nbsp;in&nbsp;gstreamer?
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;know&nbsp;there&nbsp;is&nbsp;a&nbsp;plugin&nbsp;named&nbsp;"applehlssrc"&nbsp;for&nbsp;playing&nbsp;.m3u8&nbsp;playlist
&gt;&gt;&nbsp;contains&nbsp;a&nbsp;list&nbsp;of&nbsp;".ts"&nbsp;stream,&nbsp;so&nbsp;I&nbsp;want&nbsp;to&nbsp;know&nbsp;is&nbsp;there&nbsp;such&nbsp;a&nbsp;plugin&nbsp;can
&gt;&gt;&nbsp;support&nbsp;a&nbsp;playlist&nbsp;contains&nbsp;a&nbsp;list&nbsp;of&nbsp;MP4&nbsp;files/streams&nbsp;and&nbsp;play&nbsp;succesively?
&gt;&gt;&nbsp;Which&nbsp;kind&nbsp;of&nbsp;playlist&nbsp;will&nbsp;it&nbsp;be?&nbsp;&nbsp;
&gt;
&gt;GStreamer&nbsp;won't&nbsp;do&nbsp;the&nbsp;playlist&nbsp;handling.&nbsp;But&nbsp;please&nbsp;have&nbsp;a&nbsp;look&nbsp;at&nbsp;gap-less
&gt;playback&nbsp;in&nbsp;playin2&nbsp;("about-to-finish"&nbsp;signal).&nbsp;You&nbsp;should&nbsp;be&nbsp;able&nbsp;to&nbsp;implement
&gt;your&nbsp;case&nbsp;with&nbsp;that.
&gt;
&gt;Stefan
&gt;
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Or&nbsp;how&nbsp;can&nbsp;I&nbsp;design&nbsp;a&nbsp;plugin&nbsp;in&nbsp;gstreamer&nbsp;for&nbsp;supporting&nbsp;suck&nbsp;kind&nbsp;of
&gt;&gt;&nbsp;functions?
&gt;&gt;&nbsp;
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I&nbsp;am&nbsp;newer&nbsp;in&nbsp;gstreamer&nbsp;and&nbsp;I&nbsp;really&nbsp;need&nbsp;your&nbsp;help.
&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thank&nbsp;you&nbsp;very&nbsp;much!
&gt;&gt;&nbsp;
&gt;&gt;&nbsp;&nbsp;
&gt;&gt;&nbsp;
&gt;&gt;&nbsp;Best&nbsp;Regards!
&gt;&gt;&nbsp;
&gt;&gt;&nbsp;&nbsp;
&gt;&gt;&nbsp;
<br><br>
</pre><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>