07-30-2010 09:34 AM
I am creating an app in J2ME trying to access video from rtsp server. If I connect via SocketConnetion :
SocketConnection sc = (SocketConnection)Connector.open("socket://rtsp://
I get IllegalException : Malformed
On direct access, if I give http://java.sun.com/products/java-media/mma/media/
player = Manager.createPlayer(url); // URL = rtsp://qt2.netro.ca/princess_54.3gp
I don't get anything, no exception, error, it is not doing anything. Testing on wireless toolkit.
I am using :
Can anyone point out where am I going wrong? Why do I get MalformedException on Connection.open().
Any help is appreciated. Please help me solve out.
Solved! Go to Solution.
07-30-2010 09:42 AM
If you have rtsp url then that url will directly play the video in mobile browser like
BrowserSession browser = Browser.getDesaultSession();
browser.displayPage("your rtsp url");
07-30-2010 01:20 PM
But I want to stream the video and show it. Not just display in the browser.
But anyways, this also helped me as I learned something new.
Thanks. If you could help in my issue that would be good. I need to know the syntax for SocketConnection ("socket://.....") and DatagramConnection ("datagram://....)
07-31-2010 05:38 AM
Oh I found the solution.
For SocketConnection its :
SocketConnection sc = (SocketConnection)Connector.open("socket://qt2.net
For DatagramConnection its :
socket = (DatagramConnection)Connector.open("datagram://:80
Just if anybody is stuck like me, this code coild be helpful.