2

我怎样才能进行原始发送和原始接收?这不起作用,我无法播放我发送的内容:

Send: $ gst-launch -v autoaudiosrc ! udpsink host=127.0.0.1 auto-multicast=true port=4444

Recv/play:
[root@example ~]# gst-launch udpsrc multicast-group=127.0.0.1 port=4444 ! autoaudiosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse: The stream is in the wrong format.
Additional debug info:
gstbaseaudiosink.c(866): gst_base_audio_sink_preroll (): /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse:
sink not negotiated.
Execution ended after 16110169 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
[root@example ~]# 
4

1 回答 1

1

您需要为源指定功能。这才是真正的ERROR: from element /GstPipeline:pipeline0/GstAudioConvert:audioconvert0: not negotiated意思。(在 gst-launch 上使用-v标志以查看有关错误的更多详细信息)。

所以,解决方案是:

$ gst-launch -v udpsrc multicast-group=127.0.0.1 port=4444 \
    ! audio/x-raw-int, endianness=1234, signed=true, width=16, depth=16, rate=44100, channels=2 \
    ! autoaudiosink

实际上,我只是从发送 gst-launch 的详细输出中复制了功能。

于 2010-12-10T16:04:48.753 回答