EasyManua.ls Logo

Euresys Coaxlink - Page 35

Euresys Coaxlink
45 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
EGrabber for MultiCam usersCoaxlink Programmer's Guide
Euresys::EGrabber<> grabber(gentl, CARD_INDEX, DEVICE_INDEX);
Surface creation (automatic)
//MultiCam
status = McSetParamInt(channel, MC_SurfaceCount, BUFFER_COUNT);
if (status != MC_OK) {
...
}
//EGrabber
grabber.reallocBuffers(BUFFER_COUNT);
Surface creation (manual)
//MultiCam
for (size_t i = 0; i < BUFFER_COUNT; ++i) {
MCHANDLE surface;
MCSTATUS status;
void *mem = malloc(BUFFER_SIZE);
if (!mem) {
...
}
status = McCreate(MC_DEFAULT_SURFACE_HANDLE, &surface);
if (status != MC_OK) {
...
}
status = McSetParamInt(surface, MC_SurfaceSize, BUFFER_SIZE);
if (status != MC_OK) {
...
}
status = McSetParamPtr(surface, MC_SurfaceAddr, mem);
if (status != MC_OK) {
...
}
status = McSetParamPtr(surface, MC_SurfaceContext, USER_PTR[i]);
if (status != MC_OK) {
...
}
status = McSetParamInst(channel, MC_Cluster + i, surface);
if (status != MC_OK) {
...
}
}
//EGrabber
for (size_t i = 0; i < BUFFER_COUNT; ++i) {
void *mem = malloc(BUFFER_SIZE);
if (!mem) {
...
}
grabber.announceAndQueue(Euresys::UserMemory(mem, BUFFER_SIZE, USER_PTR[i]));
}
Surface cluster reset
//MultiCam
MCSTATUS status;
for (size_t i = 0; i < BUFFER_COUNT; ++i) {
MCHANDLE surface;
status = McGetParamInst(channel, MC_Cluster + i, &surface);
if (status != MC_OK) {
...
}
status = McSetParamInt(surface, MC_SurfaceState, MC_SurfaceState_FREE);
if (status != MC_OK) {
35