<div dir="ltr">On Mon, Sep 1, 2008 at 12:59 PM, Hendrik Schober <span dir="ltr"><<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">thiagoss wrote:<br>
><br>
><br>
> On Mon, Sep 1, 2008 at 11:56 AM, Hendrik Schober <<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a><br>
</div><div class="Ih2E3d">> <mailto:<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a>>> wrote:<br>
><br>
> thiagoss wrote:<br>
> ><br>
> > On Mon, Sep 1, 2008 at 11:18 AM, Hendrik Schober <<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a><br>
> <mailto:<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a>><br>
</div><div class="Ih2E3d">> > <mailto:<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a> <mailto:<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a>>>> wrote:<br>
> ><br>
> > Hi,<br>
> ><br>
> > we are using (or is that abusing?) gstreamer in order to capture<br>
> > video data from an USB camera. For this we have setup a v4lsrc<br>
> > and a fake sink and grab the data in the handoff hook of the<br>
> > latter. So far, so good. However, despite several hours of<br>
> > tinkering we haven't found out how to determine what format<br>
> > (width, height, encoding) the data comes in.<br>
> > What do we need to do to get these values?<br>
> ><br>
> ><br>
> > Check the 'caps' in the source pad of the v4lsrc element.<br>
><br>
> Thanks for your answer.<br>
> In fact, we already did that -- and got back a rather long<br>
> list of caps. But that doesn't tell us which one's currently<br>
> used. (Also, they specify a range for width and height, while<br>
> we need the ones that actually are negotiated.)<br>
><br>
><br>
> You should check the caps in the buffers you get from the handoff<br>
> buffers instead.<br>
<br>
</div> Thanks, we hadn't even found those yet.<br>
However, this now leads to another question:<br>
Since these are rather suboptimal for us, we need to change<br>
them. We could use the ffmpegcolorspace conversion plugin,<br>
but IIUC we need to make this and the fakesink use the right<br>
pad.<br>
Where and how would we do this? When we setup the pipeline?<br>
By forcing some caps/pad onto the fakesink's source?<br>
<div><div></div><div class="Wj3C7c"></div></div></blockquote><div><br>You can do like this:<br><br>v4lsrc ! ffmpegcolorspace ! capsfilter caps="yourdesiredcaps" ! fakesink<br><br>If you need scaling put a videoscale between ffmpegcolorspace and capsfilter.<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div class="Wj3C7c"><br>
Schobi<br>
<br>
<br>
-------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge<br>
Build the coolest Linux based applications with Moblin SDK & win great prizes<br>
Grand prize is a trip for two to an Open Source event anywhere in the world<br>
<a href="http://moblin-contest.org/redirect.php?banner_id=100&url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&url=/</a><br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.sourceforge.net">gstreamer-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/gstreamer-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Thiago Sousa Santos<br><br>Embedded Systems and Pervasive Computing Lab (Embedded)<br>Center of Electrical Engineering and Informatics (CEEI)<br>Federal University of Campina Grande (UFCG)<br>
</div>