Just a thought, may not be realted to this specific issue of yours <br>Writing your own gstreamer plugin to do image processing stuff would make it more cleaner and better.<br><br>like v4l2src ! ffmpegcolorspace ! your_image_processing_plugin ! xvimagesink ?<br>
<br>Best<br>- Kapil<br><br><div class="gmail_quote">On Sat, Oct 29, 2011 at 2:23 AM, wally_bkg <span dir="ltr">&lt;<a href="mailto:wb666greene@gmail.com">wb666greene@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
Edward Hervey wrote:<br>
&gt;<br>
&gt;   Why aren&#39;t you using the v4l2src/v4l2sink elements ? If you have<br>
&gt; issues with them, please explain it in detail and/or file a bug report.<br>
&gt;<br>
<br>
</div>I have vrl2src elements at the start of my pipeline that ends with an<br>
appsink, this worked fine with fixed video frame sizes, but now that I&#39;ve<br>
removed that restriction in the image processing algorithm the question is<br>
how do I get the frame size from v4l2 without setting the pipeline to<br>
playing?<br>
<br>
I&#39;ve had lots of issues with the gstreamer v4l2src tuner interface and never<br>
could get it to reliably set the norm and select the input across the<br>
various v4l2 capture devices on hand.  As to bug reports, the answer was<br>
always to try a newer version, but when I tried the Ubuntu 10.04 gstreamer<br>
PPA it broke all things multimedia and wasted a fair amount of time<br>
recovering.  At that point it became easier to just use v4l2 calls to set<br>
the norm and select the input, then build the pipeline.<br>
<br>
Grossly simplified my code is<br>
<br>
V4l2src-&gt;ffmpegcolorspace-&gt;fixed caps filter-&gt;appsink<br>
duplicate the appsink buffer data<br>
do some image processing on the duplicated buffer data<br>
appsrc-&gt;xvimagesink (for realtime viewing, of the processed data)<br>
appsrc-&gt;mp4 encoding-&gt;filesink ( original data to allow non-realtime<br>
processing afterwards)<br>
<br>
Works quite well with fixed caps.  I&#39;m stuck on how to get the frame height<br>
and width without fixed caps before the pipeline runs.   I have to build a<br>
bunch of tables that depend on the frame size and takes a couple of seconds<br>
to do (perhaps not the most efficient recursive code, but it only runs<br>
once).<br>
<br>
I could work around this by pre-building tables of the possibilities<br>
(640x480, 704x480, &amp; 720x480 so far, depending on the capture device, fixed<br>
caps was just set to 640x480) but the real issue is I&#39;d like the v4l2<br>
timestamps from the driver to use to synchronize A/D data from another<br>
process running on the same machine.  I asked about this earlier but got no<br>
response:<br>
<br>
<a href="http://gstreamer-devel.966125.n4.nabble.com/Getting-V4l2-timestamps-from-v4l2src-td3915764.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Getting-V4l2-timestamps-from-v4l2src-td3915764.html</a><br>

<br>
Dealing with various frame sizes is at this point only needed to test my<br>
changes (which I quickly did by changing the fixed caps  to match the<br>
different capture card possibilities) in anticipation of someday using HD<br>
video.  The timestamps to synchronize the A/D data with the video is an<br>
action item.<br>
<font color="#888888"><br>
<br>
<br>
--<br>
View this message in context: <a href="http://gstreamer-devel.966125.n4.nabble.com/Get-v4l2src-width-and-height-before-pipeline-runs-tp3942212p3949188.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/Get-v4l2src-width-and-height-before-pipeline-runs-tp3942212p3949188.html</a><br>

</font><div><div></div><div class="h5">Sent from the GStreamer-devel mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.linkedin.com/in/kapilagrawal" target="_blank">http://www.linkedin.com/in/kapilagrawal</a><br><a href="http://www.mediamagictechnologies.com" target="_blank">www.mediamagictechnologies.com</a> <br>
(Consultancy - Multimedia, Gstreamer, ffmpeg, Streaming for platforms- linux, windows, TI, android)<br><br><br>