BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 05-08-2009, 11:23 AM   #1 (permalink)
New Member
 
Join Date: Dec 2006
Model: 8800
Carrier: Vodafone Spain
Posts: 1
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Streaming on Storm via RTSP

Please Login to Remove!

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
Offline  
Old 05-12-2009, 09:16 PM   #2 (permalink)
New Member
 
Join Date: Oct 2008
Model: 8800
PIN: N/A
Carrier: rogers
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there
You can actually use the MediaPlayer

Code:
 try
                    {
                    player = Manager.createPlayer(url);
                    player.realize();
                    videoControl = (VideoControl)player.getControl("VideoControl");
                    //videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
                    
                   
                    
                    
                    Field videoField = (Field)videoControl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
                    videoControl.setDisplaySize(XXX , XXX);
                    videoControl.setDisplayLocation(XXX, XXX);
                   
                    videoControl.setVisible(true);
                    
                   player.start();
                    
                    }
Or else you can use a BrowserSession and it will then invoke the Standard Media Player and play the RTSP stream...

I have to mention that you will have to make sure that your firewall is set up properly to allow the RTSP stream through, it took me a while to figure it out and the Blcakberry is a bit fussy about stream playback.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

SUPERMICRO X5DA8 DUAL 3GHZ XEON MOTHERBOARD W/CPU+HSF+2GBRAM+IO SHIELD
$399.99
SUPERMICRO X5DA8 DUAL 3GHZ XEON MOTHERBOARD W/CPU+HSF+2GBRAM+IO SHIELD  pictureLOT OF 2 INTEL XEON SLACB CPU/MICROPROCESSORS E5310
$19.99
LOT OF 2 INTEL XEON SLACB CPU/MICROPROCESSORS E5310 pictureDELL PRECISION 490 WORKSTATION XEON 5160 3GHZ/8GB/QUADRO FX/XPPRO COA
$149.99
DELL PRECISION 490 WORKSTATION XEON 5160 3GHZ/8GB/QUADRO FX/XPPRO COA pictureQty 2 Dell Poweredge 1950 Servers w/ Nortel CCMS CCMA Contact Center Management
$1199.0
Qty 2 Dell Poweredge 1950 Servers w/ Nortel CCMS CCMA Contact Center Management pictureMouse Pad Home Office Intel inside Xeon Xeonorator Iinside X5650
$10.0
Mouse Pad Home Office Intel inside  Xeon Xeonorator Iinside X5650 picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.