2010-12-19 28 views
0

我试图建立一个gstreamer管道与iLBC编解码器创建一个RTP音频流。 Gstreamer(版本0.10)具有一个名为rtpilbcpay的RTP payloader管道元素。不幸的是只有RTP分组被实现,编解码器本身不包含在gstreamer中。使用RFC 3951中的参考代码,我创建了iLBC编码文件,用于示例音频,我希望能够使用gstreamer。但是,当我将这些文件传入rtpilbcpay时,最终出现错误。我“简单化”沿管路使用fakesink最小,误差仍然是相同的:通过RTP与gstreamer流媒体iLBC编码文件

~/tmp% gst-launch-0.10 filesrc location=sample.ilbc ! rtpilbcpay ! fakesink 
Setting pipeline to PAUSED ... 
Pipeline is PREROLLING ... 
ERROR: from element /GstPipeline:pipeline0/GstRTPILBCPay:rtpilbcpay0: Element doesn't implement handling of this stream. Please file a bug. 
Additional debug info: 
gstbasertpaudiopayload.c(909): gst_base_rtp_audio_payload_handle_buffer(): /GstPipeline:pipeline0/GstRTPILBCPay:rtpilbcpay0: 
subclass did not configure us properly 
ERROR: pipeline doesn't want to preroll. 
Setting pipeline to NULL ... 
Freeing pipeline ... 

我可能在管道缺少的重要组成部分(文件格式声明?),因为我同样无法播放一个PCMU编码的文件(queue缓冲区没有帮助):

~/tmp% gst-launch-0.10 filesrc location=sample.pcmu ! mulawdec ! fakesink 
Setting pipeline to PAUSED ... 
Pipeline is PREROLLING ... 
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error. 
Additional debug info: 
gstbasesrc.c(2550): gst_base_src_loop(): /GstPipeline:pipeline0/GstFileSrc:filesrc0: 
streaming task paused, reason not-negotiated (-4) 
ERROR: pipeline doesn't want to preroll. 
Setting pipeline to NULL ... 
Freeing pipeline ... 

这是一个简单的错误或者是管道安装错误的(我希望是后者)?管道中还需要哪些“胶水”元素?

回答

2

确实我错过了一些东西。一旦我添加了正确的MIME类型和一些其他属性,我就可以成功将文件传输到RTP payloader中:

~/tmp% gst-launch-0.10 filesrc location=sample.ilbc \ 
    ! 'audio/x-iLBC,rate=8000,channels=1,mode=20' \ 
    ! rtpilbcpay ! udpsink host=192.168.10.23 port=5555