| View previous topic :: View next topic |
| Author |
Message |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Fri Jul 25, 2008 7:36 pm Post subject: sceUsbCamSetupStill error and go!cam info |
|
|
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 |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Sun Jul 27, 2008 1:28 am Post subject: |
|
|
| The error code is because of the way you setup your stillparam. Can you paste it here? |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Sun Jul 27, 2008 3:50 am Post subject: |
|
|
| ...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 |
|
 |
moonlight
Joined: 26 Oct 2005 Posts: 567
|
Posted: Sun Jul 27, 2008 9:58 am Post subject: |
|
|
| 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 |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Sun Jul 27, 2008 6:03 pm Post subject: |
|
|
| 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 |
|
 |
adrahil
Joined: 16 Mar 2006 Posts: 277
|
Posted: Sun Jul 27, 2008 9:12 pm Post subject: |
|
|
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 |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Mon Jul 28, 2008 6:15 pm Post subject: |
|
|
| ok, many thanks for investigating....it seems that i'll have to find some workarounds... |
|
| Back to top |
|
 |
|