1) socket-based, suitable for simple video monitoring solutions. The server compresses the image, and the mobile phone uses the socket to read the data and decode the display. It is best to use Java for the network and ndk for decoding.
2) based on RTSP/RTP. Suitable for the adaptation of existing RTSP Streaming Media Servers. Android supports RTSP Streaming Media, but only supports RTP over UDP (there is also a saying that RTP over UDP is given priority, and RTP over TCP is attempted only after timeout, resulting in an unbearable waiting time ), different versions are not supported. We recommend that you port a third-party open-source library to download RTSP streams. Java has jlibrtp and C ++ has live555. It is difficult to track and debug the ndk. Check the stability of the C ++ library.
3) it is based on HTTP streaming 3GP/other packages and is suitable for its own streaming media products. Android supports local playback of 3GP from 1.6 to later versions. The server can cut live streams or on-demand files into short 3GP files. The mobile phone uses httpclient to continuously download the files and then throws them to the mediaplayer for playback. Note the pause of file switching.