|
Camera GetImage not getting image
I'm having trouble with the call to GetImage.
I'm getting a connection to the camera because if I unhook the cat 5 I get a connect error on the "AxisCamera::GetInstance("10.12.51.11");" line. but when when I call GetImage, I get nothing. The width is 0 and IsFreshImage is always false. Am I missing something?
if (m_CamEnabled)
{
int iWidth = 0;
AxisCamera &m_camera = AxisCamera::GetInstance("10.12.51.11");
HSLImage *image = m_camera.GetImage();
Error &err = m_camera.GetError();
if (err.GetLineNumber() != 0)
{
printf("AxisCamera error number %f \n", err.GetLineNumber());
printf(err.GetMessage());
}
if (telePeriodicLoops < 2)
{
m_camera.WriteResolution(AxisCamera::kResolution_3 20x240);
m_camera.WriteCompression(20);
m_camera.WriteBrightness(0);
}
//if (m_camera.IsFreshImage())
//{
// get the camera image
//m_camera.IsFreshImage();
iWidth = image->GetWidth();
if (iWidth > 0)
{
|