Re: Read frame by frame mp4 file, need example.
Антон Шаров
sharov_am at mail.ru
Fri Jul 28 09:51:55 UTC 2023
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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230728/18514152/attachment.htm>
More information about the gstreamer-devel
mailing list