forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sceUsbCamSetupStill error and go!cam info

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Fri Jul 25, 2008 7:36 pm    Post subject: sceUsbCamSetupStill error and go!cam info Reply with quote

error 80243905. I'm trying to mess up with code from the chottoCam post here on ps2dev. Simply changing "preview" video framerate to 60
Code:
videoparam.framerate = PSP_USBCAM_FRAMERATE_60_FPS;

and replacing copy to framebuffer with a nicer
Code:
      m = 0;
      n = 0;
      for (i = 0; i < 272; i++)
      {
         memcpy(&vram[n],&framebuffer[m],1920);
         m += 480;
         n += 512;
      }

leads to the said 80243905 error code from sceUsbCamSetupStill(&stillparam); when trying to take a still (r-button press).

Anyway...i was taking a look at pspusbcam.h; the functions exported by usbcam module resemble those of any mobile phone's camera. I argue that this is not an application library, but something exported directly by camera hardware. So the question is: is it possible to obtain raw (uncompressed) data from go!cam?
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Sun Jul 27, 2008 1:28 am    Post subject: Reply with quote

The error code is because of the way you setup your stillparam. Can you paste it here?
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sun Jul 27, 2008 3:50 am    Post subject: Reply with quote

...as i said the example is exactly the same you can find here(http://forums.ps2dev.org/viewtopic.php?t=7074&start=0) except for the changes i pointed out. Doesn't seem to be a simple param formatting issue....maybe i'm an idiot and i caused memory corruption with my frame copy code, but i can't see any problem in that simple snippet; and video goes nicely until i try to stop it and take a still....
Back to top
View user's profile Send private message
moonlight



Joined: 26 Oct 2005
Posts: 567

PostPosted: Sun Jul 27, 2008 9:58 am    Post subject: Reply with quote

Which is the size of the image you try to get? Maybe if it is too high, you should decrease the video frame rate (or the size of the image to keep the frame rate)
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Sun Jul 27, 2008 6:03 pm    Post subject: Reply with quote

Code:
   videoparam.size = sizeof(videoparam);
   videoparam.resolution = PSP_USBCAM_RESOLUTION_480_272;
   videoparam.framerate = PSP_USBCAM_FRAMERATE_60_FPS;
   videoparam.wb = PSP_USBCAM_WB_AUTO;
   videoparam.saturation = 120;
   videoparam.brightness = 129;
   videoparam.contrast = 64;
   videoparam.sharpness = 0;
   videoparam.effectmode = PSP_USBCAM_EFFECTMODE_NORMAL;
   videoparam.framesize = MAX_VIDEO_FRAME_SIZE;
   videoparam.evlevel = PSP_USBCAM_EVLEVEL_0_0;   


this works for video until i stop it to take a still...i was wandering if it's a timing issue (i.e. when i'm stopping video there's still data to get before getting done) and then i'm trying inserting pauses...too bad, i would like to acquire as much data as possible as fast as i can...

Code:
   stillparam.size = sizeof(stillparam);
   stillparam.resolution = PSP_USBCAM_RESOLUTION_1024_768;
   stillparam.jpegsize = MAX_STILL_IMAGE_SIZE;
   stillparam.delay = PSP_USBCAM_NODELAY;
   stillparam.complevel = 1;
   stillparam.reverseflags = PSP_USBCAM_MIRROR;


this works only if i set
Code:
videoparam.framerate = PSP_USBCAM_FRAMERATE_15_FPS;


Quote:
Which is the size of the image you try to get? Maybe if it is too high, you should decrease the video frame rate (or the size of the image to keep the frame rate)

...uhm...ok, but i thought the two things were unconnected... i mean: i have to stop video to take a still; does one thing influence the other?

No news on the "how to get raw data" side?
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Sun Jul 27, 2008 9:12 pm    Post subject: Reply with quote

I looked at the usbcam.prx and it seems that the still resolution and video are linked. That is if you set a still image resolution higher than 1024x768, you have to decrease the video framerate to 15 FPS. Ask Sony why, but it seems like they're have been taking some design shortcuts recently :)

As for the RAW, well, we would need to get a camera firmware first...
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Mon Jul 28, 2008 6:15 pm    Post subject: Reply with quote

ok, many thanks for investigating....it seems that i'll have to find some workarounds...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group