VirtualBox

Ignore:
Timestamp:
Oct 2, 2017 10:50:47 AM (7 years ago)
Author:
vboxsync
Message:

VideoRec: FE/VBoxManage: Added audio recording status to "showvminfo" command.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r68938 r68941  
    25432543    }
    25442544
     2545#ifdef VBOX_WITH_VIDEOREC
    25452546    {
    25462547        /* 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);
    25492554        com::SafeArray<BOOL> screens;
    25502555        CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureScreens)(ComSafeArrayAsOutParam(screens)), rc);
     
    25572562        ULONG Fps;
    25582563        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
    25612586        if (details == VMINFO_MACHINEREADABLE)
    25622587        {
    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
    25642592            RTPrintf("videocapscreens=");
    25652593            bool fComma = false;
     
    25712599                }
    25722600            RTPrintf("\n");
    2573             RTPrintf("videocapfile=\"%ls\"\n", File.raw());
     2601            RTPrintf("videocapfile=\"%ls\"\n", bstrFile.raw());
    25742602            RTPrintf("videocapres=%ux%u\n", (unsigned)Width, (unsigned)Height);
    25752603            RTPrintf("videocaprate=%u\n", (unsigned)Rate);
    25762604            RTPrintf("videocapfps=%u\n", (unsigned)Fps);
     2605            RTPrintf("videocapopts=%ls\n", bstrOptions.raw());
    25772606        }
    25782607        else
    25792608        {
    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
    25812613            RTPrintf("Capture screens:    ");
    25822614            bool fComma = false;
     
    25882620                }
    25892621            RTPrintf("\n");
    2590             RTPrintf("Capture file:       %ls\n", File.raw());
     2622            RTPrintf("Capture file:       %ls\n", bstrFile.raw());
    25912623            RTPrintf("Capture dimensions: %ux%u\n", Width, Height);
    25922624            RTPrintf("Capture rate:       %u kbps\n", Rate);
    25932625            RTPrintf("Capture FPS:        %u\n", Fps);
     2626            RTPrintf("Capture options:    %ls\n", bstrOptions.raw());
    25942627            RTPrintf("\n");
    2595         }
    2596     }
     2628
     2629            /** @todo Add more audio capturing profile / information here. */
     2630        }
     2631    }
     2632#endif /* VBOX_WITH_VIDEOREC */
    25972633
    25982634    if (    details == VMINFO_STANDARD
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette