java - Playing an rtp stream on android published with gstreamer -
i'm trying rtp connection between microphone on desktop pc , android smartphone.
i grab data using gstreamer. because of other applications using microphone @ same time in same system, there tcpsink, in data published.
this done call:
gst-launch-0.10 -v alsasrc ! 'audio/x-raw-int, depth=16, width=16, \ endianness=1234, channels=1, rate=16000' ! \ tcpserversink host=localhost port=20000 then create second stream, grabs tcp connection , convert rtp stream publish data on udp
gst-launch-0.10 tcpclientsrc host=localhost protocol=0 port=20000 ! \ audio/x-raw-int,depth=16, width=16,endianness=1234, channels=1,\ rate=16000 ! lamemp3enc target=1 bitrate=64 cbr=true ! mad ! \ audioconvert ! audioresample ! mulawenc ! rtppcmupay pt=96 ! \ udpsink host=129.70.134.128 port=6000 this works while playing whith vlc player on localhost
vlc rtp://129.70.134.128:6000 now change host in udpsink android's phone one. shout while playing mplayer app.
after this, last step should play sound own app.
i'm trying stream android.net.rtp class.
audiomanager audiomanager = (audiomanager); mcontext.getsystemservice(mcontext.audio_service); audiomanager.setmode(audiomanager.mode_in_communication); audiostream inrtpstream = new audiostream(createinet("127.0.0.1")); inrtpstream.associate(createinet(url), 6000); inrtpstream.setmode(rtpstream.mode_receive_only); inrtpstream.setcodec(audiocodec.pcmu); inrtpstream.setdtmftype(96); // initialize audiogroup , attach audiostream audiogroup main_grp = new audiogroup(); main_grp.setmode(audiogroup.mode_normal); inrtpstream.join(main_grp); but there silence. logging output makes me think, there kind of data, application trying play.
debug audiogroup stream[57] configured pcmu 8khz 20ms mode 2 debug audiogroup stream[64] configured raw 8khz 32ms mode 0 debug audiogroup stream[64] joins group[63] debug audiogroup group[63] switches mode 0 2 debug audiogroup stream[57] joins group[63] debug audiogroup reported frame count: output 1149, input 384 debug audiogroup adjusted frame count: output 1149, input 512 debug audiogroup latency: output 302, input 64 am missing starting stream, or switching speaker on?
all available volume sliders turned maximum. requested internet , record_audio permissions in manifest file.
the codecs should same.
thanks answers
you should pass in actual ip address , not loop address 127.0.0.1 in "new audiostream(createinet("127.0.0.1"));"
Comments
Post a Comment