Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi,
I'm trying to capture a snapshot to a buffer (with MMD_BUFFER). I set the pData to a MALLOC'ed chunk and set the size, then perform the snapshot (with non-deferred encoding). Upon getting the event with CAM_CMD_ENCODESNAPSHOT, CAM_STATUS_DONE, I expect the pData should be the size in bytes of the captured image. In the 3.1.4 AEECamera.h it says:
// For EncodeSnapshot, pData = Number of bytes encoded

I am compiling with 2.1.3, however, since we want to support those devices, and that comment is missing from 2.1.3.

If I cast the pData to uint32 *, it comes back as a negative number. Also, the dwSize is coming back as 0. Does anyone know why this isn't working? Does it require BREW 3? I can't imagine how you could possibly use MMD_BUFFER without knowing the size of the encoded data....

Thanks for any help.

-Al

Introduce some delay in between, in some phones it works. Like for me LG VX 8100

Introduce some delay in between, in some phones it works. Like for me LG VX 8100

skumar_rao wrote:Introduce some delay in between, in some phones it works. Like for me LG VX 8100
Where do you introduce the delay? I assumed you meant after receiving the event, but I think the camera routine frees the AEECameraNotify data after the callback executes, so I'm getting garbage data out of the struct when the timer finishes.

skumar_rao wrote:Introduce some delay in between, in some phones it works. Like for me LG VX 8100
Where do you introduce the delay? I assumed you meant after receiving the event, but I think the camera routine frees the AEECameraNotify data after the callback executes, so I'm getting garbage data out of the struct when the timer finishes.

Bump.
I'm having the same problem. The AEECameraNotify dwSize field returns zero on state CAM_CMD_ENCODESNAPSHOT, but my data buffer has a jpeg in it.
Any way to find out the length OTHER than searching the buffer for an 0xffd9?
Thanks

Bump.
I'm having the same problem. The AEECameraNotify dwSize field returns zero on state CAM_CMD_ENCODESNAPSHOT, but my data buffer has a jpeg in it.
Any way to find out the length OTHER than searching the buffer for an 0xffd9?
Thanks

Hi, did you find a way to solve it?

Hi, did you find a way to solve it?

I think I ended up having it write the photo to a file and then read it back into the buffer. The other way just seems way too flaky, so this is a ghetto workaround.
-Al

I think I ended up having it write the photo to a file and then read it back into the buffer. The other way just seems way too flaky, so this is a ghetto workaround.
-Al