UDP sink Gstreamer + Android

Dmitri Afanasjev adimas at gmail.com
Fri Apr 3 12:30:11 PDT 2015


Hello!

I have udp stream which is generated by:

raspivid -t 999999 -w 1296 -h 730 -fps 30 -b 20000000 -o - | gst-launch-1.0
-e -vvvv fdsrc ! h264parse ! rtph264pay pt=96 name=pay0 config-interval=5 !
udpsink host=<destination ip> port=5001

Receiver part on Windows looks like:

C:\Users\Dmitri>gst-launch-1.0 -e -v udpsrc port=5001 ! application/x-rtp,
media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264,
 sprop-parameter-sets=\"J2QA
KKwrQCiC78kA8SJq\\,KO4fLA\\\=\\\=\", payload=(int)96 ! rtph264depay !
avdec_h264 ! autovideosink

(caps are taken from transmitter part) so all works well.

Now i want to create the same pipeline in Android. I'm using tutorial 5
from GStreamer SDK modified to work with RTMP streams as starting point.

when i create pipline with:

data->pipeline = gst_parse_launch("udpsrc port=5001
caps=\"application/x-rtp, media=video,  clock-rate=90000,
encoding-name=H264, payload=96\" ! rtph264depay ! h264parse ! avdec_h264 !
autovideosink sync=false", &error);

nothing start playing and i see the error in logcat

W/GLib+GLib-GObject﹕ invalid cast from 'GstPipeline' to 'GstVideoOverlay'
E/GLib﹕ gst_video_overlay_set_window_handle: assertion
'GST_IS_VIDEO_OVERLAY (overlay)' failed

As i understand I need to give the rendering point to my pipline, but error
occured.

How its possible to receive UDP stream as I've done in Winows environment,
how should look like pipline in Android JNI ?

Regards, Dmitri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150403/69e642a5/attachment.html>


More information about the gstreamer-devel mailing list