You Are Here:

Community: Developer Discussion Boards

#1 Old Play video downloaded over HTTP on 6680 and N90 - 2006-02-06, 17:00

Join Date: Oct 2004
Posts: 29
Emmanuel Raulo
Offline
Registered User
Hello

I have an application that downloads 3GP video over HTTP and plays it back on a Nokia 3230.
If I create the player from the URL (i.e. Manager.createPlayer(URL);) it throws an exception but works OK when creating it from an InputStream (i.e. Manager.createPlayer(Connector.openInputStream(URL),"video/3gpp");). I don't understand that and am assuming it to be a bug. But OK, I've got that Connector.openInputStream() workaround.

Now I want to use this app on 6680 and N90 but it will just stall while realizing the Player object, not throwing any exception and not leaving the realize() method.
Here is the code where my app will stall:

_Player = Manager.createPlayer( Connector.openInputStream(_MediaURI), "video/3gpp" );
_Player.realize();
_Player.prefetch();
_VideoControl = (VideoControl)_Player.getControl( "VideoControl" );
deleteAll(); // remove every Item from "this" form
_VideoItem = (Item)_VideoControl.initDisplayMode( GUIControl.USE_GUI_PRIMITIVE, null );
_VideoItem.setLayout( Item.LAYOUT_LEFT | Item.LAYOUT_TOP );
_VideoItemIndex = append( _VideoItem );

This code is executed in a separate thread but the UI never changes. A look at the HTTP server's access log however shows that the content was properly requested.

My app also holds a persistent TCP connection to some server. With some SIM cards, it prevented HTTP requests to be made simultaneously but does not seem to be the problem here since I've been able to fetch some other content over HTTP at the time the app stalls and my access log shows the request for the video content.

Does somebody have any clues ?
Am I missing something or is this really an issue with S60 2nd Ed FP2 & 3 ?
Any help will be welcome !
Last edited by Emmanuel Raulo : 2006-02-06 at 17:16.
Reply With Quote

#2 Old Re: Play video downloaded over HTTP on 6680 and N90 - 2006-02-07, 04:51

Join Date: Apr 2004
Posts: 31
Location: Philippines
Send a message via Yahoo to charisse
charisse
Offline
Registered User
I've done exactly the same as what you did in creating the player[1] and it was working fine on 6680.

My question is, how can you invoke the default player (the one that is installed on the phone) from a MIDlet application? Is it possible? Because I can't seem to play a 3gp file using my MIDP application but the phone's default player can...

[1]
public void open(String url) {
//try {
try {
if ( player == null ) {
if (true/*url.startsWith("resource:")*/) {
player = Manager.createPlayer( Connector.openInputStream("http://mobile.anxa.com/dev/test.3gp"), "video/3gpp" );
}
else {
player = Manager.createPlayer(url);
}
player.addPlayerListener(this);
}
System.out.println("Realizing...");
player.realize();
}catch(Exception e) {
e.printStackTrace();
System.out.println("Realize error!!!");
}

try {
if ((vidc = (VideoControl) player.getControl("VideoControl")) != null) {
vidc.initDisplayMode(VideoControl.USE_DIRECT_VIDEO, this);
//vidc.setDisplayFullScreen(true);
vidc.setDisplayLocation(8, 8);
vidc.setDisplaySize(176, 208);
vidc.setVisible(true);
}

Control [] controls = player.getControls();

for (int i = 0; i < controls.length; i++) {
if (controls[i] instanceof VolumeControl)
vc = (VolumeControl) controls[i];
if (controls[i] instanceof RateControl)
rc = (RateControl) controls[i];
if (controls[i] instanceof FramePositioningControl)
fpc = (FramePositioningControl) controls[i];
}
System.out.println("Prefetching...");
player.prefetch();
}catch(Exception e) {
e.printStackTrace();
System.out.println("Prefetch error!!!");
}

if (vidc == null)
addCommand(pauseCommand);
/*}catch (Exception me) {
System.out.println("asdfgh");
me.printStackTrace();
player = null;
}*/
}
Reply With Quote

#3 Old Re: Play video downloaded over HTTP on 6680 and N90 - 2006-02-07, 09:29

Join Date: Oct 2004
Posts: 29
Emmanuel Raulo
Offline
Registered User
Quote:
Originally Posted by charisse
I've done exactly the same as what you did in creating the player[1] and it was working fine on 6680.
Can you tell me what firmware version it was ?

Quote:
My question is, how can you invoke the default player (the one that is installed on the phone) from a MIDlet application?
There's already a thread for that question. Let's keep the answers there...
Last edited by Emmanuel Raulo : 2006-02-07 at 09:45.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
[IMG] code is Off
HTML code is Off
Forum Jump

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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d134434X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ