How to reuse pipeline to read different mp4 f iles. Few questions.

Антон Шаров via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <[email protected]>
Hi.
 
I have following  pipeline filesrc ! decodebin ! appsink
By some condition I need to exctract some frame (cond. for now is exact frame number):
(here is code sample on C#)
 
  var fileSrc = readerPipe.GetByName("filesrc");
   fileSrc["location"] = videoFile; // new file to read from
 
   var appSink = (AppSink) readerPipe.GetByName("my_appsink");
   readerPipe.SetName($"file {videoFile} frame_stepper");
   var q = readerPipe.SetState(State.Playing);
   var step = 1;
   while (step < frameNumber)
        {
            appSink.PullSample();
            step++;
        }
 
The questions:
*  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?
*  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?
​​​​​​​Thanks in advance.
 
 
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.