<div dir="ltr">On Mon, Sep 1, 2008 at 12:59 PM, Hendrik Schober <span dir="ltr">&lt;<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a>&gt;</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>
&gt;<br>
&gt;<br>
&gt; On Mon, Sep 1, 2008 at 11:56 AM, Hendrik Schober &lt;<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a><br>
</div><div class="Ih2E3d">&gt; &lt;mailto:<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt; &nbsp; &nbsp; thiagoss wrote:<br>
&gt; &nbsp; &nbsp; &nbsp;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; On Mon, Sep 1, 2008 at 11:18 AM, Hendrik Schober &lt;<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a><br>
&gt; &nbsp; &nbsp; &lt;mailto:<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a>&gt;<br>
</div><div class="Ih2E3d">&gt; &nbsp; &nbsp; &nbsp;&gt; &lt;mailto:<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a> &lt;mailto:<a href="mailto:spamtrap@gmx.de">spamtrap@gmx.de</a>&gt;&gt;&gt; wrote:<br>
&gt; &nbsp; &nbsp; &nbsp;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; Hi,<br>
&gt; &nbsp; &nbsp; &nbsp;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; we are using (or is that abusing?) gstreamer in order to capture<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; video data from an USB camera. For this we have setup a v4lsrc<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; and a fake sink and grab the data in the handoff hook of the<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; latter. So far, so good. However, despite several hours of<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; tinkering we haven&#39;t found out how to determine what format<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; (width, height, encoding) the data comes in.<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; What do we need to do to get these values?<br>
&gt; &nbsp; &nbsp; &nbsp;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;&gt; Check the &#39;caps&#39; in the source pad of the v4lsrc element.<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp;Thanks for your answer.<br>
&gt; &nbsp; &nbsp; &nbsp;In fact, we already did that -- and got back a rather long<br>
&gt; &nbsp; &nbsp; &nbsp;list of caps. But that doesn&#39;t tell us which one&#39;s currently<br>
&gt; &nbsp; &nbsp; &nbsp;used. (Also, they specify a range for width and height, while<br>
&gt; &nbsp; &nbsp; &nbsp;we need the ones that actually are negotiated.)<br>
&gt;<br>
&gt;<br>
&gt; You should check the caps in the buffers you get from the handoff<br>
&gt; buffers instead.<br>
<br>
</div> &nbsp;Thanks, we hadn&#39;t even found those yet.<br>
 &nbsp;However, this now leads to another question:<br>
 &nbsp;Since these are rather suboptimal for us, we need to change<br>
 &nbsp;them. We could use the ffmpegcolorspace conversion plugin,<br>
 &nbsp;but IIUC we need to make this and the fakesink use the right<br>
 &nbsp;pad.<br>
 &nbsp;Where and how would we do this? When we setup the pipeline?<br>
 &nbsp;By forcing some caps/pad onto the fakesink&#39;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=&quot;yourdesiredcaps&quot; ! fakesink<br><br>If you need scaling put a videoscale between ffmpegcolorspace and capsfilter.<br>
&nbsp;</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>
 &nbsp;Schobi<br>
<br>
<br>
-------------------------------------------------------------------------<br>
This SF.Net email is sponsored by the Moblin Your Move Developer&#39;s challenge<br>
Build the coolest Linux based applications with Moblin SDK &amp; 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&amp;url=/" target="_blank">http://moblin-contest.org/redirect.php?banner_id=100&amp;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>