| Reply | « Previous Thread | Next Thread » |
|
Hi
When i try to capture image in N80 using videoControl.getSnapShot() ( byte[] snap = videoControl.getSnapshot("encoding=jpeg");) sometimes i'm getting an exception "javax.microedition.media.MediaException: Symbian OS error: -2". How can i solve this. jini |
|
http://www.newlc.com/Symbian-OS-Error-Codes.html
KErrGeneral -2 General (unspecified) error Sometimes, but not always? Are you taking snapshots quickly after one another? It might be that the system is not ready for a new snapshot. However this is only guesswork - too little details Hartti |
|
hi
thanks for the reply. I'm getting that symbian error -2 when i'm taking snap shots quickly one after another. How can i check in my app that the phone is ready for taking snap shot. Only in N80 i'm facing this problem. Other phones like N91,E70,N72...are working fine with the same app. jini |
|
Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
Offline
Super Contributor
|
|
hi jini,
can you handle that error (checking error message for details) and just skip "current frame" snapshot? that way you will have some frames skipped (due to hardware limitations as it seems) simply, regards, peter |
| peterblazejewicz |
| View Public Profile |
| Find all posts by peterblazejewicz |
|
hi peter
what do you mean by skipping current frame? i could catch that error. What should i do in catch block for this error? jini |
|
Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
Offline
Super Contributor
|
|
hi jini,
you're taking snapshots as repetitive task, So I woudl try to handle error, skip current task using previusly succesfully captured image for current frame (or pure white/pure black image), reschedule (or wait/sleep depending on thread design), try to take next capture, etc. If it fails e.g. for five subsequent execution I would abort entire task , remove last five "fake" images from queue and show notice to user. just an idea for safe fallback, not solution, all depends on your application, regards, Peter |
| peterblazejewicz |
| View Public Profile |
| Find all posts by peterblazejewicz |
|
hi
Could you please explain it in detail. Or can you give some sample source code for this? jini |
|
Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
Offline
Super Contributor
|
|
hi,
i'd probably try: Code:
void aRepeatableMethodRunFromScheduledThread
try
capture image data from camera (player/control)
save created image is some way
catch
// check for message from system or instance of exception
// use multiple catch and/or read details from error message
increase number of failed task
// optionally
save previously captured image as current one
//
if number of failed tasks is greater then MAX_TASK_TO_FAIL
cancel scheduled task completly
end if
finally
increase total counter of repeated tasks
release resources
end of try
regards, Peter |
| peterblazejewicz |
| View Public Profile |
| Find all posts by peterblazejewicz |
|
I am trying to capture image on Nokia 6131 NFC. It supports JPEG Encoding. I am capturing image as:
byte[] raw = this.vc.getSnapshot("encoding=jpeg"); and I get MediaException and it says that requested format does not support. This code works fine on Nokia N91 what could be the problem? |
|
The Series 40 implementation supports the locator capture://image.
Are you using this? Hartti |
|
Yes, that was the problem, I fixed it
Thanks anyways! |
|
hey hartti ,
i am using nokia 6650 mobile , i have a program that captures image but its not saving in mobile devise . How to save image in mobile device . can u pls help me. |
|
|
|
hey hartti,
i could not understand much ...could u please give me some other example ... |
|
tdingu, please do not post the same question many times on these boards. I will remove the duplicates (I already removed one).
After the snapshot, you have the image data in your MIDlet. The code sample I linked to, contains a method to save that data on the phone's memory. Combining this method in your MIDlet should be quite straightforward. Please check it again. You could also check this article http://developers.sun.com/mobility/a...ion/index.html Hartti
Last edited by hartti : 2008-10-12 at 08:59.
Reason: typo
|
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| XMl Parser Implementation for Symbian | ittiam | General Symbian C++ | 26 | 2009-09-16 06:26 |
| stupid error! | bojkar | General Symbian C++ | 1 | 2006-12-14 06:47 |
| error PRJ0019: A tool returned an error code from "Performing Makefile project action | mubx2000 | Symbian Tools & SDKs | 1 | 2006-09-08 08:05 |
| My BuilderX (with S60 SDK 2.1.NET MS version) cannot build ARMI UREL | danielvidonyi@hotmail.com | Symbian Tools & SDKs | 1 | 2006-05-04 22:30 |
| User break point error in Grid | ag24master | Symbian User Interface | 0 | 2003-08-07 09:20 |