UDP NET_ADMIN error on Android app

Gregoire Gentil gregoire at gentil.com
Tue Mar 23 01:29:32 UTC 2021


Hello,

I'm using gstreamer 1.16.2 in an Android app built with API version 29 
and NDK 21.1. I'm running that app on Android TV 9 with kernel 4.1.

I get the strange error message:

03-21 19:10:46.896  9080  9223 W GStreamer+udpsrc: 0:00:10.827964588 
0xd1507750 ../gst/udp/gstudpsrc.c:1447:gst_udpsrc_open:<udpsrc0> 
warning: Could not create a buffer of requested 524288 bytes (Operation 
not permitted). Need net.admin privilege?

03-21 19:10:46.897  9080  9223 W GStreamer+udpsrc: 0:00:10.828812588 
0xd1507750 ../gst/udp/gstudpsrc.c:1457:gst_udpsrc_open:<udpsrc0> have 
udp buffer of 262144 bytes while 524288 were requested

03-21 19:10:51.996  9080  9223 W GStreamer+rtspsrc: 0:00:15.928045518 
0xd1507750 
../gst/rtsp/gstrtspsrc.c:5771:gst_rtspsrc_reconnect:<rtspsrc0> warning: 
Could not receive any UDP packets for 5.0000 seconds, maybe your 
firewall is blocking it. Retrying using a tcp connection.

03-21 19:11:13.472  9080  9223 W GStreamer+rtspsrc: 0:00:37.404373634 
0xd1507750 
../gst/rtsp/gstrtspsrc.c:5560:gst_rtspsrc_loop_interleaved:<rtspsrc0> 
error: Could not receive message. (System error)

03-21 19:11:13.474  9080  9223 W GStreamer+rtspsrc: 0:00:37.406002134 
0xd1507750 ../gst/rtsp/gstrtspsrc.c:6056:gst_rtspsrc_loop:<rtspsrc0> 
error: Internal data stream error.

03-21 19:11:13.474  9080  9223 W GStreamer+rtspsrc: 0:00:37.406265426 
0xd1507750 ../gst/rtsp/gstrtspsrc.c:6056:gst_rtspsrc_loop:<rtspsrc0> 
error: streaming stopped, reason error (-5)

03-21 19:11:13.495  9080  9223 W GStreamer+default: 0:00:37.427520719 
0xd1507750 ../gst-libs/gst/rtsp/gstrtspconnection.c:1234:write_bytes 
Operation was cancelled

03-21 19:11:13.496  9080  9223 W GStreamer+rtspsrc: 0:00:37.427919303 
0xd1507750 ../gst/rtsp/gstrtspsrc.c:6402:gst_rtspsrc_try_send:<rtspsrc0> 
send interrupted

03-21 19:11:13.496  9080  9223 W GStreamer+rtspsrc: 0:00:37.428175428 
0xd1507750 ../gst/rtsp/gstrtspsrc.c:8650:gst_rtspsrc_pause:<rtspsrc0> 
PAUSE interrupted

03-21 19:11:13.503  9080  9223 W GStreamer+default: 0:00:37.435170178 
0xd1507750 ../gst-libs/gst/rtsp/gstrtspconnection.c:1234:write_bytes 
Error sending data: Broken pipe

03-21 19:11:13.503  9080  9223 W GStreamer+rtspsrc: 0:00:37.435540720 
0xd1507750 ../gst/rtsp/gstrtspsrc.c:6400:gst_rtspsrc_try_send:<rtspsrc0> 
error: Could not send message. (System error)

03-21 19:11:13.504  9080  9223 W GStreamer+rtspsrc: 0:00:37.436036929 
0xd1507750 ../gst/rtsp/gstrtspsrc.c:8075:gst_rtspsrc_close:<rtspsrc0> 
error: Could not send message. (System error)

My pipeline is:

rtspsrc latency=250 location=rtsp://10.10.10.1:81 ! rtph264depay ! queue 
! h264parse ! mpegpsmux ! filesink

NET_ADMIN privilege is only for system app. Obviously, the device is not 
rooted. I'm confused why I get such udpsrc error. Note that the second 
line of the log indicates that it can't get a 512kB buffer but it can 
get a 256kB. Has anyone got an idea?

Grégoire


More information about the gstreamer-devel mailing list