GStreamer Custom-Plugin and alsasink Unable to Detect Format
John Westing
john.blank.westing at gmail.com
Wed Dec 26 06:11:37 PST 2012
I'm developing a GStreamer plugin following the GStreamer Plugin Writer's
Guide and using gst-element-maker from the gst-plugins-bad repository with
the base class set to basetransform. As a starting point I have developed a
plugin named MyFilter that simply passes the data along the chain. The
plugin is working, but when I run gst-launch with the debug level set to 2,
I get the following error:
alsa gstalsa.c:124:gst_alsa_detect_formats: skipping non-int format.
I am executing the command:
gst-launch --gst-debug-level=2
--gst-plugin-load=./src/libgstmyfilter.lafilesrc location=./song.mp3 !
flump3dec ! audioconvert ! audioresample !
myfilter ! alsasink
>From the base class that was created by gst-element-maker I have removed
calls to gst_pad_new_from_static_template() because the calls were
returning errors reporting that the sink and source pad were already
created, I have set the chain function using gst_pad_set_chain_function(),
have implemented the function gst_myfilter_transform_caps(), and have added
code to handle the GST_EVENT_NEWSEGMENT event. The STATIC_CAPS string I am
using for source and sink are:
"audio/x-raw-int, "
"rate = (int) { 16000, 32000, 44100, 48000 }, "
"channels = (int) [ 1, 2 ], "
"endianness = (int) BYTE_ORDER, "
"signed = (boolean) true, "
"width = (int) 16, "
"depth = (int) 16"
I return the caps from gst_myfilter_transform_caps() using
gst_pad_get_fixed_caps_func(GST_BASE_TRANSFORM_SRC[[/SINK]]_PAD(trans)).
The pad caps are set using the default code created by gst-element-maker in
gst_myfilter_base_init() using:
gst_element_class_add_pad_template(element_class,
gst_static_pad_template_get(&gst_myfilter_sink_template));
Is there a problem with the GstBaseTransform class? I have another custom
filter which does not use the GstBaseTransform class and does not have this
problem. I am using GStreamer v0.10.36 with Ubuntu 12.04.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20121226/4e13b3a6/attachment.html>
More information about the gstreamer-devel
mailing list