MCPcopy Create free account
hub / github.com/cmauri/eviacam / getCamera

Method getCamera

creavision/crvcamera_enum.cpp:62–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60}
61
62CCamera* CCameraEnum::getCamera(int driverId, int camId, unsigned int width, unsigned int height, float frameRate)
63{
64 if (camId>= getNumDevices(driverId)) return NULL;
65
66 try{
67 if (driverId == CAMERA_CV_ID) {
68 return new CCameraCV(camId, width, height, frameRate);
69 }
70 else {
71 return new NATIVE_CAM_CLASS(camId, width, height, frameRate);
72 }
73 }
74 catch (camera_exception &e) {
75 slog_write (SLOG_PRIO_ERR, "error initializing camera: %s\n", e.what());
76 }
77
78 return NULL;
79}
80

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected