Re: GStreamer access to raw audio data



On 16.01.2012 17:06, Zach Morgan wrote:
First of all, Gtk2, Glib, Gstreamer are all phenomenal bindings. They
have truly turned a spaghetti nightmare into a gizmo paradise. Thank
you.

Thanks for the feedback!

It doesn't look like it will be that easy for audio. 'convert-frame'
doesn't handle audio caps, and #gstreamer on freenode insists that an
appsink is the way to capture audio. I have a significant problem with
appsink, which is that it appsink methods don't appear to work. My
appsink object is instantiated by the GStreamer::ElementFactory, but
calling, for example, $appsink->pull_preroll() produces this error:

Can't locate object method "gst_app_sink_pull_preroll" via package
"Glib::Object::_Unregistered::GstAppSink" at lib/PDL/GStreamer.pm line
54.

I cannot comment on whether GstAppSink is the best way to achieve this. But assuming it is, the problem at hand is that we have no bindings for it. GstAppSink seems to be part of the libgstapp library, which in turn is part of gst-plugins-base, i.e. not of gstreamer itself. So I think the best way to wrap GstAppSink would be to create a separate Perl module GStreamer::App along the lines of the existing module GStreamer::Interfaces. I cannot promise to tackle this soon myself, but I would definitely try to provide all the necessary help if someone else wanted to give it a shot.

The code in your github repository looks fine to me. Looking at capture_image, though, I'm reminded of how awkward the GStreamer::Structure stuff is. The current bindings are basically a one-to-one mapping of the C API. But in this case I think a more natural Perl wrapper would be handy.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]