Implement camera application in brewMp | developer.brewmp.com Implement camera application in brewMp | developer.brewmp.com

Developer

Implement camera application in brewMp

Forums:

Hi,

I want to implement camera in brewMp application. I am using window machanism. I want to show my camera frrames of my window size. For that i will be using ICAMERA_SetSize(). I want to develop UI for showing the preview frames. i am using XY containers. How could i do that?

Please help me in this.

 

Thanks and regards,

Anjani

You can use AEECLSID_FrameWidget and AEECLSID_CameraFrameModel to display camera frames. See API reference for steps to create frame widget, model and camera setup.

You can use AEECLSID_FrameWidget and AEECLSID_CameraFrameModel to display camera frames. See API reference for steps to create frame widget, model and camera setup.

Hi,
I am doing in this way
ISHELL_CreateInstance(GETISHELL(), AEECLSID_FrameWidget, (void**)&pMe->piwFrame);
 IWIDGET_SetExtent(pMe->piwFrame, &wExtent);
ISHELL_CreateInstance(GETISHELL(), AEECLSID_CAMERA, (void**)&pMe->m_piCamera);
ICAMERA_RegisterNotify( pMe->m_piCamera, (PFNCAMERANOTIFY)cbCameraNotify, this )
 ISHELL_CreateInstance(GETISHELL(), AEEIID_CAMERAFRAMEMODEL, (void**)&pMe->m_piCameraModel);
(void)ICameraFrameModel_SetICamera(pMe->m_piCameraModel, pMe->m_piCamera);
(void)IWIDGET_SetModel(pMe->piwFrame, (IModel*)(void *)pMe->m_piCameraModel);
 nRet = ICAMERA_Preview(pMe->m_piCamera);
 
What is difference between ICamera_RegisterNotify() and ICameraFramemodel_RegisterNotify()?
I have no idea how frames shall be shown on the frame widget. I know how to do it in brew by using the displaybitblt. can the same be used here?  Know i am doing this for BrewMp + window application. I have constructed xycontainer as my base widget.
can i use ICamera_RegisterNotify() when i am using camera frame model in my app to handle the different modes i recieve from the Icamera interface.

Hi,
I am doing in this way
ISHELL_CreateInstance(GETISHELL(), AEECLSID_FrameWidget, (void**)&pMe->piwFrame);
 IWIDGET_SetExtent(pMe->piwFrame, &wExtent);
ISHELL_CreateInstance(GETISHELL(), AEECLSID_CAMERA, (void**)&pMe->m_piCamera);
ICAMERA_RegisterNotify( pMe->m_piCamera, (PFNCAMERANOTIFY)cbCameraNotify, this )
 ISHELL_CreateInstance(GETISHELL(), AEEIID_CAMERAFRAMEMODEL, (void**)&pMe->m_piCameraModel);
(void)ICameraFrameModel_SetICamera(pMe->m_piCameraModel, pMe->m_piCamera);
(void)IWIDGET_SetModel(pMe->piwFrame, (IModel*)(void *)pMe->m_piCameraModel);
 nRet = ICAMERA_Preview(pMe->m_piCamera);
 
What is difference between ICamera_RegisterNotify() and ICameraFramemodel_RegisterNotify()?
I have no idea how frames shall be shown on the frame widget. I know how to do it in brew by using the displaybitblt. can the same be used here?  Know i am doing this for BrewMp + window application. I have constructed xycontainer as my base widget.
can i use ICamera_RegisterNotify() when i am using camera frame model in my app to handle the different modes i recieve from the Icamera interface.

Hi Anjani,
I told you earlier about frame widget as you said your app used widgets. You can use traditional way as well to display camera frames (displaybitblt).
ICamera_RegisterNotify() and ICameraFramemodel_RegisterNotify() are same. You'll get camera status messages in both. If you are using frame widget, better to use ICameraFramemodel_RegisterNotify().
Here is working code snippet of frame widget to display camera frames. Once you set camera to camera frame model, frame widget will automatically display it; no need for you to explicitly display it. You can use frame model APIs to get frames if you need it.
typedef struct _cameraframe {
AEEApplet applet; // First element of this structure must be AEEApplet.
IDisplay * piDisplay; // Copy of IDisplay Interface pointer for easy access.
IShell * piShell; // Copy of IShell Interface pointer for easy access.
AEEDeviceInfo deviceInfo; // Copy of device info for easy access.
// Add your own variables here...
IRootContainer *picRoot;
IWidget *piwRoot;
ICamera *pICamera;
IWidget *piwFrame;
ICameraFrameModel *pimFrame;
cameraframe;

static void cameraframe_DrawScreen(cameraframe * pMe)
{
//Common variables
IDisplayCanvas *pDisplayCanvas;
AEERect rect;
int ret = 0;
int i = 0;
AEESize ImageSize;
AEEMediaData md;
int32 nMode = 0;

WidgetExtent pWExtent;
WidgetPos ppos;

IWidget *piwFrame = NULL;
ICameraFrameModel *pimFrame;

//Create display canvas and assign the display
ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_DisplayCanvas, (void**)&pDisplayCanvas);
if(ret != SUCCESS)
{
DBGPRINTF("DisplayCanvas failed[%d]", ret);
return;
}
IDisplayCanvas_SetDisplay(pDisplayCanvas, pMe->piDisplay);

//Create root container and assign the display canvas
ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_RootContainer, (void**)&pMe->picRoot);
if(ret != SUCCESS)
{
DBGPRINTF("rootcontainer failed[%d]", ret);
return;
}
ret = IRootContainer_QueryInterface(pMe->picRoot, AEEIID_IWidget, (void**)&pMe->piwRoot);
if(ret != SUCCESS)
{
DBGPRINTF("piwRootText failed[%d]", ret);
return;
}

SETAEERECT(&rect, 0, 0, pMe->deviceInfo.cxScreen, pMe->deviceInfo.cyScreen);
IRootContainer_SetCanvas(pMe->picRoot, (ICanvas*)pDisplayCanvas, &rect);

// Set BG color
IWidget_SetBGColor(pMe->piwRoot, MAKE_RGBA(224, 224, 224, 255));
// Enable touch
IWidget_EnableTouch(pMe->piwRoot);

//Create Frame widget
ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_CFrameWidget, (void**)&piwFrame);
if(ret != SUCCESS)
{
DBGPRINTF("Frame widget failed[%d]", ret);
return;
}
pWExtent.height = 176;
pWExtent.width = 144;
IWidget_SetExtent(piwFrame, &pWExtent);

//---------------------------------------camera-------------------------//
ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_CAMERA,(void**)( &pMe->pICamera));
if (ret != AEE_SUCCESS)
{
DBGPRINTF("Creating ICamera Failed %d", ret);
return;
}

ImageSize.cx = 144;
ImageSize.cy = 176;

//Set the size of the image to be recorded by the camera.
ret = ICAMERA_SetSize(pMe->pICamera, &ImageSize);

//Set the size of the image to be displayed to the screen.
ret = ICAMERA_SetDisplaySize(pMe->pICamera, &ImageSize);
//---------------------------------------camera ends------------------------------------

ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_CCameraFrameModel, (void**)&pimFrame);
if(ret != SUCCESS)
{
DBGPRINTF("frame model failed[%d]", ret);
return;
}

//Register for Notify Callback
ICameraFrameModel_RegisterNotify(pimFrame, (PFNCAMERANOTIFY) cameraframe_CameraCBFunc, (void *)pMe);

ICameraFrameModel_SetICamera(pimFrame, pMe->pICamera);
IWidget_SetModel(piwFrame, (IModel*)(void*)pimFrame);

ppos.bVisible = TRUE;
ppos.x = 0;
ppos.y = 0;
IRootContainer_Insert(pMe->picRoot, piwFrame, WIDGET_ZNORMAL, &ppos);

ICAMERA_GetMode(pMe->pICamera, &nMode, NULL);
if(CAM_MODE_READY == nMode)
{
ret = ICAMERA_Preview(pMe->pICamera);
}

pMe->piwFrame = piwFrame;
IWidget_AddRef(pMe->piwFrame);
RELEASEIF(piwFrame);

pMe->pimFrame = pimFrame;
ICameraFrameModel_AddRef(pMe->pimFrame);
RELEASEIF(pimFrame);

static void cameraframe_CameraCBFunc(cameraframe* pMe, AEECameraNotify * pcn)
{
int nErr = AEE_EFAILED;

// First validate the callback...
if (!pMe || !pcn)
{
DBGPRINTF("NULL ptr in callback.");
return;
}

switch (pcn->nStatus)
{
case CAM_STATUS_FRAME:
{
// A new frame is available, Get the raw frame, check orientation and blit it to the screen
break;
}
case CAM_STATUS_DONE:
{
break;
}

}

 

Hi Anjani,
I told you earlier about frame widget as you said your app used widgets. You can use traditional way as well to display camera frames (displaybitblt).
ICamera_RegisterNotify() and ICameraFramemodel_RegisterNotify() are same. You'll get camera status messages in both. If you are using frame widget, better to use ICameraFramemodel_RegisterNotify().
Here is working code snippet of frame widget to display camera frames. Once you set camera to camera frame model, frame widget will automatically display it; no need for you to explicitly display it. You can use frame model APIs to get frames if you need it.
typedef struct _cameraframe {
AEEApplet applet; // First element of this structure must be AEEApplet.
IDisplay * piDisplay; // Copy of IDisplay Interface pointer for easy access.
IShell * piShell; // Copy of IShell Interface pointer for easy access.
AEEDeviceInfo deviceInfo; // Copy of device info for easy access.
// Add your own variables here...
IRootContainer *picRoot;
IWidget *piwRoot;
ICamera *pICamera;
IWidget *piwFrame;
ICameraFrameModel *pimFrame;
cameraframe;

static void cameraframe_DrawScreen(cameraframe * pMe)
{
//Common variables
IDisplayCanvas *pDisplayCanvas;
AEERect rect;
int ret = 0;
int i = 0;
AEESize ImageSize;
AEEMediaData md;
int32 nMode = 0;

WidgetExtent pWExtent;
WidgetPos ppos;

IWidget *piwFrame = NULL;
ICameraFrameModel *pimFrame;

//Create display canvas and assign the display
ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_DisplayCanvas, (void**)&pDisplayCanvas);
if(ret != SUCCESS)
{
DBGPRINTF("DisplayCanvas failed[%d]", ret);
return;
}
IDisplayCanvas_SetDisplay(pDisplayCanvas, pMe->piDisplay);

//Create root container and assign the display canvas
ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_RootContainer, (void**)&pMe->picRoot);
if(ret != SUCCESS)
{
DBGPRINTF("rootcontainer failed[%d]", ret);
return;
}
ret = IRootContainer_QueryInterface(pMe->picRoot, AEEIID_IWidget, (void**)&pMe->piwRoot);
if(ret != SUCCESS)
{
DBGPRINTF("piwRootText failed[%d]", ret);
return;
}

SETAEERECT(&rect, 0, 0, pMe->deviceInfo.cxScreen, pMe->deviceInfo.cyScreen);
IRootContainer_SetCanvas(pMe->picRoot, (ICanvas*)pDisplayCanvas, &rect);

// Set BG color
IWidget_SetBGColor(pMe->piwRoot, MAKE_RGBA(224, 224, 224, 255));
// Enable touch
IWidget_EnableTouch(pMe->piwRoot);

//Create Frame widget
ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_CFrameWidget, (void**)&piwFrame);
if(ret != SUCCESS)
{
DBGPRINTF("Frame widget failed[%d]", ret);
return;
}
pWExtent.height = 176;
pWExtent.width = 144;
IWidget_SetExtent(piwFrame, &pWExtent);

//---------------------------------------camera-------------------------//
ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_CAMERA,(void**)( &pMe->pICamera));
if (ret != AEE_SUCCESS)
{
DBGPRINTF("Creating ICamera Failed %d", ret);
return;
}

ImageSize.cx = 144;
ImageSize.cy = 176;

//Set the size of the image to be recorded by the camera.
ret = ICAMERA_SetSize(pMe->pICamera, &ImageSize);

//Set the size of the image to be displayed to the screen.
ret = ICAMERA_SetDisplaySize(pMe->pICamera, &ImageSize);
//---------------------------------------camera ends------------------------------------

ret = ISHELL_CreateInstance(pMe->piShell, AEECLSID_CCameraFrameModel, (void**)&pimFrame);
if(ret != SUCCESS)
{
DBGPRINTF("frame model failed[%d]", ret);
return;
}

//Register for Notify Callback
ICameraFrameModel_RegisterNotify(pimFrame, (PFNCAMERANOTIFY) cameraframe_CameraCBFunc, (void *)pMe);

ICameraFrameModel_SetICamera(pimFrame, pMe->pICamera);
IWidget_SetModel(piwFrame, (IModel*)(void*)pimFrame);

ppos.bVisible = TRUE;
ppos.x = 0;
ppos.y = 0;
IRootContainer_Insert(pMe->picRoot, piwFrame, WIDGET_ZNORMAL, &ppos);

ICAMERA_GetMode(pMe->pICamera, &nMode, NULL);
if(CAM_MODE_READY == nMode)
{
ret = ICAMERA_Preview(pMe->pICamera);
}

pMe->piwFrame = piwFrame;
IWidget_AddRef(pMe->piwFrame);
RELEASEIF(piwFrame);

pMe->pimFrame = pimFrame;
ICameraFrameModel_AddRef(pMe->pimFrame);
RELEASEIF(pimFrame);

static void cameraframe_CameraCBFunc(cameraframe* pMe, AEECameraNotify * pcn)
{
int nErr = AEE_EFAILED;

// First validate the callback...
if (!pMe || !pcn)
{
DBGPRINTF("NULL ptr in callback.");
return;
}

switch (pcn->nStatus)
{
case CAM_STATUS_FRAME:
{
// A new frame is available, Get the raw frame, check orientation and blit it to the screen
break;
}
case CAM_STATUS_DONE:
{
break;
}

}

 

As per my app design. i have created a prop container and added frame widget to that prop container and then inserted the widget of that prop container to the root container. I am not getting the preview frames. But i can capture the frame and store the frame. Only preview is not comming. Does anything to do with the DPK? Do we need to use any DPK if so please tell me how to use that for target. Please help me if any other issue.  

As per my app design. i have created a prop container and added frame widget to that prop container and then inserted the widget of that prop container to the root container. I am not getting the preview frames. But i can capture the frame and store the frame. Only preview is not comming. Does anything to do with the DPK? Do we need to use any DPK if so please tell me how to use that for target. Please help me if any other issue.  

On which device you tested this? Camera frame size is device dependant, you need to check supported frame/display sizes. On some handsets, if size specified is different from supported size then it may not generate preview or frames.
From your description, looks like you are getting frames but cannot display frames. This may be something to do with your prop container implementation.
Not sure what do you mean by using DPK for target.

On which device you tested this? Camera frame size is device dependant, you need to check supported frame/display sizes. On some handsets, if size specified is different from supported size then it may not generate preview or frames.
From your description, looks like you are getting frames but cannot display frames. This may be something to do with your prop container implementation.
Not sure what do you mean by using DPK for target.

Thank you. I am using QRD6240.
In my code
ret = ICAMERA_SetParm(pMe->m_pICamera,CAM_PARM_PREVIEW_TYPE, CAM_PREVIEW_SNAPSHOT ,0); is returning -1. If this API is not scucess then will it impact the previewing of frames?

Thank you. I am using QRD6240.
In my code
ret = ICAMERA_SetParm(pMe->m_pICamera,CAM_PARM_PREVIEW_TYPE, CAM_PREVIEW_SNAPSHOT ,0); is returning -1. If this API is not scucess then will it impact the previewing of frames?

That is optional parameter and shouldn't impact preview. Even if it is not set, no issues.
I tried above code with ICAMERA_SetParm call as well and could see preview on QRD6270 handset.

That is optional parameter and shouldn't impact preview. Even if it is not set, no issues.
I tried above code with ICAMERA_SetParm call as well and could see preview on QRD6270 handset.

Hi,
 

I am able to receive the preview frames. Once i pres capture, i am stoping the camera by calling Icamera_Stop(), then in the call back function when nStatus =CAM_STATUS_DONE,
 
nCmd = CAM_CMD_START, nSubCmd = CAM_MODE_PREVIEW i was calling
ICAMERA_SetMediaData( m_pICamera, &md,
AEECLSID_JP);
ICAMERA_DeferEncode(m_pICamera,TRUE)
ICamera_RecordSnapShot().  When
 

nCmd = CAM_CMD_START, nSubCmd  = CAM_MODE_SNAPSHOT, i was calling

ICAMERA_EncodeSnapshot(m_pICamera);
The moment i press capture my preview of frames are stoped and a blank screen is show for almost 1 minute. Then the captured image is show in the display after encode is done.
 
Please help me why there is a blank screen occuring. I am using cameraframe model.

 

 

 

 

ICAMERA_SetParm(m_pICamera, CAM_PARM_VIDEO_ENCODE, AEECLSID_JPEG, 0);

Hi,
 

I am able to receive the preview frames. Once i pres capture, i am stoping the camera by calling Icamera_Stop(), then in the call back function when nStatus =CAM_STATUS_DONE,
 
nCmd = CAM_CMD_START, nSubCmd = CAM_MODE_PREVIEW i was calling
ICAMERA_SetMediaData( m_pICamera, &md,
AEECLSID_JP);
ICAMERA_DeferEncode(m_pICamera,TRUE)
ICamera_RecordSnapShot().  When
 

nCmd = CAM_CMD_START, nSubCmd  = CAM_MODE_SNAPSHOT, i was calling

ICAMERA_EncodeSnapshot(m_pICamera);
The moment i press capture my preview of frames are stoped and a blank screen is show for almost 1 minute. Then the captured image is show in the display after encode is done.
 
Please help me why there is a blank screen occuring. I am using cameraframe model.

 

 

 

 

ICAMERA_SetParm(m_pICamera, CAM_PARM_VIDEO_ENCODE, AEECLSID_JPEG, 0);

Hi,
 

I am able to receive the preview frames. Once i pres capture, i am stoping the camera by calling Icamera_Stop(), then in the call back function when nStatus =CAM_STATUS_DONE,

 
nCmd = CAM_CMD_START, nSubCmd = CAM_MODE_PREVIEW i was calling
ICAMERA_SetMediaData( m_pICamera, &md,
AEECLSID_JP);
ICAMERA_DeferEncode(m_pICamera,TRUE)

ICamera_RecordSnapShot().  When

 

nCmd = CAM_CMD_START, nSubCmd  = CAM_MODE_SNAPSHOT, i was calling

ICAMERA_SetParm(m_pICamera, CAM_PARM_VIDEO_ENCODE, AEECLSID_JPEG, 0);
 
 

ICAMERA_EncodeSnapshot(m_pICamera);
 

The moment i press capture my preview of frames are stoped and a blank screen is show for almost 1 minute. Then the captured image is show in the display after encode is done.
 

For images of size 176X144 encode is fast. But in case of 320x240 encode is slow. So a blank screen is shown. Nearly it is taking 30 sec for encoding. Is there any work arround. 
Please help me why there is a blank screen occuring. I am using cameraframe model. 
 

Hi,
 

I am able to receive the preview frames. Once i pres capture, i am stoping the camera by calling Icamera_Stop(), then in the call back function when nStatus =CAM_STATUS_DONE,

 
nCmd = CAM_CMD_START, nSubCmd = CAM_MODE_PREVIEW i was calling
ICAMERA_SetMediaData( m_pICamera, &md,
AEECLSID_JP);
ICAMERA_DeferEncode(m_pICamera,TRUE)

ICamera_RecordSnapShot().  When

 

nCmd = CAM_CMD_START, nSubCmd  = CAM_MODE_SNAPSHOT, i was calling

ICAMERA_SetParm(m_pICamera, CAM_PARM_VIDEO_ENCODE, AEECLSID_JPEG, 0);
 
 

ICAMERA_EncodeSnapshot(m_pICamera);
 

The moment i press capture my preview of frames are stoped and a blank screen is show for almost 1 minute. Then the captured image is show in the display after encode is done.
 

For images of size 176X144 encode is fast. But in case of 320x240 encode is slow. So a blank screen is shown. Nearly it is taking 30 sec for encoding. Is there any work arround. 
Please help me why there is a blank screen occuring. I am using cameraframe model. 
 

I tried deffering encoding and I couldn't see much delay in displaying recorded snapshot or starting preview again. Yes, it took some time for encode but not more than 2-3 secs. Again, I didn't see any blank screen. Here is what I did:
case CAM_STATUS_DONE:
{
if(pcn->nSubCmd == CAM_MODE_PREVIEW && pcn->nCmd == CAM_CMD_START)
{
// Init the Shot.
takePicture(pMe);
break;
}
else if(pcn->nSubCmd == CAM_MODE_SNAPSHOT && pcn->nCmd == CAM_CMD_START)
{
ICAMERA_SetParm(pMe->pICamera, CAM_PARM_VIDEO_ENCODE, AEECLSID_JPEG, 0);
ICAMERA_EncodeSnapshot(pMe->pICamera);
// Allmost is all cases you want the preview mode to
// start again.
//startPreview(pMe);
}
else if(pcn->nCmd == CAM_CMD_ENCODESNAPSHOT)
{
/** EncodeSnapshot: Camera has done encoding the snapshot.
Check the location specified by mediadata for the snapshot
The app can implement a couple of things.
1) Show Snapshot taken.
2) Start the Preview mode again.
*/
startPreview(pMe);
}
else if(pcn->nCmd == CAM_CMD_SETPARM)
{
/** Done setting a Parm: nSubCmd = parm id*/
break;
}
break;
}

.............

static void takePicture(cameraframe* pMe)
{
char pName[14];
SPRINTF(pName,"%d%s",ISHELL_GetSeconds(pMe->pIShell), ".jpeg");

// 1) Set Media Data
//if(MMD_FILE_NAME != pMe->md.clsData)
{
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData = "decode.jpeg" ;
pMe->md.dwSize = 0 ;
ICAMERA_SetMediaData(pMe->pICamera, &pMe->md , MT_JPEG);
}
// Set the Defer Mode
ICAMERA_DeferEncode(pMe->pICamera, TRUE);
//Take a shot.
ICAMERA_RecordSnapshot(pMe->pICamera);

static int startPreview(cameraframe * pMe)
{
AEESize sz;
if(!pMe || !pMe->pICamera)
return EBADPARM;

sz.cx = 144;
sz.cy = 176;
ICAMERA_SetDisplaySize(pMe->pICamera, &sz);
//Start the Preview Mode
return ICAMERA_Preview(pMe->pICamera);;

I tried deffering encoding and I couldn't see much delay in displaying recorded snapshot or starting preview again. Yes, it took some time for encode but not more than 2-3 secs. Again, I didn't see any blank screen. Here is what I did:
case CAM_STATUS_DONE:
{
if(pcn->nSubCmd == CAM_MODE_PREVIEW && pcn->nCmd == CAM_CMD_START)
{
// Init the Shot.
takePicture(pMe);
break;
}
else if(pcn->nSubCmd == CAM_MODE_SNAPSHOT && pcn->nCmd == CAM_CMD_START)
{
ICAMERA_SetParm(pMe->pICamera, CAM_PARM_VIDEO_ENCODE, AEECLSID_JPEG, 0);
ICAMERA_EncodeSnapshot(pMe->pICamera);
// Allmost is all cases you want the preview mode to
// start again.
//startPreview(pMe);
}
else if(pcn->nCmd == CAM_CMD_ENCODESNAPSHOT)
{
/** EncodeSnapshot: Camera has done encoding the snapshot.
Check the location specified by mediadata for the snapshot
The app can implement a couple of things.
1) Show Snapshot taken.
2) Start the Preview mode again.
*/
startPreview(pMe);
}
else if(pcn->nCmd == CAM_CMD_SETPARM)
{
/** Done setting a Parm: nSubCmd = parm id*/
break;
}
break;
}

.............

static void takePicture(cameraframe* pMe)
{
char pName[14];
SPRINTF(pName,"%d%s",ISHELL_GetSeconds(pMe->pIShell), ".jpeg");

// 1) Set Media Data
//if(MMD_FILE_NAME != pMe->md.clsData)
{
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData = "decode.jpeg" ;
pMe->md.dwSize = 0 ;
ICAMERA_SetMediaData(pMe->pICamera, &pMe->md , MT_JPEG);
}
// Set the Defer Mode
ICAMERA_DeferEncode(pMe->pICamera, TRUE);
//Take a shot.
ICAMERA_RecordSnapshot(pMe->pICamera);

static int startPreview(cameraframe * pMe)
{
AEESize sz;
if(!pMe || !pMe->pICamera)
return EBADPARM;

sz.cx = 144;
sz.cy = 176;
ICAMERA_SetDisplaySize(pMe->pICamera, &sz);
//Start the Preview Mode
return ICAMERA_Preview(pMe->pICamera);;

I tested above code on QRD6270 handset.

I tested above code on QRD6270 handset.

Yes i am able to get. Thank you.

Yes i am able to get. Thank you.

Yes i am able to get. Thank you.

Yes i am able to get. Thank you.