You Are Here:

Community: Wiki

This page was last modified on 11 June 2009, at 09:46.

KIJ001366 - Video streaming not displayed correctly after orientation switch

From Forum Nokia Wiki



ID KIJ001366 Creation date June 11, 2009
Platform S60 3rd Edition, FP2, S60 5th Edition Devices Nokia N96, Nokia 5800 XpressMusic
Category Java ME Subcategory Multimedia


Keywords (APIs, classes, methods, functions): Manager.createPlayer("rtsp://<streaming some media file>");

Description

Streaming video is not correctly displayed in full-screen mode after orientation switch. In some devices, only part of the video will be shown on the screen display, whereas in some devices no video will be displayed at all.

How to reproduce

1. Implement a test MIDlet using the following source code:

import java.io.InputStream;
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
import javax.microedition.media.*;
import javax.microedition.media.control.VideoControl;
 
public class RTSPFullScreen extends MIDlet implements CommandListener, PlayerListener
{
private Display d;
private Player p;
private Canvas c;
 
private Command exitCommand = new Command("Exit", Command.EXIT, 1);
VideoControl vc;
 
public RTSPFullScreen()
{
 
d = Display.getDisplay(this);
 
 
}
 
public void startApp()
{
c = new Canvas()
{
protected void paint(Graphics g)
{
 
g.setColor(0,0,0);
g.fillRect(0,0,getWidth(),getHeight());
 
 
}
};
 
c.setFullScreenMode( true );
c.addCommand( exitCommand );
c.setCommandListener( this );
d.setCurrent( c );
 
try
{
 
 
p = Manager.createPlayer("rtsp://<streaming some media file>");
p.addPlayerListener( this );
p.prefetch();
 
vc = ( VideoControl )p.getControl( "javax.microedition.media.control.VideoControl" );
vc.initDisplayMode( VideoControl.USE_DIRECT_VIDEO, c );
 
 
p.start();
}
catch( Exception e )
{
showAlert( "startApp: " + e.toString() );
}
}
 
public void commandAction( Command c, Displayable s )
{
if (c == exitCommand)
{
destroyApp(false);
notifyDestroyed();
}
}
 
public void pauseApp()
{
}
 
public void destroyApp( boolean uc )
{
if( p != null )
{
p.close();
}
}
 
public void playerUpdate(Player player, java.lang.String event, java.lang.Object eventData)
{
if( event == "started" && player.getState() == Player.STARTED )
{
 
try
{
 
vc.setDisplayFullScreen(true);
vc.setVisible( true );
}
catch( Exception e )
{
showAlert( "playerUpdate: " + e.toString() );
}
}
 
}
 
public void showAlert( String aAlertText )
{
Alert alert = new Alert( "Alert", aAlertText, null, AlertType.ERROR );
alert.setTimeout( 10000 );
d.setCurrent( alert );
}
 
}

2. Launch the MIDlet with the device in portrait orientation.

3. After streaming has started, switch the orientation to landscape.

For the affected devices, either only part of the video will be shown on the screen display or no video will be displayed at all.


Solution

This issue is expected to be fixed in future software versions starting from S60 3rd Edition, Feature Pack 2 and S60 5th Edition.

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fKIJ001203E5fE2dE5fNewE5flineE5fcannotE5fbeE5finsertedE5fwithE5fE2527E255CnE2527E5fcharE5finE5fAlertE5fusingE5fJavaE5fME45E5finE5fS60X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZKnowledgeBaseContentQ qdcZtypeQUqfntypeZKnownIssueQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZKnowledgeBaseContentQ qfnZtypeQUqfntypeZKnownIssueQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZKnowledgeBaseContentQ qrdfZtypeQUqfntypeZKnownIssueQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ