<html><head></head><body><div class="ydpf6d9c46ayahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div dir="ltr" data-setdir="false">for question 1: <br></div><div dir="ltr" data-setdir="false">Steps:</div><div dir="ltr" data-setdir="false">1. set pipeline state to null<br></div><div dir="ltr" data-setdir="false">2. disconnect <span>decodebin ! appsink</span> from <span>filesrc</span></div><div dir="ltr" data-setdir="false">3. set new location to filesrc</div><div dir="ltr" data-setdir="false">4. reconnect <span><span>decodebin ! appsink</span> to <span>filesrc</span></span></div><div dir="ltr" data-setdir="false">5. set pipeline state to play<br></div>
        
        </div><div id="yahoo_quoted_2084088024" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Monday, August 7, 2023, 08:45:50 a.m. EDT, Антон Шаров via gstreamer-devel <gstreamer-devel@lists.freedesktop.org> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="yiv4266842845">
<div><div>Hi.</div><div> </div><div>I have following  pipeline filesrc ! decodebin ! appsink</div><div>By some condition I need to exctract some frame (cond. for now is exact frame number):</div><div><div><div>(here is code sample on C#)</div><div> </div><div><div><div>  var fileSrc = readerPipe.GetByName("filesrc");</div><div>   fileSrc["location"] = videoFile; // new file to read from</div></div></div><div> </div><div>   var appSink = (AppSink) readerPipe.GetByName("my_appsink");</div><div>   readerPipe.SetName($"file {videoFile} frame_stepper");</div><div>   var q = readerPipe.SetState(State.Playing);</div></div><div>   var step = 1;</div><div><div>   while (step < frameNumber)</div><div>        {</div><div>            appSink.PullSample();</div><div>            step++;</div><div>        }</div><div> </div><div>The questions:</div><ol><li>It seems that it doesn’t matter what video file is set, it will always read from first setuped file. How to reset pipeline to read from new file? Should I create new pipeline or can I reset given pipeline so it can read from given file?</li><li>What is the best and fastest pipeline to read frame-by-frame from file ? Maybe the one above is not goot,  maybe playbin + appsink is better?</li></ol><div>​​​​​​​Thanks in advance.</div></div></div><div> </div><div> </div></div>
</div></div>
            </div>
        </div></body></html>