GStreamer自定义插件和alsasink无法检测格式

我正在开发GStreamer插件编写指南之后的GStreamer插件,并使用基类设置为basetransform的gst-plugins-bad存储库使用gst-element-maker。 作为一个起点,我开发了一个名为MyFilter的插件,它只是沿着链传递数据。 该插件正在工作,但是当我运行debugging级别设置为2的gst-launch时,出现以下错误:

alsa gstalsa.c:124:gst_alsa_detect_formats:跳过非int格式。

我正在执行命令:

gst-launch –gst-debug-level = 2 –gst-plugin-load =。/ src / libgstmyfilter.la filesrc location =。/ song.mp3! flump3dec! audioconvert! audioresample! myfilter! alsasink

从gst-element-maker创build的基类中,我已经去掉了对gst_pad_new_from_static_template()的调用,因为调用返回错误,报告sink和source pad已经创build,我使用gst_pad_set_chain_function()设置链函数,实现了函数gst_myfilter_transform_caps(),并添加了代码来处理GST_EVENT_NEWSEGMENT事件。 我用于source和sink的STATIC_CAPSstring是:

“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”

我使用gst_pad_get_fixed_caps_func(GST_BASE_TRANSFORM_SRC [[/ SINK]] _ PAD(trans))从gst_myfilter_transform_caps()返回大写字母。 使用由gst_myfilter_base_init()中的gst-element-maker创build的默认代码,使用以下代码设置pad顶盖:

gst_element_class_add_pad_template(element_class,gst_static_pad_template_get(&gst_myfilter_sink_template));

GstBaseTransform类有问题吗? 我有另一个自定义筛选器不使用GstBaseTransform类,并没有此问题。 我在Ubuntu 12.04上使用GStreamer v0.10.36。