Tutorial 2 TCP audio

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Tutorial 2 TCP audio

vincent
This post was updated on .
Hi,

Im trying to get a working pipeline to receive audio.
It works perfectly with gst-launch:

Windows
gst-launch tcpclientsrc host=192.168.73.103 port=3001 ! "audio/x-mulaw, channels=1, depth=16, width=16, rate=44100" ! mulawdec ! audioconvert ! autoaudiosink

and

Linux
gst-lauch audiotestsrc freq=1000 ! mulawenc ! tcpserversink port=3001

Now i want to build a app to receive the audio on an android device.
I followed a few tutorials https://gstreamer.freedesktop.org/documentation/tutorials/android/index.html
and i am using the command line for building and deploying.

For building i using an older version of NDK (android-ndk-r9d) to prevent building problems with -fuse-ld=gold. I am also using the latest android sdk (1.11.90) and the tutorials from GIT. (latest)

The tutorials are working on my device without any problem.

I use tutorial 2 as starting point for the app and i changed the pipeline in tutorial-2.c

  /* Build pipeline */
  //audiotestsrc ! audioconvert ! audioresample ! autoaudiosink
  data->pipeline = gst_parse_launch("tcpclientsrc host=192.168.73.103 port=3001 ! audio/x-mulaw, channels=1, depth=16, width=16, rate=44100 ! mulawdec ! audioconvert ! autoaudiosink", &error);

But now i get: Error received from element tcpclientsrc0: could not open resource for reading.

I also added some plugins in android.mk

GSTREAMER_NDK_BUILD_PATH  := $(GSTREAMER_ROOT)/share/gst-android/ndk-build/
include $(GSTREAMER_NDK_BUILD_PATH)/plugins.mk
GSTREAMER_PLUGINS         := $(GSTREAMER_PLUGINS_CORE) $(GSTREAMER_PLUGINS_PLAYBACK) $(GSTREAMER_PLUGINS_CODECS) $(GSTREAMER_PLUGINS_NET) $(GSTREAMER_PLUGINS_SYS)
G_IO_MODULES              := gnutls
GSTREAMER_EXTRA_DEPS      := gstreamer-video-1.0
include $(GSTREAMER_NDK_BUILD_PATH)/gstreamer-1.0.mk

I have searched on the Internet but couldn't/can't find the answer

I am new to GStreamer and any help would be appreciated!
Reply | Threaded
Open this post in threaded view
|

Re: Tutorial 2 TCP audio

vincent
Solved:

<uses-permission android:name="android.permission.INTERNET" />

Was missing in AndroidManifest.xml
Reply | Threaded
Open this post in threaded view
|

Re: Tutorial 2 TCP audio

Nicolas Dufresne-5
Le mardi 25 avril 2017 à 04:55 -0700, vincent a écrit :
> Solved:
>
> <uses-permission android:name="android.permission.INTERNET" />
>
> Was missing in AndroidManifest.xml

Good to ear you found that issue, I have also once had that issue. I
notice that our tutorials make no mention of the manifest. I think it
would be word adding something there, specially for the permissions.

regards,
Nicolas
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (188 bytes) Download Attachment