Accessing video RGB data

Sami Pietilä sami.pietila at gmail.com
Fri Oct 7 11:44:23 PDT 2011


Hi,

I have also a situation where frames can't be lost. I can't also say
how long processing a frame takes so I need to ask next frame from
gstreamer when processing previous frame is is done.

2011/10/7 Erick Pérez <erick.red at gmail.com>:
>>> 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
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>


More information about the gstreamer-devel mailing list