Header Sep
Java Tips, Tricks & Code
 
My Rating Score
Login to rate page

January 2005
Go streaming with V800

[Back]

 

The Sony Ericsson V800 supports video streaming in MIDlets using RTSP (Real-Time Streaming Protocol). The streaming functionality is very easy to use. If you've ever used the Player class to play audio or to take snapshots, you've already got what it takes!

In short, you only supply your Player instance with the proper URL and start it as any other player, making your code look something like this:

Player p =Manager.createPlayer("rtsp://MyServer/myVideo.3gp");
p.realize();
p.start();

However, there is one important thing to remember: You must not call the player in the event thread, for example inside a CommandListener, as doing so may block the system.

Below is the full MIDlet source code to test the streaming functionality. Remember that you'll have to set up an RTSP capable streaming server with a 3gp file to stream, and add its URL to the method startStreaming() before compilation.

Download MIDlet source code:

StreamingVideo.txt

My Rating Score
Login to rate page