<div dir="ltr"><div><div><div><div><div><div>I think we need a bit more information before figuring this out. <br><br>Have you tried running and stopping a single pipeline? <br></div>What happens when you stop one video? Does the recording stop<br></div>or continue playing?<br></div>Are you sure the callbacks for the keys are working after launching the pipeline?<br></div>If you are running g-main_loop on your main thread it may be blocking the callbacks for<br></div>key events?<br><br></div>Dimitrios<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 3:39 PM, Michael Yarochkin <span dir="ltr"><<a href="mailto:michael.yarochkin@timetronics.be" target="_blank">michael.yarochkin@timetronics.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div>


<div dir="ltr">
<div id="m_-1975791287034119917x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt;color:#000000;font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hello, </p>
<p><br>
</p>
<p><span style="font-size:12pt">Don`t you need to use </span><br>
</p>
<p><span style="color:rgb(33,33,33);font-size:13.3333px">p1.set_state(Gst.State.<span>PAUSED</span>)</span></p>
<p><span style="color:rgb(33,33,33);font-size:13.3333px"><br>
</span></p>
<p><span style="color:rgb(33,33,33);font-size:13.3333px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">Just a guess. I can be
 wrong.</span><br>
</span></p>
<p><span style="color:rgb(33,33,33);font-size:13.3333px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px"><br>
</span></span></p>
<p><span style="color:rgb(33,33,33);font-size:13.3333px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px">Mikl</span></span></p>
</div>
<hr style="display:inline-block;width:98%">
<div id="m_-1975791287034119917x_divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> gstreamer-devel <<a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org" target="_blank">gstreamer-devel-bounces@<wbr>lists.freedesktop.org</a>> on behalf of <a href="mailto:whoman@gmail.com" target="_blank">whoman@gmail.com</a> <<a href="mailto:whoman@gmail.com" target="_blank">whoman@gmail.com</a>><br>
<b>Sent:</b> Tuesday, January 10, 2017 7:27:59 PM<br>
<b>To:</b> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<b>Subject:</b> Why can't I replay the same video twice with python?</font>
<div> </div>
</div>
</div><div><div class="h5">
<font size="2"><span style="font-size:10pt">
<div class="m_-1975791287034119917PlainText">Hello,<br>
I want to play 3 video files, like a piano.<br>
<br>
I have it working, however it will only play each video one time...<br>
2nd time I press any of the 3 keys, the video does not start playing<br>
again.<br>
No error messages returned.  GST acts as if it's doing everything as expected.<br>
<br>
I'm using python....  Here's the pertinent parts of my code:<br>
<br>
p1 = Gst.parse_launch ("filesrc location=file1.mp4 ! qtdemux !<br>
h264parse ! vaapidecodebin ! videoconvert ! vaapisink<br>
fullscreen=true")<br>
p2 = Gst.parse_launch ("filesrc location=file2.mp4 ! qtdemux !<br>
h264parse ! vaapidecodebin ! videoconvert ! vaapisink<br>
fullscreen=true")<br>
p3 = Gst.parse_launch ("filesrc location=file3.mp4 ! qtdemux !<br>
h264parse ! vaapidecodebin ! videoconvert ! vaapisink<br>
fullscreen=true")<br>
<br>
def StopAllPipelines():<br>
    #Stop all other pipelines<br>
    p1.set_state(Gst.State.NULL)<br>
    p2.set_state(Gst.State.NULL)<br>
    p3.set_state(Gst.State.NULL)<br>
<br>
def PlayVideo1():<br>
    StopAllPipelines()<br>
    p1.set_state(Gst.State.<wbr>PLAYING)<br>
<br>
def PlayVideo2():<br>
    StopAllPipelines()<br>
    p1.set_state(Gst.State.<wbr>PLAYING)<br>
<br>
def PlayVideo3():<br>
    StopAllPipelines()<br>
    p1.set_state(Gst.State.<wbr>PLAYING)<br>
<br>
I've tried deleting the pipeline variable references (p1 p2 and p3)<br>
and then recreating them, same result.<br>
I've tried setting p1 p2 and p3 to "None" and then recreating them, same result.<br>
<br>
The only thing I can think is that there's some kind of async issue,<br>
where my PlayVideo1() functions aren't waiting for StopAllPipelines()<br>
to finish, before trying to set the p1 state to PLAYING?<br>
I tried inserting a "p1.get_state(1)" in between, same result.<br>
Perhaps there's more that needs to be done between setting the states<br>
to NULL, then back to PLAYING<br>
<br>
Any ideas?<br>
______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
</div>
</span></font>
</div></div></div>

<br>______________________________<wbr>_________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/gstreamer-<wbr>devel</a><br>
<br></blockquote></div><br></div>