please help. im stucked!

@brief: need to run on a Treo650, development tool is CW for PalmOS ver 9.3, 
using the PalmOS Garnet SDK

i tried using two APIs. first the PalmOnePhotoAPI. here's the part of the code 
that calls the built in camera.

Err VideoPreview()
{
/** from the photo lib **/
PalmPhotoHandle photoH = NULL;
PalmPhotoCaptureParamV2 captureParam;
PalmPhotoCaptureResolution SupportedResolutions;
Err err;
Boolean cont = false;

// setup callframes
MemSet(&captureParam, sizeof(PalmPhotoCaptureParamV2), 0);

captureParam.fileLocation.fileLocationType = palmPhotoVFSLocation; 
//captureParam.fileLocation.reserved = 0;
captureParam.fileLocation.file.VFSFile.volumeRef = volRefNum;
StrCopy(captureParam.fileLocation.file.VFSFile.name, p_fileName);

SupportedResolutions = PalmPhotoGetSupportedCaptureResolutionsV3(PhotoLibRefNum 
, palmPhotoMediaTypeVideo);
GetDimensions(SupportedResolutions); //get dimendions for suported resolution

captureParam.imageInfo.width = videoWidth;
captureParam.imageInfo.height = videoHeight;
captureParam.imageInfo.bitsPerPixel = 16;
captureParam.imageInfo.filesize = 0;
captureParam.imageInfo.fileFormat = palmPhotoPreferredVideoFormat;
captureParam.imageInfo.imageQuality = palmPhotoLowQuality;
captureParam.captureCallback = NULL;
captureParam.userDataP = NULL;

/** capture photo **/
photoH = PalmPhotoCaptureImageV2(PhotoLibRefNum, &captureParam);

//get last error
err = PalmPhotoGetLastErrV2(PhotoLibRefNum);

if ((err) && ( err != palmPhotoLibErrUserCancel ))
{ GenerateErrorMsg(err);
goto Done;
}
else if (err == palmPhotoLibErrUserCancel) // --> user press the cancel button 
on the camera
goto Done;

Done:
PalmPhotoCloseImageV2(PhotoLibRefNum, photoH);
return err;

}

*** problem is the image on the screen on the preview mode is not moving it 
stops on the first frame it capture. therefore cannot record a video. even if i 
press the recording button, the image is stucked on the first frame it capture 
and it does not direct me to the save/preview part.

second, i used the PalmOneCamera API. i called the StartStream (from the 
CameraV3), the screen turns white and then it hangs. i had to do a reset on the 
unit.

please, all inputs will be highly appreciated!! (in fact it is badly needed!)

thanks a lot!!

sHe
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to