Get v4l2src width and height before pipeline runs?

Kapil Agrawal kapil.agl at gmail.com
Mon Oct 31 10:00:38 PDT 2011


Just a thought, may not be realted to this specific issue of yours
Writing your own gstreamer plugin to do image processing stuff would make
it more cleaner and better.

like v4l2src ! ffmpegcolorspace ! your_image_processing_plugin !
xvimagesink ?

Best
- Kapil

On Sat, Oct 29, 2011 at 2:23 AM, wally_bkg <wb666greene at gmail.com> wrote:

>
> Edward Hervey wrote:
> >
> >   Why aren't you using the v4l2src/v4l2sink elements ? If you have
> > issues with them, please explain it in detail and/or file a bug report.
> >
>
> I have vrl2src elements at the start of my pipeline that ends with an
> appsink, this worked fine with fixed video frame sizes, but now that I've
> removed that restriction in the image processing algorithm the question is
> how do I get the frame size from v4l2 without setting the pipeline to
> playing?
>
> I've had lots of issues with the gstreamer v4l2src tuner interface and
> never
> could get it to reliably set the norm and select the input across the
> various v4l2 capture devices on hand.  As to bug reports, the answer was
> always to try a newer version, but when I tried the Ubuntu 10.04 gstreamer
> PPA it broke all things multimedia and wasted a fair amount of time
> recovering.  At that point it became easier to just use v4l2 calls to set
> the norm and select the input, then build the pipeline.
>
> Grossly simplified my code is
>
> V4l2src->ffmpegcolorspace->fixed caps filter->appsink
> duplicate the appsink buffer data
> do some image processing on the duplicated buffer data
> appsrc->xvimagesink (for realtime viewing, of the processed data)
> appsrc->mp4 encoding->filesink ( original data to allow non-realtime
> processing afterwards)
>
> Works quite well with fixed caps.  I'm stuck on how to get the frame height
> and width without fixed caps before the pipeline runs.   I have to build a
> bunch of tables that depend on the frame size and takes a couple of seconds
> to do (perhaps not the most efficient recursive code, but it only runs
> once).
>
> I could work around this by pre-building tables of the possibilities
> (640x480, 704x480, & 720x480 so far, depending on the capture device, fixed
> caps was just set to 640x480) but the real issue is I'd like the v4l2
> timestamps from the driver to use to synchronize A/D data from another
> process running on the same machine.  I asked about this earlier but got no
> response:
>
>
> http://gstreamer-devel.966125.n4.nabble.com/Getting-V4l2-timestamps-from-v4l2src-td3915764.html
>
> Dealing with various frame sizes is at this point only needed to test my
> changes (which I quickly did by changing the fixed caps  to match the
> different capture card possibilities) in anticipation of someday using HD
> video.  The timestamps to synchronize the A/D data with the video is an
> action item.
>
>
>
> --
> View this message in context:
> http://gstreamer-devel.966125.n4.nabble.com/Get-v4l2src-width-and-height-before-pipeline-runs-tp3942212p3949188.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>



-- 
http://www.linkedin.com/in/kapilagrawal
www.mediamagictechnologies.com
(Consultancy - Multimedia, Gstreamer, ffmpeg, Streaming for platforms-
linux, windows, TI, android)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20111031/3e014580/attachment.htm>


More information about the gstreamer-devel mailing list