/** \brief Wrapper for dc1394GetFeatureName() */ const char *C1394CameraControl::GetName() { return dc1394GetFeatureName(this->m_feature); }
/**\brief Initializes a C1394Camera class * \ingroup camcore * * The constructor initializes internal state and assigns register offsets and parent pointers * to the public C1394CameraControl members. Many C++ compilers moan about using <i>this</i> * in initializers, and justifiably so. Each of these constructors does nothing more than store * <i>this</i> as its parent camera pointer. No further processing is done downstream of the constructor. */ C1394Camera::C1394Camera(): m_pName(NULL), m_linkChecked(false), m_cameraInitialized(false), m_node(-1), m_hDeviceAcquisition(INVALID_HANDLE_VALUE), m_hDevInfo(INVALID_HANDLE_VALUE), m_dwDevCount(0), m_videoFormat(0), m_videoMode(0), m_videoFrameRate(0), m_InqBasicFunc(0), m_InqFeatureHi(0), m_InqFeatureLo(0), m_InqOptionalFunc(0), m_StatusPowerControl(0), m_StatusVideoError(0), m_StatusVideoDepth(0), m_StatusFeatureErrorHi(0), m_StatusFeatureErrorLo(0), m_AdvFuncOffset(0), m_PIOFuncOffset(0), m_SIOFuncOffset(0), m_StrobeFuncOffset(0), m_StrobeRootCaps(0), m_maxBytes(0), m_maxBufferSize(0), m_maxSpeed(0), m_width(0), m_height(0), m_colorCode(COLOR_CODE_INVALID), m_pFirstBuffer(NULL), m_pLastBuffer(NULL), m_pCurrentBuffer(NULL), m_AcquisitionTimeout(0), m_AcquisitionFlags(0), m_AcquisitionBuffers(0) { int i,format,mode; DllTrace(DLL_TRACE_ENTER,"ENTER C1394Camera Constructor\n"); // this is the best place to trace the structure sizes DllTrace(DLL_TRACE_VERBOSE,"sizeof(C1394Camera) = %d\n",sizeof(C1394Camera)); DllTrace(DLL_TRACE_VERBOSE,"sizeof(C1394CameraControl) = %d\n",sizeof(C1394CameraControl)); DllTrace(DLL_TRACE_VERBOSE,"sizeof(C1394CameraControlSize) = %d\n",sizeof(C1394CameraControlSize)); DllTrace(DLL_TRACE_VERBOSE,"sizeof(C1394CameraControlTrigger) = %d\n",sizeof(C1394CameraControlTrigger)); ZeroMemory(&m_spec,sizeof(CAMERA_SPECIFICATION)); // initialize video settings arrays to false m_InqVideoFormats = 0; for (format=0; format<8; format++) { m_InqVideoModes[format] = 0; for (mode=0; mode<8; mode++) m_InqVideoRates[format][mode] = 0; } // initialize the feature controls for(i=0; i<FEATURE_NUM_FEATURES; i++) { if(i != FEATURE_TRIGGER_MODE && dc1394GetFeatureName((CAMERA_FEATURE)(i)) != NULL) m_pControls[i] = new C1394CameraControl(this,(CAMERA_FEATURE)(i)); else m_pControls[i] = NULL; } m_pControlTrigger = new C1394CameraControlTrigger(this); m_pControlSize = new C1394CameraControlSize(this); // initialize the strobe controls for(i=0; i<4; i++) this->m_controlStrobes[i] = new C1394CameraControlStrobe(this,i); m_nameModel[0] = 0; m_nameVendor[0] = 0; m_DevicePath[0] = 0; m_UniqueID.QuadPart = 0; DllTrace(DLL_TRACE_EXIT,"EXIT C1394Camera Constructor\n"); }