I changed this code to restart the video, this is not a problem, the biggest problem is that onBusMessage is never called, it never enter in onBusMessage.<br><br><div class="gmail_quote">2010/10/28 <a href="mailto:thiagossantos@gmail.com">thiagossantos@gmail.com</a> <span dir="ltr"><<a href="mailto:thiagossantos@gmail.com">thiagossantos@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br><br><div class="gmail_quote"><div class="im">On Thu, Oct 28, 2010 at 10:32 PM, Marlos C. Machado <span dir="ltr"><<a href="mailto:marlos@dcc.ufmg.br" target="_blank">marlos@dcc.ufmg.br</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
The main loop is in myApp.go, its a superclass.<br><br>On the create scene, before the main loop I call: gst_bus_add_watch(bus, onBusMessage, getUserData(mPlayer));</blockquote></div><div><br>Ok, if you're getting the EOS on the bus and sets the pipeline to NULL, the video will stop. It seems that it should restart if the user presses space from the code. Is that failing?<br>
<br>To restart the video, simply use gst_element_seek_simple when getting EOS:<br><a href="http://www.gstreamer.net/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-seek-simple" target="_blank">http://www.gstreamer.net/data/doc/gstreamer/head/gstreamer/html/GstElement.html#gst-element-seek-simple</a><br>
<br><br></div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div><br><br><br><div class="gmail_quote">
2010/10/28 <a href="mailto:thiagossantos@gmail.com" target="_blank">thiagossantos@gmail.com</a> <span dir="ltr"><<a href="mailto:thiagossantos@gmail.com" target="_blank">thiagossantos@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br><br><div class="gmail_quote"><div>On Thu, Oct 28, 2010 at 9:59 PM, Marlos C. Machado <span dir="ltr"><<a href="mailto:marlos@dcc.ufmg.br" target="_blank">marlos@dcc.ufmg.br</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I didnt do that because I posted the url where it is...<br><br>The whole code is attached.<br></blockquote></div><div><br>Are you getting the EOS message? I don't see any mainloop or code popping message from the bus on this sample (unless it is done on the superclass).<br>
</div><div><div></div><div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br><div class="gmail_quote">2010/10/28 <a href="mailto:thiagossantos@gmail.com" target="_blank">thiagossantos@gmail.com</a> <span dir="ltr"><<a href="mailto:thiagossantos@gmail.com" target="_blank">thiagossantos@gmail.com</a>></span><div>
<div></div><div><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br><br><div class="gmail_quote"><div>On Wed, Oct 27, 2010 at 6:17 PM, Marlos C. Machado <span dir="ltr"><<a href="mailto:marlos@dcc.ufmg.br" target="_blank">marlos@dcc.ufmg.br</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I've tried to seek the video out of the callback function and it fails, why?<br></blockquote></div><div><br>That is hard to guess. Maybe you should provide a snippet of your code to make it easier to identify the problem.<br>
</div><div><div></div><div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br><div class="gmail_quote">2010/10/27 Marlos C. Machado <span dir="ltr"><<a href="mailto:marlos@dcc.ufmg.br" target="_blank">marlos@dcc.ufmg.br</a>></span><div>
<div></div><div><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Thanks for answering, but it is not working in my app.<br><br>The bus that catches EOS messages is never called, I mean, even when the video is over I do not know since the function is not invoked. Have this ever happened to you?<br>
<br>The code I'm using is in the link I posted.<br><br>Anyway, thanks for answering and providing an example.<br><br><div class="gmail_quote">2010/10/27 Tristan Matthews <span dir="ltr"><<a href="mailto:tristan@sat.qc.ca" target="_blank">tristan@sat.qc.ca</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>Hi Marlos,<br><br>You should have a bus callback as described here:<br>
<a href="http://www.gstreamer.net/data/doc/gstreamer/head/manual/html/chapter-bus.html#section-bus-howto" target="_blank">http://www.gstreamer.net/data/doc/gstreamer/head/manual/html/chapter-bus.html#section-bus-howto</a><br>
that will catch EOS messages, which are emitted when your stream is done playback. Upon getting this message, you need to call gst_element_seek on your playbin element with a seek position of 0, which will tell it to restart.<br>
<br>I posted a simple example here:<br><a href="http://tristanswork.blogspot.com/2010/10/looping-playback-with-gstreamer.html" target="_blank">http://tristanswork.blogspot.com/2010/10/looping-playback-with-gstreamer.html</a><br>
<br>-t<br><font color="#888888">
<br>-- <br>Tristan Matthews<br>email: <a href="mailto:tristan@sat.qc.ca" target="_blank">tristan@sat.qc.ca</a><br>web: <a href="http://tristanswork.blogspot.com" target="_blank">http://tristanswork.blogspot.com</a><br>
</font><br></div></div>------------------------------------------------------------------------------<br>
Nokia and AT&T present the 2010 Calling All Innovators-North America contest<br>
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada<br>
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing<br>
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store<br>
<a href="http://p.sf.net/sfu/nokia-dev2dev" target="_blank">http://p.sf.net/sfu/nokia-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><font color="#888888"><br><br clear="all"><br>-- <br>Marlos Cholodovskis Machado<br><br><br>
</font></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>Marlos Cholodovskis Machado<br><br><br>
</font><br>------------------------------------------------------------------------------<br>
Nokia and AT&T present the 2010 Calling All Innovators-North America contest<br>
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada<br>
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing<br>
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store<br>
<a href="http://p.sf.net/sfu/nokia-dev2dev" target="_blank">http://p.sf.net/sfu/nokia-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>Thiago Sousa Santos<br>
</font><br>------------------------------------------------------------------------------<br>
Nokia and AT&T present the 2010 Calling All Innovators-North America contest<br>
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada<br>
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing<br>
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store<br>
<a href="http://p.sf.net/sfu/nokia-dev2dev" target="_blank">http://p.sf.net/sfu/nokia-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>Marlos Cholodovskis Machado<br><br><br>
</font><br>------------------------------------------------------------------------------<br>
Nokia and AT&T present the 2010 Calling All Innovators-North America contest<br>
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada<br>
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing<br>
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store<br>
<a href="http://p.sf.net/sfu/nokia-dev2dev" target="_blank">http://p.sf.net/sfu/nokia-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>Thiago Sousa Santos<br>
</font><br>------------------------------------------------------------------------------<br>
Nokia and AT&T present the 2010 Calling All Innovators-North America contest<br>
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada<br>
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing<br>
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store<br>
<a href="http://p.sf.net/sfu/nokia-dev2dev" target="_blank">http://p.sf.net/sfu/nokia-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Marlos Cholodovskis Machado<br><br><br>
</div></div><br>------------------------------------------------------------------------------<br>
Nokia and AT&T present the 2010 Calling All Innovators-North America contest<br>
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada<br>
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing<br>
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store<br>
<a href="http://p.sf.net/sfu/nokia-dev2dev" target="_blank">http://p.sf.net/sfu/nokia-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net" target="_blank">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div></div></div><font color="#888888"><br><br clear="all"><br>-- <br>Thiago Sousa Santos<br>
</font><br>------------------------------------------------------------------------------<br>
Nokia and AT&T present the 2010 Calling All Innovators-North America contest<br>
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada<br>
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing<br>
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store<br>
<a href="http://p.sf.net/sfu/nokia-dev2dev" target="_blank">http://p.sf.net/sfu/nokia-dev2dev</a><br>_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Marlos Cholodovskis Machado<br><br><br>