GNOME Bugzilla – Bug 767811
udpsink stop works on Android 6.0
Last modified: 2018-01-20 14:57:30 UTC
Android 6.0 specific problem (Android 5.0.2 works perfect) Example of problem pipeline videotestsrc ! video/x-raw,width=360,height=240 ! queue ! videoconvert ! x264enc bitrate=500 speed-preset=superfast tune=zerolatency ! rtph264pay config-interval=1 ! udpsink More details about Android 6.0 changes https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id "To provide users with greater data protection, starting in this release, Android removes programmatic access to the device’s local hardware identifier for apps using the Wi-Fi and Bluetooth APIs. The WifiInfo.getMacAddress() and the BluetoothAdapter.getAddress() methods now return a constant value of 02:00:00:00:00:00" Maybe this is a root of the problem
Which host and port do you configure on udpsink? Do you see anything special in the logs with GST_DEBUG=3,udp\*:6 ?
> Which host and port do you configure on udpsink? 5004 > Do you see anything special in the logs with GST_DEBUG=3,udp\*:6 Let me double check
(In reply to Alexander from comment #2) > > Which host and port do you configure on udpsink? > > 5004 So you're sending to localhost? How do you try to capture it again? > > Do you see anything special in the logs with GST_DEBUG=3,udp\*:6 > > Let me double check Can you show the log, also of udpsrc?
(In reply to Sebastian Dröge (slomo) from comment #3) > (In reply to Alexander from comment #2) > > > Which host and port do you configure on udpsink? > > > > 5004 > > So you're sending to localhost? How do you try to capture it again? This options maybe configured by used so I may send to localhost or another host in network, both cases not work on Android 6.0 > > > > Do you see anything special in the logs with GST_DEBUG=3,udp\*:6 > > > > Let me double check > > Can you show the log, also of udpsrc? Usually I use VLC to play stream, but I can grab udpsrc also
Make sure to set the correct host on udpsink, and you might also need new permissions in Android 6 for being able to do this.
It's a long shot, but since udpsink is based on multiudpsink it might be related to bug #769773
I don't think so, because on Android 6.0 this is permanent problem
BTW both unicast and brodcast just didn't show any incomming data gst-launch-1.0 -v -m udpsrc uri="udp://127.0.0.1:5004" ! audioconvert ! fakesink dump=true gst-launch-1.0 -v -m udpsrc uri="udp://239.0.0.1:5004" ! audioconvert ! fakesink dump=true Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Got message #6 from element "fakesink0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #7 from element "audioconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #8 from element "udpsrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #9 from element "pipeline0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_PAUSED; Got message #11 from element "audioconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #14 from pad "udpsrc0:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)GST_STREAM_STATUS_TYPE_CREATE, owner=(GstElement)"\(GstUDPSrc\)\ udpsrc0", object=(GstTask)"\(GstTask\)\ udpsrc0:src"; Got message #15 from element "udpsrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #16 from element "pipeline0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #17 from pad "udpsrc0:src" (stream-status): GstMessageStreamStatus, type=(GstStreamStatusType)GST_STREAM_STATUS_TYPE_ENTER, owner=(GstElement)"\(GstUDPSrc\)\ udpsrc0", object=(GstTask)"\(GstTask\)\ udpsrc0:src"; Got message #18 from element "pipeline0" (stream-start): GstMessageStreamStart, group-id=(uint)0; Setting pipeline to PLAYING ... Got message #21 from element "pipeline0" (new-clock): GstMessageNewClock, clock=(GstClock)"\(GstSystemClock\)\ GstSystemClock"; New clock: GstSystemClock Got message #23 from element "audioconvert0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_PAUSED, new-state=(GstState)GST_STATE_PLAYING, pending-state=(GstState)GST_STATE_VOID_PENDING; Got message #24 from element "udpsrc0" (state-changed): GstMessageStateChanged, old-state=(GstState)GST_STATE_PAUSED, new-state=(GstState)GST_STATE_PLAYING, pending-state=(GstState)GST_STATE_VOID_PENDING;
How are you running gst-launch on an Android device? Does it also not work in an actual Android app with the right permissions? For multicast on Android to work properly, you will have to also specify the interface name (multicast-iface property) but let's focus on unicast first. Try things like sending to 127.0.0.1 and receiving in the same application, the device's IP address, and only once those work move on to actually using the network. Make sure that when using the network, data is actually sent and received (-> tcpdump / wireshark).
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!