[gst-devel] getting data format info
Hendrik Schober
spamtrap at gmx.de
Mon Sep 1 17:59:05 CEST 2008
thiagoss wrote:
>
>
> On Mon, Sep 1, 2008 at 11:56 AM, Hendrik Schober <spamtrap at gmx.de
> <mailto:spamtrap at gmx.de>> wrote:
>
> thiagoss wrote:
> >
> > On Mon, Sep 1, 2008 at 11:18 AM, Hendrik Schober <spamtrap at gmx.de
> <mailto:spamtrap at gmx.de>
> > <mailto:spamtrap at gmx.de <mailto:spamtrap at gmx.de>>> wrote:
> >
> > Hi,
> >
> > we are using (or is that abusing?) gstreamer in order to capture
> > video data from an USB camera. For this we have setup a v4lsrc
> > and a fake sink and grab the data in the handoff hook of the
> > latter. So far, so good. However, despite several hours of
> > tinkering we haven't found out how to determine what format
> > (width, height, encoding) the data comes in.
> > What do we need to do to get these values?
> >
> >
> > Check the 'caps' in the source pad of the v4lsrc element.
>
> Thanks for your answer.
> In fact, we already did that -- and got back a rather long
> list of caps. But that doesn't tell us which one's currently
> used. (Also, they specify a range for width and height, while
> we need the ones that actually are negotiated.)
>
>
> You should check the caps in the buffers you get from the handoff
> buffers instead.
Thanks, we hadn't even found those yet.
However, this now leads to another question:
Since these are rather suboptimal for us, we need to change
them. We could use the ffmpegcolorspace conversion plugin,
but IIUC we need to make this and the fakesink use the right
pad.
Where and how would we do this? When we setup the pipeline?
By forcing some caps/pad onto the fakesink's source?
Schobi
More information about the gstreamer-devel
mailing list