Regarding ICamera_RecordSnapShot() | developer.brewmp.com Regarding ICamera_RecordSnapShot() | developer.brewmp.com

Developer

Regarding ICamera_RecordSnapShot()

Forums:

Hi All,
I am using ICamera_RecordSnapShot(...) for taking a snap from the camera.the problem is that I am facing the problem in storing the snapshot on the device.
Whenever I set AEEMediaData structure as follows:
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)"test.jpeg";
pMe->md.dwSize = 0;
The snapshot stored in the myapps dir on the phone, but I want to store the snapshot on the device native gallary folder.

I am testing the apps in Moto V3c and found from DDS the shared folder path is motorola/shared/picture and sets the AEEMediaData as
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)"motorola/shared/picture/test.jpeg";
pMe->md.dwSize = 0;
but it doesn't work.

I have also tried with fs:/shared/picture/test.jpeg ,AEE_SHARED_DIR/picture/ test.jpeg AEE_SHARED_DIR/wallpaper/test.jpeg but can't succedded.

please tell me what is the exact path for accessing gallery(shared) folder in MotoV3c or in samsung SCH-s259.

Help appreciated..... :confused:

Prayag wrote:Hi All,
I am using ICamera_RecordSnapShot(...) for taking a snap from the camera.the problem is that I am facing the problem in storing the snapshot on the device.
Whenever I set AEEMediaData structure as follows:
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)"test.jpeg";
pMe->md.dwSize = 0;
The snapshot stored in the myapps dir on the phone, but I want to store the snapshot on the device native gallary folder.
I am testing the apps in Moto V3c and found from DDS the shared folder path is motorola/shared/picture and sets the AEEMediaData as
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)"motorola/shared/picture/test.jpeg";
pMe->md.dwSize = 0;
but it doesn't work.
I have also tried with fs:/shared/picture/test.jpeg ,AEE_SHARED_DIR/picture/ test.jpeg AEE_SHARED_DIR/wallpaper/test.jpeg but can't succedded.
please tell me what is the exact path for accessing gallery(shared) folder in MotoV3c or in samsung SCH-s259.
Help appreciated..... :confused:
try
pMe->md.pData=(void*)"fs:/shared/picture/test.jpeg";
or
u can probably create an another image file in "fs:/shared/picture/" and copy image data(4m ur test.png in the myapps dir on the phone) to a buffer and write into that file which u have opened in shared directory.
HTH

Prayag wrote:Hi All,
I am using ICamera_RecordSnapShot(...) for taking a snap from the camera.the problem is that I am facing the problem in storing the snapshot on the device.
Whenever I set AEEMediaData structure as follows:
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)"test.jpeg";
pMe->md.dwSize = 0;
The snapshot stored in the myapps dir on the phone, but I want to store the snapshot on the device native gallary folder.
I am testing the apps in Moto V3c and found from DDS the shared folder path is motorola/shared/picture and sets the AEEMediaData as
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)"motorola/shared/picture/test.jpeg";
pMe->md.dwSize = 0;
but it doesn't work.
I have also tried with fs:/shared/picture/test.jpeg ,AEE_SHARED_DIR/picture/ test.jpeg AEE_SHARED_DIR/wallpaper/test.jpeg but can't succedded.
please tell me what is the exact path for accessing gallery(shared) folder in MotoV3c or in samsung SCH-s259.
Help appreciated..... :confused:
try
pMe->md.pData=(void*)"fs:/shared/picture/test.jpeg";
or
u can probably create an another image file in "fs:/shared/picture/" and copy image data(4m ur test.png in the myapps dir on the phone) to a buffer and write into that file which u have opened in shared directory.
HTH

mk.manju wrote:try
pMe->md.pData=(void*)"fs:/shared/picture/test.jpeg";
Hi, manju thanks for your reply...
I have tried with the path you suggested but can't succedded ....
actually ICamera_RecordSnapShot(.. ) returning SUCCESS with this path but I can't find the image on the device. I am posting my testing code ,please have a look on it.
//on apps start:
case EVT_APP_START:
ICAMERA_RegisterNotify(pMe->pICamera, CApp_CameraNotify, pMe);
ICAMERA_SetDisplaySize(pMe->pICamera, &pMe->m_sizePreview);
ICAMERA_SetSize(pMe->pICamera,&pMe->m_sizeFrame);
ICAMERA_SetParm(pMe->pICamera,CAM_PARM_FLASH,CAM_FLASH_AUTO,0);
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)"fs:/shared/picture/test.png";
pMe->md.dwSize = 0;
ICAMERA_Preview(pMe->pICamera);
return(TRUE);
//on pressing left soft
case EVT_KEY:
switch(wParam){
case AVK_SOFT1:
ICAMERA_Stop(pMe->pICamera);
break;
}
return(TRUE);
and the notification function is as follows:
static void CApp_CameraNotify(void * pUser, AEECameraNotify * pn){
icameratest * pMe = (icameratest *)pUser;
switch (pn->nStatus){
case CAM_STATUS_START:
break;
case CAM_STATUS_FRAME:
{
IBitmap * pFrame;
AEEBitmapInfo bi;
if (SUCCESS != ICAMERA_GetFrame(pMe->pICamera, &pFrame)){
return;
}
// Get the bitmap info...this can be saved in app global structure.
IBITMAP_GetInfo(pFrame, &bi, sizeof(bi));
// Display the frame at (0, 0) location of the screen
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:
if ( pn->nCmd == CAM_CMD_START )
{
int nErr;
if ( pn->nSubCmd == CAM_MODE_PREVIEW ){
nErr=ICAMERA_SetMediaData(pMe->pICamera, &pMe->md, MT_PNG);
if(nErr != SUCCESS) DBGPRINTF("#### MediaData Error [%d]\n", nErr);
nErr = ICAMERA_RecordSnapshot( pMe->pICamera );
if(nErr==SUCCESS)
DBGPRINTF("snapshot recoded nErr %d",nErr);
}
else if(pn->nSubCmd==CAM_MODE_SNAPSHOT){
DBGPRINTF("prayag snapshot mode");
}
}
break;
// ICAMERA_Stop() was called and preview operation stopped.
DBGPRINTF("prayag FRAME6");
break;
case CAM_STATUS_ABORT:
// Preview got aborted.
DBGPRINTF("prayag FRAME7");
break;
}

help appreciated... :confused:

mk.manju wrote:try
pMe->md.pData=(void*)"fs:/shared/picture/test.jpeg";
Hi, manju thanks for your reply...
I have tried with the path you suggested but can't succedded ....
actually ICamera_RecordSnapShot(.. ) returning SUCCESS with this path but I can't find the image on the device. I am posting my testing code ,please have a look on it.
//on apps start:
case EVT_APP_START:
ICAMERA_RegisterNotify(pMe->pICamera, CApp_CameraNotify, pMe);
ICAMERA_SetDisplaySize(pMe->pICamera, &pMe->m_sizePreview);
ICAMERA_SetSize(pMe->pICamera,&pMe->m_sizeFrame);
ICAMERA_SetParm(pMe->pICamera,CAM_PARM_FLASH,CAM_FLASH_AUTO,0);
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)"fs:/shared/picture/test.png";
pMe->md.dwSize = 0;
ICAMERA_Preview(pMe->pICamera);
return(TRUE);
//on pressing left soft
case EVT_KEY:
switch(wParam){
case AVK_SOFT1:
ICAMERA_Stop(pMe->pICamera);
break;
}
return(TRUE);
and the notification function is as follows:
static void CApp_CameraNotify(void * pUser, AEECameraNotify * pn){
icameratest * pMe = (icameratest *)pUser;
switch (pn->nStatus){
case CAM_STATUS_START:
break;
case CAM_STATUS_FRAME:
{
IBitmap * pFrame;
AEEBitmapInfo bi;
if (SUCCESS != ICAMERA_GetFrame(pMe->pICamera, &pFrame)){
return;
}
// Get the bitmap info...this can be saved in app global structure.
IBITMAP_GetInfo(pFrame, &bi, sizeof(bi));
// Display the frame at (0, 0) location of the screen
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:
if ( pn->nCmd == CAM_CMD_START )
{
int nErr;
if ( pn->nSubCmd == CAM_MODE_PREVIEW ){
nErr=ICAMERA_SetMediaData(pMe->pICamera, &pMe->md, MT_PNG);
if(nErr != SUCCESS) DBGPRINTF("#### MediaData Error [%d]\n", nErr);
nErr = ICAMERA_RecordSnapshot( pMe->pICamera );
if(nErr==SUCCESS)
DBGPRINTF("snapshot recoded nErr %d",nErr);
}
else if(pn->nSubCmd==CAM_MODE_SNAPSHOT){
DBGPRINTF("prayag snapshot mode");
}
}
break;
// ICAMERA_Stop() was called and preview operation stopped.
DBGPRINTF("prayag FRAME6");
break;
case CAM_STATUS_ABORT:
// Preview got aborted.
DBGPRINTF("prayag FRAME7");
break;
}

help appreciated... :confused:

Hi all,
I am encountering problem in accessing the image file which I have capture using ICamera API.
The problem is that by using fs:/shared/picture path in MotoV3c I am successfully save the image but can't find it in the device gallery folder.
Whenever I Enumerate the fs:/shared/picture folder through IFileMgr interface it also shows the captured image as well as some locked image, but I can't find the captured image in the device native( gallery ) folder.
please tell me where the captured image is saved?
please reply :confused:

Hi all,
I am encountering problem in accessing the image file which I have capture using ICamera API.
The problem is that by using fs:/shared/picture path in MotoV3c I am successfully save the image but can't find it in the device gallery folder.
Whenever I Enumerate the fs:/shared/picture folder through IFileMgr interface it also shows the captured image as well as some locked image, but I can't find the captured image in the device native( gallery ) folder.
please tell me where the captured image is saved?
please reply :confused:

#define AEE_MYPIX_DIR "fs:/~0x0102382c/"
char* location = AEE_MYPIX_DIR;
char* fileName = "picture.bmp"
char* dest = text_concat(location, fileName);
IFile pIfile=IFILEMGR_OpenFile(pIFileMgr, dest, _OFM_CREATE);
try that folder Prayag, I was able to get the picture to show up in My Pics folder. Although i did notice that sometimes it required the device to be reset for the image to show up :S

#define AEE_MYPIX_DIR "fs:/~0x0102382c/"
char* location = AEE_MYPIX_DIR;
char* fileName = "picture.bmp"
char* dest = text_concat(location, fileName);
IFile pIfile=IFILEMGR_OpenFile(pIFileMgr, dest, _OFM_CREATE);
try that folder Prayag, I was able to get the picture to show up in My Pics folder. Although i did notice that sometimes it required the device to be reset for the image to show up :S

Stoff81 wrote:#define AEE_MYPIX_DIR "fs:/~0x0102382c/"
char* location = AEE_MYPIX_DIR;
char* fileName = "picture.bmp"
char* dest = text_concat(location, fileName);
IFile pIfile=IFILEMGR_OpenFile(pIFileMgr, dest, _OFM_CREATE);
try that folder Prayag, I was able to get the picture to show up in My Pics folder. Although i did notice that sometimes it required the device to be reset for the image to show up :S
Hi thanks for the reply but the problem still persist.
On setting AEEMediaData is
STRCAT( path,"fs:/~0x0102382c/");
STRCAT( path,"temple.png" );
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)path;
pMe->md.dwSize = 0;
the following function fails on setting media data
nErr=ICAMERA_SetMediaData(pMe->pICamera, &pMe->md, MT_PNG);

Stoff81 wrote:#define AEE_MYPIX_DIR "fs:/~0x0102382c/"
char* location = AEE_MYPIX_DIR;
char* fileName = "picture.bmp"
char* dest = text_concat(location, fileName);
IFile pIfile=IFILEMGR_OpenFile(pIFileMgr, dest, _OFM_CREATE);
try that folder Prayag, I was able to get the picture to show up in My Pics folder. Although i did notice that sometimes it required the device to be reset for the image to show up :S
Hi thanks for the reply but the problem still persist.
On setting AEEMediaData is
STRCAT( path,"fs:/~0x0102382c/");
STRCAT( path,"temple.png" );
pMe->md.clsData = MMD_FILE_NAME;
pMe->md.pData=(void*)path;
pMe->md.dwSize = 0;
the following function fails on setting media data
nErr=ICAMERA_SetMediaData(pMe->pICamera, &pMe->md, MT_PNG);

whats the err code you are getting?

whats the err code you are getting?

Hi,
ICAMERA_SetMediaData(...) returning EBADPARM (Invalid parameter error code 14).
please also tell me in path fs:/~0x0102382c/ the value 0x0102382c signifies for which class? Also whenever I am using path like fs:/shared/picture/test.png then image successfully stored but I am unable to find the image on the device. please tell me where is the problem actually.

Hi,
ICAMERA_SetMediaData(...) returning EBADPARM (Invalid parameter error code 14).
please also tell me in path fs:/~0x0102382c/ the value 0x0102382c signifies for which class? Also whenever I am using path like fs:/shared/picture/test.png then image successfully stored but I am unable to find the image on the device. please tell me where is the problem actually.