<div dir="ltr">On 30 May 2015 at 05:19, Turmel, Frederic <span dir="ltr"><<a href="mailto:Frederic.Turmel@arris.com" target="_blank">Frederic.Turmel@arris.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">More on this, I was reading the design for the step event. (<a href="http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-framestep.txt" target="_blank">http://cgit.freedesktop.org/gstreamer/gstreamer/tree/docs/design/part-framestep.txt</a>)<br>
<br>
If I understand the step event correctly, a step event will skip the amount of frame specified in the event but those buffers/frames will be drop/flush. Then upon putting the pipeline to playing, it will start at the new position.<br>
<br>
If I'm correct, this may not be what I'm looking for. What I'm trying to achieve is pause the pipeline and play frame by frame with a trigger, my app control when the next frame is sent to the sink.<br>
<br>
I did a simple test using filesink as the sink with uncompressed video. Nothing is written when I trigger the frame stepping event. I tried with and without the flush flag with same result.<br>
<br>
Any ideas/suggestions?<br>
<br>
Thanks<br>
<span class="im"><br>
<br>
-----Original Message-----<br>
From: gstreamer-devel [mailto:<a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org">gstreamer-devel-bounces@lists.freedesktop.org</a>] On Behalf Of Tim Müller<br>
Sent: Friday, May 29, 2015 2:21 AM<br>
To: Discussion of the development of and with GStreamer<br>
Subject: Re: FrameStepping gstreamer1.x python and general<br>
<br>
</span><div class=""><div class="h5">On Fri, 2015-05-29 at 10:58 +0200, Thibault Saunier wrote:<br>
<br>
> As for frame stepping support, I do not think it is properly<br>
> implemented everywhere, best is to try it out and see/fix it/open a<br>
> bug if needed.<br>
<br>
Frame stepping is handled entirely by the sink base class and shouldn't require support from upstream elements (unless you want to step back, then it requires reverse playback support), so hopefully it to mostly just works whatever the source/demuxer/decoder (minus bugs of course, as Thibault said).<br>
<br>
Cheers<br>
-Tim<br>
<br>
--<br>
Tim Müller, Centricular Ltd - <a href="http://www.centricular.com" target="_blank">http://www.centricular.com</a><br></div></div></blockquote><div><br></div><div>Here you have an example:<br>-------------------------------------------------------------------------------------------------<br>#!/usr/bin/env python<br><br>from gi.repository import Gst, GObject, GLib<br><br>Gst.init(None)<br><br>pipe = Gst.Pipeline.new('pipe')<br>src = Gst.ElementFactory.make('videotestsrc')<br>sink = Gst.ElementFactory.make("autovideosink")<br><br>pipe.add(src)<br>pipe.add(sink)<br>src.link(sink)<br><br># pipe.set_state(Gst.State.PLAYING)<br>pipe.set_state(Gst.State.PAUSED)<br><br>def step():<br> print 'step'<br> sink.send_event(Gst.Event.new_step(Gst.Format.BUFFERS, 1, 1, True, False))<br> GLib.timeout_add(1000, step)<br><br>GLib.timeout_add(1000, step)<br><br>ml = GObject.MainLoop()<br>ml.run() <br>-------------------------------------------------------------------------------------------------<br><br></div><div>Run it and you can see that each frame will be displayed in the sink while staying in PAUSED state.<br><br></div><div>Not sure if/how filesink handles step events. Use the above code to play with frame stepping.<br><br></div><div>Thanks,<br></div><div>Luis<br></div></div></div></div>