Re: Read frame by frame mp4 file, need example.

Mathieu Duponchelle via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <[email protected]>
Hey, don't know about 2), but 1) means your processing code will
consume samples as fast as it can (but not faster). sync=true means
that rendering is synchronized to the clock, sync=false means appsink
will be paced by you pulling the samples out.

On Fri, 2023-07-28 at 12:51 +0300, Антон Шаров via gstreamer-devel
wrote:
> 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.