Question about format capabilities

Francisco Velázquez francisco.javier at me.com
Mon Nov 10 11:46:12 PST 2014


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



More information about the gstreamer-devel mailing list