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
Marek_
Posts: 24
Registered: ‎07-20-2009
My Device: Not Specified

Re: RTSP connection - Streaming

Check this list: http://www.blackberry.com/btsc/viewContent.do?externalId=KB05482
But be aware that you shouldn't check whether a simulator can streaming or not, since a real device might be capable of playing and corresponding simulator not...
Please use plain text.
New Developer
gtg287y
Posts: 7
Registered: ‎09-01-2009
My Device: Not Specified

Re: RTSP connection - Streaming

*nods* Right, I understand that the phones and the simulators have different capabilities...but is the differences documented anywhere?  For example, I keep seeing references that such a such a phone is capable of X, while such and such a simulator can do Y.  In some cases, I've seen that one version of the 9000 simulator can do something that no other can (or at least, people are implying this). Rather than download every single simulator on earth, I'm wondering if anyone thought to document what each version of the simulator can do.

 

Thanks for the list of phone capabilities, though! I'm noticing, however, that none of them mention HTTP Streaming?  Does this mean it simply is not handled, even for the 9000?

 

 

-Jenny

Please use plain text.
Contributor
devendra
Posts: 14
Registered: ‎11-09-2011
My Device: 8830 4.5 o.s

Re: RTSP connection - Streaming

 is blackberry 8830 support video streaming or not..

can any one help me..

i died to play the rtsp video on blackberry device 8830..

i have a project in which i consumed the web service and get the rtsp link...

i then pass that rtsp link in player class when i run it on 8830 simulator then no error come,no exception,nothing and a blackscreen comes up...

same thing with 8830 device when running on it the mobile is hanged nothing happens by any key then switched off the cell and again run but having the same issue....

 

 

IF THIS FOURAM IS NOT ABLE TO SOLVE THE PROBLEM OF DEVELOPER THEN PLZZZZZZ REMOVE THIS... 

 

no one is here to solve or give reply..

my code is here

 

my code is not playing on my 8830 mobile..........

no error in my code......

i want to play the rtsp url on mobile

 

my code is:

 

CLASS 1

 

 

package mypackage;

import net.rim.device.api.ui.UiApplication;


public class MyApp extends UiApplication
{

public static void main(String[] args)
{
// Create a new instance of the application and make the currently
// running thread the application's event dispatch thread.
MyApp theApp = new MyApp();
theApp.enterEventDispatcher();
}


public MyApp()
{
// Push a screen onto the UI stack for rendering.
// pushScreen(new playHTTPVideo());
BrdcstMessage brd = new BrdcstMessage();
brd.setMsg1("rtsp://www.emstv.in/contents/video/MO_Video/Madhya_Pradesh/Madhya_Pradesh_MP_Nagar_Zone_1_318671288.3gp");

pushScreen(new VideoView(brd));

System.out.println("===============================control is in my app class main====================");

}
}

CLASS 2

 

 

package mypackage;

public class BrdcstMessage {

String msg1;

public void setMsg1(String msg) {
System.out.println("***************************** set msg1 broadcast class************************");
this.msg1= msg;
}
public String getMsg1() {
return msg1;
}


}

Class 3

 

package mypackage;

import java.io.IOException;

import javax.microedition.media.MediaException;
import javax.microedition.media.Player;
import javax.microedition.media.control.VideoControl;

import net.rim.device.api.ui.Field;
import net.rim.device.api.ui.container.MainScreen;

public class VideoView extends MainScreen
{
private Player _player;
private Field _videoField;
private VideoControl _vc;

// Constructor
public VideoView(BrdcstMessage msg)
{
super(net.rim.device.api.ui.Manager.NO_VERTICAL_SCROLL);

System.out.println("****************************************************initVideo over*");


initVideo(msg.msg1);//msg._MsgUrl = rtsp://website addess/some.3gp;
System.out.println("********************************************* the msg is means Rtsp is*********************************=="+msg.msg1);

if(_videoField != null)
{
System.out.println("*******************************_videoField***************************"+_videoField );
displayVideo();
System.out.println("*******************************displayVideo over**************");
}
}


private void setVideoSize(int width, int height)
{
try
{
if (_vc != null)
{
System.out.println("************************set video size");
_vc.setDisplaySize(width, height);
System.out.println("************************set video size---------");
}
}
catch(MediaException pe)
{
System.out.println(pe.toString());
}
}

/**
* Creates and initializes a video player
* @param url The URL of the video file to play
*/
private void initVideo(String url)
{
try
{
_player = javax.microedition.media.Manager.createPlayer(url) ;
_player.realize();
System.out.println("*****************************_player * "+_player);
_vc = (VideoControl) _player.getControl("VideoControl");
System.out.println("*****************************_vc *************************"+_vc);
if (_vc != null)
{
_videoField = (Field) _vc.initDisplayMode (VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field");
System.out.println("*****_videoField *"+_videoField);
_vc.setVisible(true);
}
}
catch(MediaException pe)
{
System.out.println("----************************----initVideo-----MediaException="+pe.getMessage());
}
catch (IOException ioe)
{
System.out.println("----************************----initVideo-----MediaException="+ioe.getMessage());
}
}

private void displayVideo()
{
// setTitle("Send Media Demo");
add(_videoField);
System.out.println("*****************************displayVideo-----------_videoField added*");

try
{
// Start media player
_player.start();
System.out.println("*****************************displayVideo-------------_player started*");
}
catch(MediaException pe)
{
System.out.println("--------displayVideo-----MediaException="+pe.getMessage());
}
}

protected void sublayout(int width, int height)
{
System.out.println("----************************----sublayout");
//setVideoSize(Display.getWidth(), Display.getHeight());

super.sublayout(width, height);
}


public boolean onClose()
{
System.out.println("----************************----onClose");
_player.close();
System.out.println("onClose");
return super.onClose();
}
}

Please use plain text.