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
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

RTSP Streaming issue

Hi All,

 

I am creating a demo app to stream video via RTSP protocol and using VLC player as a RTSP server. When i play the attached video file with custom player then

1: Most of the time it shows me the blank screen. However, the player instance gets events like timeupdated, End of file etc.
2: And sometime, Unspecified: Some error occurred which does not fit into any other category.

 

And I tried to play the same file with native media player via browser but no luck.

 

And one more thing, When i play the same file from file system or from http server. It playbacks fine in native player as well as in custom player. So i think nothing wrong with the video file i am trying to play with RTSP.

 

Please help me on this.

 

Source code: 

Player _player = javax.microedition.media.Manager.createPlayer("rtsp://192.168.1.100:554/video.mp4");
_player.realize();
VideoControl _videoControl = (VideoControl)_player.getControl("VideoControl");
            
Field _videoField = (Field)_videoControl.initDisplayMode( VideoControl.USE_GUI_PRIMITIVE, "net.rim.device.api.ui.Field" );
_volumeControl = (VolumeControl) _player.getControl("VolumeControl");
_volumeControl.setLevel(30);
			
_player.addPlayerListener(new PlayerListener(){
          public void playerUpdate(Player player, String event, Object eventData){
                            if(event.equals(PlayerListener.BUFFERING_STARTED)){
                                System.out.println("Buffering started");
                            } else if (event.equals(PlayerListener.BUFFERING_STOPPED)){
                                System.out.println("Buffering stoped");
                            } else if (event.equals(PlayerListener.CLOSED )){
                                System.out.println("Player closed");
                            } else if (event.equals(PlayerListener.END_OF_MEDIA )){
                                System.out.println("Player END_OF_MEDIA");
                            } else if (event.equals(PlayerListener.STARTED )){
                                System.out.println("Player STARTED");
                            } else if (event.equals(PlayerListener.STOPPED )){
                                System.out.println("Player STOPPED");
                            } else if (event.equals(PlayerListener.STOPPED_AT_TIME )){
                                System.out.println("Player STOPPED_AT_TIME");
                            } else if (event.equals(PlayerListener.VOLUME_CHANGED )){
                                System.out.println("Player VOLUME_CHANGED");
                            } else if (event.equals(PlayerListener.DEVICE_UNAVAILABLE )){
                                System.out.println("Player DEVICE_UNAVAILABLE");
                            } else if (event.equals(PlayerListener.DEVICE_AVAILABLE  )){
                                System.out.println("Player DEVICE_AVAILABLE");
                            } else if (event.equals(PlayerListener.ERROR  )){
                                System.out.println("Player ERROR: "+ getMessage(eventData));
                            } else if (event.equals( "com.rim.medialoaded"  )){
                                System.out.println("Player media loaded");
                            } else if (event.equals( "com.rim.loading"  )){
                                System.out.println("Player media loading");
                            } else {
                                System.out.println("Unknown event: "+event);
                            }
                       }
           });
_player.start();   

 

 

Device using for testing.
1: Blackberry curve 8900
2: OS version 5.0.0.1036
3: VLC as RTSP server.

 

 

Thanks in advance.

Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
New Developer
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

Re: RTSP Streaming issue

one more question: 

 

Does native media player use HTTP progressive download when we user below statement? 

 

 

 

javax.microedition.media.Manager.createPlayer("http://192.168.1.100/video.mp4");

 

or it first download complete file and then playbacks?

 

Thanks in advance

 

Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
New Developer
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

Re: RTSP Streaming issue

Anyone can help me on this.

Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.
New Developer
vijaysaini
Posts: 72
Registered: ‎08-28-2008
My Device: Not Specified

Re: RTSP Streaming issue

Anyone can help me on this.

Regards,
Vijay Saini.
--------------------------------------------------------------------------------
If your problem was get solved then please mark the thread as "Accepted solution" and kudos - your wish
Please use plain text.