Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getsnapshot with illegalState and Media exceptions (P900 & 7610)

 
Exti Garus
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For a newbie MMAPI developer, "Taking Pictures with MMAPI" article from Sun's web site is appropriate starting point. In this document, getting snapshot is defined by below snippet:

...
mPlayer = Manager.createPlayer("capture://video");
...
byte[] raw = mVideoControl.getSnapshot(null);
...

I'm using s60 concept SDK emulator, my app. includes above codes and everything is in it's right place for testing. However, in real devices even above simple codes would be a problem source.
I deployed my app. to Sony Ericsson P900 and encountered "MediaException: Mime type null or not supported" for first row.
After that, in Nokia 7610; my app. terminated by "java.lang.IllegalStateException" for second row.

Q.1: What's P900's problem with "capture://video" ?
Q.2: What's 7610's problem with getsnapshot (or assignment) ?

Orcun DAYIBAS (b20021809@cs.hacettepe.edu.tr)
 
Ed Schepis
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to use a specific supported mime-type (null means "use the default PNG type")
Try some format that can be queried from System.getProperty with "video.snapshot.encodings" as the key.
I think that P900 has some bug on it.

About Nokia 7610, as specs say:
IllegalStateException - Thrown if initDisplayMode has not been called.

Ed
 
Sarah Rosie
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the P900 have a MMAPI implementation on it? It's UIQ2.1 OS which doesn't have one as standard. I guess that's why capture video doesn't work.
 
Exti Garus
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sarah Rosie:
Does the P900 have a MMAPI implementation on it? It's UIQ2.1 OS which doesn't have one as standard. I guess that's why capture video doesn't work.


Yes, that's right Sony Ericsson P900 runs UIQ 2.1 on Symbian 7.0. But it includes MMAPI... (ref: http://www.benhui.net/modules.php?name=Midp2Phones )
 
Exti Garus
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ed Schepis:
Try to use a specific supported mime-type (null means "use the default PNG type")
Try some format that can be queried from System.getProperty with "video.snapshot.encodings" as the key.
I think that P900 has some bug on it.

About Nokia 7610, as specs say:
IllegalStateException - Thrown if initDisplayMode has not been called.

Ed


Thank's for reply Ed,
I think your approach about 7610's issue is right. However, about the P900's, encountered exception (MIME type exp.) related to the below row;

 
Sarah Rosie
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's right Sony Ericsson P900 runs UIQ 2.1 on Symbian 7.0. But it includes MMAPI... (ref: http://www.benhui.net/modules.php?name=Midp2Phones )


Ok, then Sony Ericsson must have implemented that bit themselves, on top of what Symbian provides.

Benhui states that neither video nor capturing is supported for MMAPI on P900 on this link:
http://www.benhui.net/modules.php?name=Features

Hope that helps

Sarah
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic