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
Regular Contributor
divya
Posts: 77
Registered: ‎02-17-2010
My Device: Not Specified
Accepted Solution

Video not visible

[ Edited ]

Hi All,

 

 Here is my code for streaming video. I can hear sound but cant see video. not able to figure out the problem.. please help me

Device :9550

OS : 7

 

String url = "rtsp://184.72.239.149/vod/mp4:BigBuckBunny_175k.mov;deviceside=true;interface=wifi";
				Player player;
				try {
					player = javax.microedition.media.Manager.createPlayer(url);
					player.realize();

					VolumeControl vc = (VolumeControl) player
							.getControl("VolumeControl");
					if (vc != null) {
						vc.setLevel(100);
					}

					player.start();
				} catch (Exception e) {
					Dialog.inform(e.toString());
					e.printStackTrace();
				}

 

 

Even i tried this code. This code works properly in simulator . I can see video also. But in phone i can hear just audio and video is not visible at all :smileysad:

 

player = Manager.createPlayer("file:///SDCard/Coldplay.3gp");
			player.realize();

			if ((vc = (VideoControl) player.getControl("VideoControl")) != null) {

				vc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, canvas);

				vc.setDisplayLocation(15, 15);

				vc.setDisplaySize(200, 200);

				vc.setVisible(true);
player.start();

 

Screenshot ( simulator )

 

screenshot

 

Thanks,

Divya

Please use plain text.
Retired
Retired
BVP
Posts: 150
Registered: ‎10-19-2010
My Device: Not Specified

Re: Video not visible

[ Edited ]

Hi Divya!

 

It could be that the video codec is not supported but the audio codec is.  You can verify this by looking at the com.rim.playableStreams event.  This KB article tells you how to decipher it.

Please use plain text.
Regular Contributor
divya
Posts: 77
Registered: ‎02-17-2010
My Device: Not Specified

Re: Video not visible

Thanks BVP for your help !!

 

I solved it using following method

 

Field videoView= (Field) vc.initDisplayMode(
						VideoControl.USE_GUI_PRIMITIVE,
						"net.rim.device.api.ui.Field");
				
				
vc.setDisplayFullScreen(true);

vc.setVisible(true);

add(videoView);

 

Please use plain text.