You Are Here:

Community: Developer Discussion Boards

#1 Old pause stop issue in MMAPI - 2009-04-21, 09:42

Join Date: Jul 2008
Posts: 14
unread_chapter
Offline
Registered User
Hi,
I am facing issue in MMAPI.
I try to play video file on a canvas.
When i do a pause, the last snapshot/frame should be visibile on the canvas.
Even when the video has ended, last snapshot/frame should be visible on the canvas.

What i see when i pause or stop is only the canvas and not able to see the last snapshot/frame. On emulator it works properly, but on all devices it is not working.

Would appreciate any kind of help/suggestion

Regards
Deepak
Last edited by unread_chapter : 2009-04-21 at 12:58.
Reply With Quote

#2 Old Thumbs up Re: pause stop issue in MMAPI - 2009-04-21, 13:19

Join Date: Sep 2008
Posts: 1,195
Location: DELHI
Send a message via Yahoo to jitu_goldie
jitu_goldie's Avatar
jitu_goldie
Offline
Forum Nokia Champion
are you repainting the canvas after player stopped or closed or end of media like this...

public void playerUpdate(Player player, String event, Object eventData)
{
if(event.equals(PlayerListener.STOPPED )|| event.equals(PlayerListener.CLOSED) || event.equals(PlayerListener.END_OF_MEDIA))
{
repaint();
}


void paint(Graphics g)
{
// fill the rect with black color equal to display size from display location of //videocontrol
}

then avoid the repainting after media stopped.. like this..

public void playerUpdate(Player player, String event, Object eventData)
{
if(event.equals(PlayerListener.CLOSED) || event.equals(PlayerListener.END_OF_MEDIA))
{
repaint();
}

hope this makes sense to you..


thanks,
jitu_goldie..

KEEP TRYING..
Last edited by jitu_goldie : 2009-04-21 at 20:03.
Reply With Quote

#3 Old Re: pause stop issue in MMAPI - 2009-04-21, 13:35

Join Date: Apr 2009
Posts: 89
Osam
Offline
Regular Contributor
Hi,

The Given code is working Fine Nokia N95 Check this Out..

Quote:
public void playVideo()
{
try
{
Form vidForm = new Form("CameraPlayer");
InputStream is = getClass().getResourceAsStream("/VideoClip.3gp");

player = Manager.createPlayer(is,"video/mpeg");
player.prefetch();
player.realize();

vidCtrl = (VideoControl)player.getControl("VideoControl");
if (vidCtrl != null)
{
videoItem = (Item)vidCtrl.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);
vidCtrl.setDisplaySize(140, 140);
vidForm.append(videoItem);
Control [] controls = player.getControls();
for (int i = 0; i < controls.length; i++)
{
if (controls[i] instanceof GUIControl && controls[i] != vidCtrl)
{
vidForm.append((Item)controls[i]);
}
}
player.start();
}
else
{
System.out.println("Error: Can not create VideoControl");
return;
}


Display.getDisplay(this).setCurrent(vidForm);
}
catch(Exception e)
{
System.out.println("The Exception in*******="+e);
}
}


Thanks
Osam
Last edited by Osam : 2009-04-21 at 13:49.
Reply With Quote

#4 Old Re: pause stop issue in MMAPI - 2009-04-22, 08:29

Join Date: Jul 2008
Posts: 14
unread_chapter
Offline
Registered User
Hi Osam,
You have taken form to display the video.
I am working on canvas.

Regards
Deepak
Reply With Quote

#5 Old Thumbs up Re: pause stop issue in MMAPI - 2009-04-22, 09:11

Join Date: Sep 2008
Posts: 1,195
Location: DELHI
Send a message via Yahoo to jitu_goldie
jitu_goldie's Avatar
jitu_goldie
Offline
Forum Nokia Champion
Quote:
Originally Posted by unread_chapter View Post
Hi,
I am facing issue in MMAPI.
I try to play video file on a canvas.
When i do a pause, the last snapshot/frame should be visibile on the canvas.
Even when the video has ended, last snapshot/frame should be visible on the canvas.

What i see when i pause or stop is only the canvas and not able to see the last snapshot/frame. On emulator it works properly, but on all devices it is not working.

Would appreciate any kind of help/suggestion

Regards
Deepak
STILL NOT GIVING ANSWER OF MY PREVIOUS POST..

ARE U REPAINTING THE CANVAS AFTER GETTING PLAYER STOP OR PAUSE?
CHECK AND REPLY


thanks,
jitu_goldie..

KEEP TRYING..
Reply With Quote

#6 Old Re: pause stop issue in MMAPI - 2009-04-22, 15:31

Join Date: Apr 2009
Posts: 89
Osam
Offline
Regular Contributor
Hi,

I have check my code is also work in Canvas.
If u have any kind of problem then let me know. I send u the Canvas code also.

Thanks
Osam
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
Similar Threads
Thread Thread Starter Forum Replies Last Post
AsyncStop doesn't stop MMsvSessionObserver Effekt Symbian Networking & Messaging 10 2008-12-26 14:59
编译gcc时遇到了问题为: *** missing separator. Stop TurboC Symbian 8 2008-09-11 09:26
devsound Pause problems sk_sigurd Symbian Media (Graphics & Sounds) 5 2008-07-15 10:08
issue with at+cusd over bluetooth link hbanks General Messaging 2 2007-09-25 22:21
two issues in s60 MIDP SDK when using MMAPI leting Mobile Java Tools & SDKs 0 2003-06-22 18:26

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