Re: Read frame by frame mp4 file, need exampl e.

Антон Шаров via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <[email protected]>
Thank you so much, I made it working. Main steps following:
 var appSink = new AppSink("my_appsink");
 appSink["sync"] = true; // what this setting do, btw?
pipeline.SetState(State.Playing); // most important setting, not paused state
 
 while (_doLoop)
            {
             
                var sample = appSink.PullSample();
                _doLoop = TrySaveSampleToFile(sample,counter);
                counter++;
                var result = pipeline.QueryPosition(Format.Buffers, out var pos);
                result = pipeline.QueryPosition(Format.Bytes, out var bts);
                result = pipeline.QueryPosition(Format.Time, out var time);
                result = pipeline.QueryPosition(Format.Default, out var def);
                System.Diagnostics.Debug.WriteLine($"[cnt={counter}]  time = {time}, pos = {pos}, def ={def}, bytes = {bts}");
             }
 
 
Few questions remaining:
1)what is appSink["sync"] actually means?
2)
[cnt=1]  time = 4189794700, pos = -1, def =0, bytes = -1
===NEW STEP EVENT RAISE=====
[cnt=2]  time = 4460944600, pos = -1, def =0, bytes = -1
===NEW STEP EVENT RAISE=====
[cnt=3]  time = 4750251000, pos = -1, def =0, bytes = -1
===NEW STEP EVENT RAISE=====
[cnt=4]  time = 5028356600, pos = -1, def =0, bytes = -1
 
Why in query code above only time varies?
 
Again, thank you very much ,  Mathieu! 
 
 
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.