Creating GstCaps for "audio/*" mediatype

Sebastian Dröge slomo at circular-chaos.org
Tue Aug 27 02:52:41 PDT 2013


On Di, 2013-08-27 at 13:24 +0400, 4ernov wrote:
> Hello,
> 
> I'm trying to create caps for some common audio stream without
> specifying any details to let decodebin and typefind detect the format
> and create proper pipeline. List of defined types
> (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/section-types-definitions.html)
> says, that "audio/*" is right for it. But when I'm trying to write
> 
> GstCaps* audio_caps = gst_caps_new_empty_simple("audio/*");
> 
> I receive
> 
> GStreamer-CRITICAL **: gst_structure_new_empty: assertion
> `gst_structure_validate_name (name)' failed
> 
> and it's right as a check in gst_structure_validate_name()
> 
> while (*s && (g_ascii_isalnum (*s) || strchr ("/-_.:+", *s) != NULL))
> 
> doesn't contain "*" character and consequently consider it as invalid.
> 
> The same problem is for other ".../*" types (e.g. "video/*").
> 
> Is it something in GstStructure, should I use another notation or such
> a general caps simply can't be defined in code?

The caps names must be complete and are compared by equality, not by
prefix match. "audio/*" is just not possible :)

What exactly do you want to do, what's the bigger picture?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130827/50e1a410/attachment.pgp>


More information about the gstreamer-devel mailing list