MCPcopy Create free account
hub / github.com/cinder/Cinder / updateModes

Method updateModes

samples/CaptureBasic/src/CaptureBasicApp.cpp:358–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356
357
358void CaptureBasicApp::updateModes()
359{
360 mCurrentModes.clear();
361 mSelectedModeIndex = -1; // Reset to auto mode
362
363 if( mSelectedDeviceIndex >= 0 && mSelectedDeviceIndex < (int)mDevices.size() ) {
364 CI_LOG_I( "\n=== Getting modes for device: " << mDevices[mSelectedDeviceIndex]->getName() << " ===" );
365 try {
366 mCurrentModes = mDevices[mSelectedDeviceIndex]->getModes();
367 CI_LOG_I( "Found " << mCurrentModes.size() << " modes:" );
368 for( size_t i = 0; i < mCurrentModes.size(); i++ ) {
369 CI_LOG_I( " [" << i << "] " << toString( mCurrentModes[i] ) );
370 }
371 }
372 catch( ci::Exception& exc ) {
373 CI_LOG_EXCEPTION( "Failed to get modes for device: " << mDevices[mSelectedDeviceIndex]->getName(), exc );
374 CI_LOG_E( "ERROR: Failed to get modes!" );
375 }
376 }
377}
378
379
380void prepareSettings( CaptureBasicApp::Settings* settings )

Callers

nothing calls this directly

Calls 5

toStringFunction · 0.50
clearMethod · 0.45
sizeMethod · 0.45
getNameMethod · 0.45
getModesMethod · 0.45

Tested by

no test coverage detected