<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 19:36:00£¬"Stefan Kost" <<a href="http://gstreamer-devel.966125.n4.nabble.com/user/SendEmail.jtp?type=node&node=3635265&i=0" target="_top" rel="nofollow">[hidden email]</a>> wrote£º
>Am 09.06.2011 10:30, schrieb BING SHUANG:
>> Hi,
>> I am working on a project needs to play several MP4 files succesively,
>> which should be played continuously (succesively as it was only one file).
>> Is it possible for this functions in gstreamer?
>> I know there is a plugin named "applehlssrc" for playing .m3u8 playlist
>> contains a list of ".ts" stream, so I want to know is there such a plugin can
>> support a playlist contains a list of MP4 files/streams and play succesively?
>> Which kind of playlist will it be?
>
>GStreamer won't do the playlist handling. But please have a look at gap-less
>playback in playin2 ("about-to-finish" signal). You should be able to implement
>your case with that.
>
>Stefan
>
>> Or how can I design a plugin in gstreamer for supporting suck kind of
>> functions?
>>
>> I am newer in gstreamer and I really need your help.
>> Thank you very much!
>>
>>
>>
>> Best Regards!
>>
>>
>>
<br><br>
</pre><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>