Re: Read frame by frame mp4 file, need example.
Антон Шаров
sharov_am at mail.ru
Thu Jul 27 16:09:51 UTC 2023
> You can safely ignore the preroll sample in your case, and simply block
>on PullSample in a loop, you also don't need to connect to the signals
>(NewSample, NewPreroll) at all.
And I actually block (thread block) and nothing happens. But I need to handle sample in my
event handler and it didn’t raised.
> Frame-stepping is for going for one sample to the next with any sink,
>but the level of control you get from appsink makes this feature
>irrelevant.
Clear, thank you.
>Четверг, 27 июля 2023, 18:57 +03:00 от Mathieu Duponchelle <mathieu at centricular.com>:
>
>You seem to be confusing concepts a bit, I can't answer your question.
>You can safely ignore the preroll sample in your case, and simply block
>on PullSample in a loop, you also don't need to connect to the signals
>(NewSample, NewPreroll) at all.
>
>Frame-stepping is for going for one sample to the next with any sink,
>but the level of control you get from appsink makes this feature
>irrelevant.
>
>On Thu, 2023-07-27 at 18:40 +0300, Антон Шаров via gstreamer-devel
>wrote:
>> Hi!
>>
>> Thank you for reply!
>>
>> > just set up appsink to be sync=false, pull preroll / samples (wait
>> > for
>> > signals only if you don't want to block), do your processing, rinse
>> > /
>> > repeat.
>>
>> I did as you advised (add sync=false) and call PullPreroll in a loops
>> —
>> https://gist.github.com/sharov-am/e895575c8d21753b77f2fa73d9b7ba1e an
>> d it blocks on appsink.PullPreroll or NewSample.
>> I’ve tried to set pipe into playing or paused state — nothing, not a
>> single event raised…
>>
>> What is the difference between PullPreroll and NewSample in this
>> specific approach?
>>
>> > frame-stepping doesn't need to enter the picture here,
>>
>> Then what for it is usefull? I thought it is manual frame iterating,
>> step by step. Than what it is useful
>> for?
>>
>> Thanks in advance.
--
С Уважением,
Шаров Антон
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230727/723ac956/attachment.htm>
More information about the gstreamer-devel
mailing list