Google Answers Logo
View Question
 
Q: J2ME: Problem in Nokia Solution for a media problem ( No Answer,   0 Comments )
Question  
Subject: J2ME: Problem in Nokia Solution for a media problem
Category: Computers > Programming
Asked by: mohamad83-ga
List Price: $20.00
Posted: 16 Aug 2005 03:28 PDT
Expires: 21 Aug 2005 01:41 PDT
Question ID: 556276
Hey experts,

The following issue was in a document by nokia on its forum site,
(document's name: Developer Platform 2.0: Known Issues)

Overview: If you have released resources by using the deallocate()
method, you cannot use the prefetch() method anymore to get the player
to PREFETCHED state.

Reported: against Series 60 Developer Platform 1.0 and 2nd Edition 

Date identified: April 21, 2005 

Symptoms: - 

Detailed description: A Player has five states: UNREALIZED, REALIZED,
PREFETCHED, STARTED, and CLOSED. If the player is in PREFETCHED state,
you can release the reserved resources by calling the deallocate()
method. After that you cannot prefetch the resources anymore. If you
call the prefetch() method after calling the deallocate() method, you
will get MediaException. Note that this concerns Series 60 devices.
Calling prefetch() is working in Series 40 devices with the MMAPI
implementation.

How to reproduce: If your player is in the PREFETCHED state, call
deallocate() and after that call prefetch().

Solution: If your player is in PREFETCHED state, don?t call
deallocate() and after that the prefetch() method.

I had this problem in a MIDlet program, so I removed any call for
deallocate() in the program, but I still had this problem in the
following piece of code:

player = Manager.createPlayer("capture://audio?encoding=amr");
player.realize();
rc = (RecordControl)player.getControl("RecordControl");                        
output = new ByteArrayOutputStream();
rc.setRecordStream(output);
player.prefetch();
player.start();
rc.startRecord();

A MediaException is occuring in the mobile at the player.preftech()
statement although the flow of the state of the player is as follows:
UNREALIZED->REALIZED
->PREFETCHED (i.e. there is no place where the state goes back from
PREFETCHED to REALIZED), but the problem is still occuring!!..any help
on this??

P.S.: The price of the question can be added upon need

Clarification of Question by mohamad83-ga on 21 Aug 2005 01:41 PDT
I solved the problem myself...the encoding type should be changed; check out:
http://www.awprofessional.com/articles/article.asp?p=375708&seqNum=1
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy