camera in the movie mode | developer.brewmp.com camera in the movie mode | developer.brewmp.com

Developer

camera in the movie mode

Forums:

Hi,

I want to use icamera in the video mode so I'm using the following steps. I'm getting error in the icamera_setparm. Not able to figure out why the error is. The snippet follows like this:

static void CAM_PREVIEW(imedia * pMe)
{
1. ICAMERA_RegisterNotify(camnotify)
2. ICAMERA_SetAudioEncode-----AEECLSID_MEDIAQCP, MM_QCP_FORMAT_FIXED_FULL_13K
3. ICAMERA_SetVideoEncode ---- AEECLSID_MEDIAMPEG4, 0
4. ICAMERA_SetDisplaySize
5. ICAMERA_SetSize

6. ICAMERA_SetParm(pMe->m_pICamera, CAM_PARM_PREVIEW_TYPE , CAM_PREVIEW_MOVIE, 0);
//getting ICAMERA_SetParm error: -1

7. ICAMERA_Preview

static void CameraNotify(void * pUser, AEECameraNotify * pn)
{
imedia * pMe = (imedia *)pUser;
AEESize az;
int nErr;

if ((!pMe) || (!pn))
return;

switch (pn->nStatus)
{
case CAM_STATUS_START:
break;

case CAM_STATUS_FRAME:
{
IBitmap * pFrame;
AEEBitmapInfo bi;
nErr = ICAMERA_GetFrame(pMe->m_pICamera, &pFrame);

if (!pFrame)
break;

nErr = IBITMAP_GetInfo(pFrame, &bi, sizeof(bi));
if (nErr!=SUCCESS)
break;

IDISPLAY_GetDeviceBitmap(pMe->a.m_pIDisplay, &pMe->pDeviceBitmap);
IDISPLAY_BitBlt(pMe->a.m_pIDisplay, 0, 0, bi.cx, bi.cy, pFrame, 0, 0, AEE_RO_COPY);

IDISPLAY_Update(pMe->a.m_pIDisplay);
IBITMAP_Release(pFrame);
}break;
case CAM_STATUS_DONE:
{
DBGPRINTF("IN CAM_STATUS_DONE STATE");
break;
}
case CAM_STATUS_ABORT:
// Preview got aborted.
break;
}

Where to call icamera_record. Should it be called at cam_status_done or :confused:

If anybody provides the sample snippet it would be helpful :(

Thanks,
celia