Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
mfernandez
Posts: 13
Registered: ‎04-29-2008
My Device: Not Specified

RTSP video in Storm

 

Hi, I want to make a connection to an IP camera via RTSP and display it in a VideoControl with Storm.

The url works fine in the browser of the Storm. 

I'm using JDE 4.7.0. Basically the code is:

 

connectionTest = (StreamConnection)Connector.open(_Url);

 

InputStream is = connectionTest.openInputStream();
player = javax.microedition.media.Manager.createPlayer(is, "video/mpeg");

player.realize();
videoControl = (VideoControl)player.getControl("VideoControl");

if (videoControl != null) {

_videoField = (Field) videoControl.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
videoControl.setDisplayFullScreen(true);
videoControl.setVisible(true);

}

player.start(); 


The error is ERROR class java.lang.NullPointerException: null


Thanks
Please use plain text.
New Developer
mfernandez
Posts: 13
Registered: ‎04-29-2008
My Device: Not Specified

Re: RTSP video in Storm

Wow, really... no answer??
Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: RTSP video in Storm

Have you traced down which object is null?

Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
Developer
mreed
Posts: 1,041
Registered: ‎07-16-2008
My Device: ಠ_ಠ

Re: RTSP video in Storm

Please use plain text.
New Developer
mfernandez
Posts: 13
Registered: ‎04-29-2008
My Device: Not Specified

Re: RTSP video in Storm

Hello, thanks both for your answers. I know I have to use the DataSource for streaming but you have an example of how it implements ?. I have been working with the example "bufferedplaybackdemo" but I have problems.
Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: RTSP video in Storm

Did you find which object is null?

Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
New Developer
mfernandez
Posts: 13
Registered: ‎04-29-2008
My Device: Not Specified

Re: RTSP video in Storm

 Yes, that was solved, thanks BBDeveloper, but the problem I have now is that I do not know how to implement the DataSource with a RTSP link. The error is "Protocol not found: net.rim.device.cldc.io.rtsp.Protocol". 
Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: RTSP video in Storm

The simualtor which you currently tryins is able to play the RTSP link thru browser.

Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
New Developer
mfernandez
Posts: 13
Registered: ‎04-29-2008
My Device: Not Specified

Re: RTSP video in Storm

The RTSP link works fine through the browser of the Storm. In simulator does not work, but it's normal right?
Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: RTSP video in Storm

For me RTSP link works on simulator browser on JDE 4.6.0.12, 9000 Simulator.

Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.