Accessing video RGB data

Erick Pérez erick.red at gmail.com
Fri Oct 7 05:20:18 PDT 2011


>> I don't need to modify movie frames, but I need to read them and do
>> some calculations. Calculations might take some time, so I need a way
>> to control how gstreamers feeds the frames. That is, I need a way to
>> ask next frame from gstreamer instead of gstreamer feeding them at a
>> constant rate.
>>
>> How can I get a new frame only when requested?
>
> In your pad_probe just do the calculation as you need. ximagesink will
> throw away late frames. A smarter way might be to do:
>
> ... ! colorspace ! tee name = t ! queue leaky=upstream ! appsink
>                                              t. ! queue ! ximagesink
>
> This way you can use get the frames from appsink (better that using
> pad-probes or fakesink with the handoff signal). Also the playback gets
> not disturbed and you process the frames on appsink as you manage. All
> other frames get dropped.

Hey, I'm in the same situation, I want to get the frames, and I know I
can manage the frame rate by using something videorate element, but
that will drop frames. I want to process some stuff for every frame on
the picture, so I need to slow down the frame rate playback sometimes,
but without losing frames. I've seen a way to slow down the playback
using gnonlin filesource element, but that doesn't convince me either.
Is there other way ?

-- 
Acta est fabula


More information about the gstreamer-devel mailing list