Changeset 68941 in vbox for trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
- Timestamp:
- Oct 2, 2017 10:50:47 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r68938 r68941 2543 2543 } 2544 2544 2545 #ifdef VBOX_WITH_VIDEOREC 2545 2546 { 2546 2547 /* Video capture */ 2547 BOOL bActive = FALSE; 2548 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureEnabled)(&bActive), rc); 2548 BOOL fCaptureVideo = FALSE; 2549 # ifdef VBOX_WITH_AUDIO_VIDEOREC 2550 BOOL fCaptureAudio = FALSE; 2551 # endif 2552 2553 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureEnabled)(&fCaptureVideo), rc); 2549 2554 com::SafeArray<BOOL> screens; 2550 2555 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureScreens)(ComSafeArrayAsOutParam(screens)), rc); … … 2557 2562 ULONG Fps; 2558 2563 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFPS)(&Fps), rc); 2559 Bstr File; 2560 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFile)(File.asOutParam()), rc); 2564 Bstr bstrFile; 2565 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFile)(bstrFile.asOutParam()), rc); 2566 Bstr bstrOptions; 2567 CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureOptions)(bstrOptions.asOutParam()), rc); 2568 2569 Utf8Str strOptions(bstrOptions); 2570 size_t pos = 0; 2571 com::Utf8Str key, value; 2572 while ((pos = strOptions.parseKeyValue(key, value, pos)) != com::Utf8Str::npos) 2573 { 2574 if (key.compare("vc_enabled", Utf8Str::CaseInsensitive) == 0) 2575 { 2576 fCaptureVideo = value.compare("true", Utf8Str::CaseInsensitive) == 0; 2577 } 2578 else if (key.compare("ac_enabled", Utf8Str::CaseInsensitive) == 0) 2579 { 2580 # ifdef VBOX_WITH_AUDIO_VIDEOREC 2581 fCaptureAudio = value.compare("true", Utf8Str::CaseInsensitive) == 0; 2582 # endif 2583 } 2584 } 2585 2561 2586 if (details == VMINFO_MACHINEREADABLE) 2562 2587 { 2563 RTPrintf("videocap=\"%s\"\n", bActive ? "on" : "off"); 2588 RTPrintf("videocap=\"%s\"\n", fCaptureVideo ? "on" : "off"); 2589 # ifdef VBOX_WITH_AUDIO_VIDEOREC 2590 RTPrintf("videocap_audio=\"%s\"\n", fCaptureAudio ? "on" : "off"); 2591 # endif 2564 2592 RTPrintf("videocapscreens="); 2565 2593 bool fComma = false; … … 2571 2599 } 2572 2600 RTPrintf("\n"); 2573 RTPrintf("videocapfile=\"%ls\"\n", File.raw());2601 RTPrintf("videocapfile=\"%ls\"\n", bstrFile.raw()); 2574 2602 RTPrintf("videocapres=%ux%u\n", (unsigned)Width, (unsigned)Height); 2575 2603 RTPrintf("videocaprate=%u\n", (unsigned)Rate); 2576 2604 RTPrintf("videocapfps=%u\n", (unsigned)Fps); 2605 RTPrintf("videocapopts=%ls\n", bstrOptions.raw()); 2577 2606 } 2578 2607 else 2579 2608 { 2580 RTPrintf("Video capturing: %s\n", bActive ? "active" : "not active"); 2609 RTPrintf("Capturing: %s\n", fCaptureVideo ? "active" : "not active"); 2610 # ifdef VBOX_WITH_AUDIO_VIDEOREC 2611 RTPrintf("Capture audio: %s\n", fCaptureAudio ? "active" : "not active"); 2612 # endif 2581 2613 RTPrintf("Capture screens: "); 2582 2614 bool fComma = false; … … 2588 2620 } 2589 2621 RTPrintf("\n"); 2590 RTPrintf("Capture file: %ls\n", File.raw());2622 RTPrintf("Capture file: %ls\n", bstrFile.raw()); 2591 2623 RTPrintf("Capture dimensions: %ux%u\n", Width, Height); 2592 2624 RTPrintf("Capture rate: %u kbps\n", Rate); 2593 2625 RTPrintf("Capture FPS: %u\n", Fps); 2626 RTPrintf("Capture options: %ls\n", bstrOptions.raw()); 2594 2627 RTPrintf("\n"); 2595 } 2596 } 2628 2629 /** @todo Add more audio capturing profile / information here. */ 2630 } 2631 } 2632 #endif /* VBOX_WITH_VIDEOREC */ 2597 2633 2598 2634 if ( details == VMINFO_STANDARD
Note:
See TracChangeset
for help on using the changeset viewer.