gst_structure_get_float missing?

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

gst_structure_get_float missing?

Martin Kelly
Hi,

While looking at the GstStructure API, I noticed that
gst_structure_get_float is missing, although most other GLib types are
present. It appears this has come up once before on the mailing list,
and a workaround was suggested [1]. However, I'm wondering if the
omission is intentional or merely an accident. If it is the latter, I
may submit a patch to add this function.

Thanks,
Martin

[1]:
http://gstreamer-devel.966125.n4.nabble.com/gst-structure-get-float-td4344490.html
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: gst_structure_get_float missing?

Nicolas Dufresne-4
Le vendredi 04 mars 2016 à 11:55 -0800, Martin Kelly a écrit :

> Hi,
>
> While looking at the GstStructure API, I noticed that 
> gst_structure_get_float is missing, although most other GLib types
> are 
> present. It appears this has come up once before on the mailing
> list, 
> and a workaround was suggested [1]. However, I'm wondering if the 
> omission is intentional or merely an accident. If it is the latter,
> I 
> may submit a patch to add this function.
Those are helpers around gst_structure_get_value(). So far, only double
were needed, if you need float, you may add them. Be extra careful as
vararg only supports double iirc. There is very little use for float to
be honest.

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

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

Re: gst_structure_get_float missing?

Martin Kelly
On 03/04/2016 12:17 PM, Nicolas Dufresne wrote:
> Le vendredi 04 mars 2016 à 11:55 -0800, Martin Kelly a écrit :
>
> Those are helpers around gst_structure_get_value(). So far, only double
> were needed, if you need float, you may add them. Be extra careful as
> vararg only supports double iirc. There is very little use for float to
> be honest.
>

Got it, thanks. In my case, I'm interfacing with an existing API that
returns a float, so the method would be convenient. However, I can also
store the float as a double instead. It wastes a bit of space but is
otherwise OK.

If I get the time, I'll add the float method. It's not a huge deal, but
having the method would be nice.

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