how to specify kernel to audiofirfilter from gst-launch-1.0

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

how to specify kernel to audiofirfilter from gst-launch-1.0

Charlie Laub

The online documentation for audiofirfilter provides an example of how to implement audiofirfilter in code, however, using gst-inspect it seems that I should be able to implement it using gst-launch as well. The main issue I have encountered is how to specify the kernel. The docs say is should be of type GValueArray, however, this may now be deprecated and GArray used instead – not sure. For more info, see:

https://www.freedesktop.org/software/gstreamer-sdk/data/docs/2012.5/gobject/gobject-Value-arrays.html

 

How can I provide a static array of kernel values when using audiofirfilter from gst-launch-1.0?


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

Re: how to specify kernel to audiofirfilter from gst-launch-1.0

Nicolas Dufresne-5
Le mercredi 17 janvier 2018 à 09:01 -0800, Charlie Laub a écrit :

> The online documentation for audiofirfilter provides an example of
> how to implement audiofirfilter in code, however, using gst-inspect
> it seems that I should be able to implement it using gst-launch as
> well. The main issue I have encountered is how to specify the kernel.
> The docs say is should be of type GValueArray, however, this may now
> be deprecated and GArray used instead – not sure. For more info, see:
> https://www.freedesktop.org/software/gstreamer-
> sdk/data/docs/2012.5/gobject/gobject-Value-arrays.html
>  
> How can I provide a static array of kernel values when using
> audiofirfilter from gst-launch-1.0?
It's not possible. One would need to add a new property with type
GstValueArray. Support that has property has been added in git master
and is used by rawvideoparse and audiomixmatrix. The syntax is:

  "< value1, value2, ...>"

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

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

Re: how to specify kernel to audiofirfilter from gst-launch-1.0

Baby Octopus
In reply to this post by Charlie Laub
You can do something like this for a 2x4 array

.. ! audiofirfilter kernel="<<(double)1, (double)0, (double)0, (double)0>,
<0.0, 1.0, 0.0, 0.0>>" ! ...

See audiomixmatrix element for reference

~BO



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

Re: how to specify kernel to audiofirfilter from gst-launch-1.0

Sebastian Dröge-3
In reply to this post by Charlie Laub
Hi,

On Wed, 2018-01-17 at 09:01 -0800, Charlie Laub wrote:

> The online documentation for audiofirfilter provides an example of
> how to implement audiofirfilter in code, however, using gst-inspect
> it seems that I should be able to implement it using gst-launch as
> well. The main issue I have encountered is how to specify the kernel.
> The docs say is should be of type GValueArray, however, this may now
> be deprecated and GArray used instead – not sure. For more info, see:
> https://www.freedesktop.org/software/gstreamer-sdk/data/docs/2012.5/g
> object/gobject-Value-arrays.html
>  
> How can I provide a static array of kernel values when using
> audiofirfilter from gst-launch-1.0?
There's currently no way to provide a GValueArray property via gst-
launch, you'll have to write code in some programming language. C or
Python for example would work.

You can find an example in C here:
https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/tests/examples/audiofx/firfilter-example.c


While GValueArray is deprecated in GLib, this is unrelated to that.
There's no replacement for GValueArray in GLib for this use-case, so
there's nothing else to use at this point.

--
Sebastian Dröge, Centricular Ltd · https://www.centricular.com

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

signature.asc (981 bytes) Download Attachment