You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#1 Old getSnapShot Error - 2006-11-13, 14:45

Join Date: Jan 2006
Posts: 90
jini_1
Offline
Regular Contributor
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
Reply With Quote

#2 Old Re: getSnapShot Error - 2006-11-14, 20:43

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
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
Reply With Quote

#3 Old Re: getSnapShot Error - 2006-11-15, 06:55

Join Date: Jan 2006
Posts: 90
jini_1
Offline
Regular Contributor
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
Reply With Quote

#4 Old Re: getSnapShot Error - 2006-11-16, 01:14

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
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
Reply With Quote

#5 Old Re: getSnapShot Error - 2006-11-17, 10:00

Join Date: Jan 2006
Posts: 90
jini_1
Offline
Regular Contributor
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
Reply With Quote

#6 Old Re: getSnapShot Error - 2006-11-18, 00:19

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
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
Reply With Quote

#7 Old Re: getSnapShot Error - 2006-11-20, 07:51

Join Date: Jan 2006
Posts: 90
jini_1
Offline
Regular Contributor
hi

Could you please explain it in detail. Or can you give some sample source code for this?

jini
Reply With Quote

#8 Old Re: getSnapShot Error - 2006-11-21, 00:08

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
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
just by the way: if that error occurs are you able to acquire VideoControl from player? and to read any of its properties?

regards,
Peter
Reply With Quote

#9 Old Re: getSnapShot Error - 2007-05-08, 05:16

Join Date: May 2007
Posts: 36
Location: Luleå, Sweden
zhs_bravo's Avatar
zhs_bravo
Offline
Registered User
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?
Reply With Quote

#10 Old Re: getSnapShot Error - 2007-05-08, 09:39

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
The Series 40 implementation supports the locator capture://image.
Are you using this?

Hartti
Reply With Quote

#11 Old Re: getSnapShot Error - 2007-05-09, 00:25

Join Date: May 2007
Posts: 36
Location: Luleå, Sweden
zhs_bravo's Avatar
zhs_bravo
Offline
Registered User
Yes, that was the problem, I fixed it

Thanks anyways!
Reply With Quote

#12 Old Re: getSnapShot Error - 2008-10-12, 00:00

Join Date: Sep 2008
Posts: 16
tdingu
Offline
Registered User
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.
Reply With Quote

#13 Old Re: getSnapShot Error - 2008-10-12, 00:04

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
See this code
http://wiki.forum.nokia.com/index.ph...ile_in_Java_ME

Hartti
Reply With Quote

#14 Old Re: getSnapShot Error - 2008-10-12, 00:22

Join Date: Sep 2008
Posts: 16
tdingu
Offline
Registered User
hey hartti,
i could not understand much ...could u please give me some other example ...
Reply With Quote

#15 Old Re: getSnapShot Error - 2008-10-12, 08:59

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
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 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
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

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