| 39 | }; |
| 40 | |
| 41 | void CaptureBasicApp::setup() |
| 42 | { |
| 43 | // Initialize ImGui |
| 44 | ImGui::Initialize(); |
| 45 | |
| 46 | // Get devices |
| 47 | mDevices = Capture::getDevices(); |
| 48 | CI_LOG_I( "Found " << mDevices.size() << " capture devices" ); |
| 49 | |
| 50 | mSelectedDeviceIndex = 0; |
| 51 | mSelectedModeIndex = -1; // -1 means auto mode |
| 52 | mShowUI = true; |
| 53 | |
| 54 | printDevices(); |
| 55 | |
| 56 | // Start with first device if available |
| 57 | if( ! mDevices.empty() ) { |
| 58 | updateModes(); |
| 59 | setupCapture( mDevices[0] ); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | void CaptureBasicApp::update() |
| 64 | { |