Question about format capabilities

Chuck Crisler ccrisler at mutualink.net
Tue Nov 11 06:27:11 PST 2014


Just for grins, what about linking directly with xvimagesink, if that fails
then link videoconvert? Seems easy enough.

On Mon, Nov 10, 2014 at 6:45 PM, Patrick Doyle <wpdster at gmail.com> wrote:

> Hello Francisco,
> Sorry, I misread ximagesink as xvimagesink.  The
> --gst-debug=GST_CAPS:6 capability is a feature of the gstreamer
> infrastructure, not of individual plugins.  When I run:
>
> $ gst-launch-1.0 --gst-debug=GST_CAPS:6 videotestsrc ! ximagesink
>
> I see
> ...
> 0:00:00.078848852 45175       0xda99e0 DEBUG               GST_CAPS
> gstutils.c:2807:gst_pad_peer_query_caps:<videotestsrc0:src> get pad
> peer caps with filter video/x-raw, format=(string){ I420, YV12, YUY2,
> UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR,
> Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, NV16, NV24, GRAY8,
> GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420,
> RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10LE, I420_10BE,
> I422_10LE, I422_10BE, Y444_10LE, Y444_10BE, GBR, GBR_10LE, GBR_10BE },
> width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ],
> framerate=(fraction)[ 0/1, 2147483647/1 ]; video/x-bayer,
> format=(string){ bggr, rggb, grbg, gbrg }, width=(int)[ 1, 2147483647
> ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1,
> 2147483647/1 ]
> 0:00:00.078892620 45175       0xda99e0 DEBUG               GST_CAPS
> gstutils.c:2814:gst_pad_peer_query_caps:<videotestsrc0:src> peer query
> returned video/x-raw, format=(string)BGRx, width=(int)[ 1, 2147483647
> ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1,
> 2147483647/1 ], pixel-aspect-ratio=(fraction)1/1
> ...
> So, (please keep in mind, I am not an expert at all in gstreamer), it
> looks to me like videotestsrc proposed a whole slew of formats to
> ximagesink and ximagesink replied "I would like BGRx".  That makes
> sense, since  ximagesink is "A standard X based videosink".  If you
> hand it BGRx data, it probably just needs to blast the pixels into the
> framebuffer without changing them.  (It might blast them one component
> at a time, if the frame buffer is 24 bits deep, or it could blast them
> 32 bits at a time into a BGRx framebuffer).
>
> Anything more than this is beyond my limited understanding.  I would
> encourage you to take a peek at the source code.
>
> --wpd
>
>
> videotestsrc pr
>
> On Mon, Nov 10, 2014 at 2:46 PM, Francisco Velázquez
> <francisco.javier at me.com> wrote:
> > Hi Patrick
> >
> > In my installation I use ximagesink instead of xvimagesink. I assume
> that the CAPS category for debugging is declared inside the xvimagesink,
> because I do not get any debugging output with that option when using
> ximagesink. Anyway, the option “-v” of gst-launch-1.0 also shows the
> negotiated format between elements.
> >
> > Yes, the negotiation process selects the first capability that matches
> between two linked elements. In the case of video formats, a solution is to
> insert a videoconvert element to ensure that capabilities match. This
> solution, however, introduces an overhead that sometimes is unnecessary.
> Therefore I would like to find out how to know what are the supported
> formats by elements even when their description does not state it. That is
> the case of the ximagesink element.
> >
> > Some output snippets:
> >
> > $gst-inspect-1.0 ximagesink
> > …
> > Pad Templates:
> >   SINK template: 'sink'
> >     Availability: Always
> >     Capabilities:
> >       video/x-raw
> >               framerate: [ 0/1, 2147483647/1 ]
> >                   width: [ 1, 2147483647 ]
> >                  height: [ 1, 2147483647 ]
> > …
> >
> >
> >
> > $gst-launch-1.0 -v videotestsrc ! opencvtextoverlay text="Hello" !
> videoconvert ! ximagesink
> > …
> >
> /GstPipeline:pipeline0/GstOpencvTextOverlay:opencvtextoverlay0.GstPad:src:
> caps = "video/x-raw\,\ format\=\(string\)RGB\,\ width\=\(int\)320\,\
> height\=\(int\)240\,\ framerate\=\(fraction\)30/1\,\
> pixel-aspect-ratio\=\(fraction\)1/1\,\
> interlace-mode\=\(string\)progressive"
> > /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps =
> "video/x-raw\,\ width\=\(int\)320\,\ height\=\(int\)240\,\
> framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\
> interlace-mode\=\(string\)progressive\,\ format\=\(string\)BGRx”
> > …
> > Note that the videoconverter changes the format from RGB to BGRx.
> Otherwise:
> >
> > $ gst-launch-1.0 -v videotestsrc ! opencvtextoverlay text="Hello" !
> ximagesink
> > Setting pipeline to PAUSED ...
> > Pipeline is PREROLLING ...
> > ERROR: from element
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow
> error.
> > Additional debug info:
> > gstbasesrc.c(2933): void gst_base_src_loop(GstPad *) ():
> /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
> > streaming task paused, reason not-negotiated (-4)
> > …
> >
> > How to know what are the supported formats by ximagesink?
> >
> > Thank you.
> >
> > Francisco
> >
> >> On 10 Nov 2014, at 15:25, Patrick Doyle <wpdster at gmail.com> wrote:
> >>
> >> When I run 'gst-inspect-1.0 ximagesink', I see the following:
> >> ...
> >> Pad Templates:
> >>  SINK template: 'sink'
> >>    Availability: Always
> >>    Capabilities:
> >>      video/x-raw
> >>              framerate: [ 0/1, 2147483647/1 ]
> >>                  width: [ 1, 2147483647 ]
> >>                 height: [ 1, 2147483647 ]
> >> ...
> >>
> >> This tells me that xvimagesink takes video/x-raw frames at
> >> (effectively) any frame rate and framesize.  But (as you note) that
> >> doesn't tell me what specific image formats are support.  So I have
> >> learned to do somthing like:
> >>
> >> $ gst-launch-1.0 --gst-debug=CAPS:6 videotestsrc ! xvimagesink
> >>
> >> When I look through the debug output produced by that, I see that
> >> xvimagesink reports same set of capabilities (not surprisingly) and
> >> that it doesn't restrict the image formats (which is what I learned
> >> from gst-inspect-1.0).  Continuing through the debug output, I see
> >> that videotestsrc and xvimagesink negotiate a UVYV format.  My
> >> (limited) understanding of this negotiation process is that each side
> >> is free to suggest the formats it supports and to choose from the
> >> other side's list the format it would prefer to see.
> >>
> >> --wpd
> >>
> >>
> >> On Mon, Nov 10, 2014 at 9:02 AM, Francisco Velázquez
> >> <francisco.javier at me.com> wrote:
> >>> Dear GStreamer community,
> >>>
> >>> I am trying to figure out how to know what are the supported formats of
> >>> ximagesink.
> >>>
> >>> I have GStreamer 1.4.3 in Mac OS X 10.10.
> >>>
> >>> `gst-inspect-1.0 ximagesink` shows no format information.
> >>>
> >>> You can see that
> >>>
> http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/sys/ximage/ximagesink.c:931
> >>> does have a "format" descriptor, but that “format descriptor” is
> missing in
> >>>
> http://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/docs/plugins/inspect/plugin-ximagesink.xml
> .
> >>>
> >>> Is the lack of format in the XML file intentional?
> >>>
> >>> How can one determine what are the supported formats of ximagesink
> without
> >>> such description?
> >>>
> >>> Thank you,
> >>>
> >>> Francisco
> >>>
> >>>
> >>> _______________________________________________
> >>> gstreamer-devel mailing list
> >>> gstreamer-devel at lists.freedesktop.org
> >>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >>>
> >> _______________________________________________
> >> gstreamer-devel mailing list
> >> gstreamer-devel at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> >
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20141111/ca23bc28/attachment.html>


More information about the gstreamer-devel mailing list