void MIPDirectShowCapture::clearNonZero() { if (m_pControl) m_pControl->Release(); if (m_pGrabber) m_pGrabber->Release(); if (m_pSampGrabFilter) m_pSampGrabFilter->Release(); if (m_pNullRenderer) m_pNullRenderer->Release(); if (m_pCaptDevice) m_pCaptDevice->Release(); if (m_pBuilder) m_pBuilder->Release(); if (m_pGraph) m_pGraph->Release(); if (m_pGrabCallback) delete m_pGrabCallback; if (m_pVideoMsg) delete m_pVideoMsg; if (m_pMsgFrame) delete [] m_pMsgFrame; if (m_pFullFrame) delete [] m_pFullFrame; zeroAll(); }
//-------------------------------------------------------------- Surface::Surface(string id) { printf("[new Surface(%s)]\n", id.c_str()); m_id = id; zeroAll(); #if MURMUR_DEFINE_SYPHON m_syphonServer.setName(m_id); #endif }
MIPDirectShowCapture::MIPDirectShowCapture() : MIPComponent("MIPDirectShowCapture") { zeroAll(); int status; if ((status = m_frameMutex.Init()) < 0) { std::cerr << "Error: can't initialize DirectShow capture frame mutex (JMutex error code " << status << ")" << std::endl; exit(-1); } }
//-------------------------------------------------------------- Surface::Surface(string id, int wPixels, int hPixels) { printf("[new Surface(%s,%d,%d)]\n", id.c_str(), wPixels, hPixels); m_id = id; zeroAll(); setDimensions(wPixels,hPixels); #if MURMUR_DEFINE_SYPHON m_syphonServer.setName(m_id); #endif }
//-------------------------------------------------------------- Surface::Surface(string id) { OFAPPLOG->begin("Surface::Surface("+id+")"); // printf("[new Surface(%s)]\n", id.c_str()); m_id = id; zeroAll(); #if MURMUR_DEFINE_SYPHON m_syphonServer.setName(m_id); #endif OFAPPLOG->end(); }
void SoundRecorder::deleteAll() { if (m_pChain) { m_pChain->stop(); delete m_pChain; } if (m_pInput) delete m_pInput; if (m_pSampEnc) delete m_pSampEnc; if (m_pOutput) delete m_pOutput; zeroAll(); }
/* * Assignment operator for integers * 0 - zeros the matrix * 1 - sets it to identy * anything else is an error */ int FMatrix::operator=( int x ) // sets matrix to 0 or 1 { if( x == 0 ) zeroAll(); else if( x == 1 ) { assert( xdim == ydim ); for( int ix = 0; ix < xdim; ix++ ) for( int iy = 0; iy < ydim; iy++ ) elem[ iy*xdim + ix ] = (float) (ix == iy); } else assert( 0 ); return( x ); }
/** * Setup data storage */ void setup( SphereDataConfig *i_sphConfig, ///< Handler to sphConfig int i_halosize_offdiagonal = 0 ///< Size of the halo around. A value of 2 allocates data for 5 diagonals. ) { assert(data == nullptr); sphConfig = i_sphConfig; halosize_off_diagonal = i_halosize_offdiagonal; num_diagonals = 2*halosize_off_diagonal+1; data = MemBlockAlloc::alloc<T>(sizeof(T)*sphConfig->spectral_array_data_number_of_elements*num_diagonals); zeroAll(); }
//-------------------------------------------------------------- Surface::Surface(string id, int wPixels, int hPixels) { OFAPPLOG->begin("Surface::Surface("+id+","+ofToString(wPixels)+","+ofToString(hPixels)+")"); // OFAPPLOG->println("[new Surface(%s,%d,%d)]\n", id.c_str(), wPixels, hPixels); m_id = id; zeroAll(); setDimensions(wPixels,hPixels); #if MURMUR_DEFINE_SYPHON m_syphonServer.setName(m_id); #endif m_alphaLayer = 0.0f; OFAPPLOG->end(); }
SoundRecorder::SoundRecorder() { zeroAll(); m_init = false; }