Documentation Bugs of ICamera interface in BREW SDK | developer.brewmp.com Documentation Bugs of ICamera interface in BREW SDK | developer.brewmp.com

Developer

Documentation Bugs of ICamera interface in BREW SDK

Forums:

Hi, I found some typos (or bugs?) related with the ICamera documentation in Brew SDK API documents. I'm not sure whether this is the right place to report these bugs but I couldn't find related bug report email address or bug report URL from the BREW documentation.

Here is a list of bugs I've found. All these bugs exist in the documents of both Brew SDK 2.1.3 and Brew SDK 3.x. (in file "help\BREWAPIReference.chm" for BREW SDK 2.1.3, in file ""docs\BREWAPIReference.chm" for BREW SDK 3.x )

1. Typo in function prototype of ICAMERA_GetFrame()

In the documentation, the prototype of ICAMERA_GetFrame() is:

IBitmap * ICAMERA_GetFrame(ICamera * pICamera, IBitmap ** ppFrame);
It should be int ICAMERA_GetFrame(ICamera * pICamera, IBitmap ** ppFrame); according to the header file "AEECamera.h"

2. Error in ICamera sample code (located after the general introduction of ICamera interface)

static int CApp_StartCameraInPreviewMode(CApp * pme)
{
....
// Register callback notification function.
nRet = ICAMERA_RegisterNotify(pme->m_pICamera, CApp_CameraNotify, pme);
if (nErr)
return nErr;
..........

nRet is undefined and it should be nErr according to the context.

3. Another error in the ICamera sample code

static void CApp_CameraNotify(void * pUser, AEECameraNotify * pn)
{
......
if (SUCCESS == ICAMERA_GetFrame(pme->m_pICamera, &pFrame))
return;

IBITMAP_GetInfo(pFrame, &bi, sizeof(bi));

// Display the frame at (0, 0) location of the screen
IDISPLAY_BitBlt(pme, 0, 0, bi.cx, bi.cy, pFrame, 0, 0, AEE_RO_COPY);
IBITMAP_Release(pFrame);
.....

I believe it should be

if (SUCCESS != ICAMERA_GetFrame(pme->m_pICamera, &pFrame))
return
otherwise the application won't call the follow-on function IDISPLAY_BitBlt().

-jingtaow

Documentation Bugs of ICamera interface in BREW SDK
Hi, I found some typos (or bugs?) related with the ICamera documentation in Brew SDK API documents. I'm not sure whether this is the right place to report these bugs but I couldn't find related bug report email address or bug report URL from the BREW documentation.
Here is a list of bugs I've found. All these bugs exist in the documents of both Brew SDK 2.1.3 and Brew SDK 3.x. (in file "help\BREWAPIReference.chm" for BREW SDK 2.1.3, in file ""docs\BREWAPIReference.chm" for BREW SDK 3.x )
1. Typo in function prototype of ICAMERA_GetFrame()
In the documentation, the prototype of ICAMERA_GetFrame() is:
IBitmap * ICAMERA_GetFrame(ICamera * pICamera, IBitmap ** ppFrame);
It should be int ICAMERA_GetFrame(ICamera * pICamera, IBitmap ** ppFrame); according to the header file "AEECamera.h"
2. Error in ICamera sample code (located after the general introduction of ICamera interface)
static int CApp_StartCameraInPreviewMode(CApp * pme)
{
....
// Register callback notification function.
nRet = ICAMERA_RegisterNotify(pme->m_pICamera, CApp_CameraNotify, pme);
if (nErr)
return nErr;
..........

nRet is undefined and it should be nErr according to the context.
3. Another error in the ICamera sample code
static void CApp_CameraNotify(void * pUser, AEECameraNotify * pn)
{
......
if (SUCCESS == ICAMERA_GetFrame(pme->m_pICamera, &pFrame))
return;
IBITMAP_GetInfo(pFrame, &bi, sizeof(bi));
// Display the frame at (0, 0) location of the screen
IDISPLAY_BitBlt(pme, 0, 0, bi.cx, bi.cy, pFrame, 0, 0, AEE_RO_COPY);
IBITMAP_Release(pFrame);
.....

I believe it should be
if (SUCCESS != ICAMERA_GetFrame(pme->m_pICamera, &pFrame))
return
otherwise the application won't call the follow-on function IDISPLAY_BitBlt().
-jingtaow

Documentation Bugs of ICamera interface in BREW SDK
Hi, I found some typos (or bugs?) related with the ICamera documentation in Brew SDK API documents. I'm not sure whether this is the right place to report these bugs but I couldn't find related bug report email address or bug report URL from the BREW documentation.
Here is a list of bugs I've found. All these bugs exist in the documents of both Brew SDK 2.1.3 and Brew SDK 3.x. (in file "help\BREWAPIReference.chm" for BREW SDK 2.1.3, in file ""docs\BREWAPIReference.chm" for BREW SDK 3.x )
1. Typo in function prototype of ICAMERA_GetFrame()
In the documentation, the prototype of ICAMERA_GetFrame() is:
IBitmap * ICAMERA_GetFrame(ICamera * pICamera, IBitmap ** ppFrame);
It should be int ICAMERA_GetFrame(ICamera * pICamera, IBitmap ** ppFrame); according to the header file "AEECamera.h"
2. Error in ICamera sample code (located after the general introduction of ICamera interface)
static int CApp_StartCameraInPreviewMode(CApp * pme)
{
....
// Register callback notification function.
nRet = ICAMERA_RegisterNotify(pme->m_pICamera, CApp_CameraNotify, pme);
if (nErr)
return nErr;
..........

nRet is undefined and it should be nErr according to the context.
3. Another error in the ICamera sample code
static void CApp_CameraNotify(void * pUser, AEECameraNotify * pn)
{
......
if (SUCCESS == ICAMERA_GetFrame(pme->m_pICamera, &pFrame))
return;
IBITMAP_GetInfo(pFrame, &bi, sizeof(bi));
// Display the frame at (0, 0) location of the screen
IDISPLAY_BitBlt(pme, 0, 0, bi.cx, bi.cy, pFrame, 0, 0, AEE_RO_COPY);
IBITMAP_Release(pFrame);
.....

I believe it should be
if (SUCCESS != ICAMERA_GetFrame(pme->m_pICamera, &pFrame))
return
otherwise the application won't call the follow-on function IDISPLAY_BitBlt().
-jingtaow

Thanks for posting these... :) ..

Thanks for posting these... :) ..

Thanx for pointing out the errors in the doc. They will be fixed after the 3.1.4 release.

Thanx for pointing out the errors in the doc. They will be fixed after the 3.1.4 release.