Multi-Caps input parameter for an element?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Multi-Caps input parameter for an element?

Stirling Westrup
I am writing a testcaps element who's purpose will be to regularly cycle through a list of GstCaps structures at regular intervals, so as to test pipeline renegotiation.

The main code seems pretty straight-forward, but I'm unsure how to define a parameter type that accepts a list of caps. I'm thinking of using something like '!' or '|' as an internal caps separator, and going with that, but regardless, I can't find any documentation in the glib or gstreamer manual on creating and parsing new parameter types from the command line.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Multi-Caps input parameter for an element?

Sebastian Dröge-3
On Thu, 2017-01-05 at 16:50 -0500, Stirling Westrup wrote:

> I am writing a testcaps element who's purpose will be to regularly
> cycle through a list of GstCaps structures at regular intervals, so
> as to test pipeline renegotiation.
>
> The main code seems pretty straight-forward, but I'm unsure how to
> define a parameter type that accepts a list of caps. I'm thinking of
> using something like '!' or '|' as an internal caps separator, and
> going with that, but regardless, I can't find any documentation in
> the glib or gstreamer manual on creating and parsing new parameter
> types from the command line.
You could abuse GstCaps for that, and just pass caps with multiple
structures in the property. And then iterate through those structures
in your element.

Or use a property of type GST_TYPE_LIST.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Multi-Caps input parameter for an element?

Stirling Westrup
On Fri, Jan 6, 2017 at 4:34 AM, Sebastian Dröge <[hidden email]> wrote:
On Thu, 2017-01-05 at 16:50 -0500, Stirling Westrup wrote:
> I am writing a testcaps element who's purpose will be to regularly
> cycle through a list of GstCaps structures at regular intervals, so
> as to test pipeline renegotiation.
>
> The main code seems pretty straight-forward, but I'm unsure how to
> define a parameter type that accepts a list of caps. I'm thinking of
> using something like '!' or '|' as an internal caps separator, and
> going with that, but regardless, I can't find any documentation in
> the glib or gstreamer manual on creating and parsing new parameter
> types from the command line.

You could abuse GstCaps for that, and just pass caps with multiple
structures in the property. And then iterate through those structures
in your element.

I could, but then I couldn't use the test framework to test GstCaps with multiple structures. I really do want a List-of-Caps, but it doesn't look like I can use an actual list as I doubt the current parser could handle a comma-separated list containing two elements each a GstCaps with multiple structures, unless there is some escaping mechanism I'm unaware of.

I just did a search through the documentation and although I know there used to be documentation on the string-serialization forms of lists, arrays and ranges, I can't find it anywhere.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel