lma at spaceapplications.com
Wed Feb 19 05:20:51 PST 2014
I'm transmitting live audio over a network using an ogg container. I have an application to send that uses gstreamer and I receive the stream using gst-launch.
For sending I implement the following pipeline but in code :
gst-launch -v autoaudiosrc ! audio/x-raw-int,channels=1,depth=16,width=16,rate=16000 ! volume volume=0.25 ! audioconvert ! vorbisenc ! oggmux ! tcpserversink port=7821
I set the transmitting application's pipeline state to GST_STATE_PLAYING, I can then connect to the transmitting application using the following :
gst-launch -v tcpclientsrc port=7821 ! oggdemux ! vorbisdec ! audioconvert ! autoaudiosink
It works ok, I can hear the sound that has been captured on the transmitting application.
I wish to be able to stop the transmission of the audio stream to the client and then start it again, but I have not yet managed to get this to work.
Currently, I set the transmitter pipeline state to GST_STATE_PAUSED. At which point the receiver stops playing audio. I then try to restart it by setting the transmitter pipeline state to GST_STATE_PLAYING, but the receiver does not restart playing audio.
I can only start receiving and playing the audio again if I restart gst-launch.
Does anyone know what I'm doing wrong?
More information about the gstreamer-devel