Use of Gstreamer RTSP server with Android

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

Use of Gstreamer RTSP server with Android

Raya
Hello,

I have an android application that is able to open an UDP socket, connect to server, receive data (h264 flow), decode the data received and display it on the smartphone screen.

What I am trying to do now is to replace my server with the following pipeline:

gst-launch-1.0 filesrc location=toystory.h264  ! h264parse ! video/x-h264,stream-format=byte-stream,alignment=nal ! rtph264pay ! udpsink host=x.x.x.x port=5000

The problem is when I launch the android I get nothing on the screen (No data received by the client).

To open the socket, I am using the following java code:
try
{
IPAddress = InetAddress.getByName(dstAddress);
socket = new DatagramSocket(PORT);
socket.connect(IPAddress,PORT);
sendPacket = new DatagramPacket(buff, buff.length, IPAddress, PORT);
if (socket.isConnected()) {
                socket.send(sendPacket);
            }
receivePacket = new DatagramPacket(buff, buff.length, IPAddress, PORT);
socket.receive(receivePacket);
}
catch(IOException e) {
            e.printStackTrace();
        }


Could you please guide me to connect the pipeline to the client?
Reply | Threaded
Open this post in threaded view
|

Re: Use of Gstreamer RTSP server with Android

Nicolas Dufresne-5
Le mercredi 26 juillet 2017 à 06:11 -0700, Mariem a écrit :

> if (socket.isConnected()) {
>                 socket.send(sendPacket);
>             }
> receivePacket = new DatagramPacket(buff, buff.length, IPAddress, PORT);
> socket.receive(receivePacket);
> }
> catch(IOException e) {
>             e.printStackTrace();
>         }
>
>
> Could you please guide me to connect the pipeline to the client?
Before you do anything, have you made sure to give network access
permission to your application (in your manifest) ?

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

signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Use of Gstreamer RTSP server with Android

Raya
Yes, I added

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

to the manifest file.