VirtualBox

Ignore:
Timestamp:
Jan 12, 2017 3:25:30 PM (8 years ago)
Author:
vboxsync
Message:

VideoRec: Made the feature less dependent from the codec(s) being used by renaming VBOX_WITH_VPX to VBOX_WITH_VIDEOREC. The feature itself then relies on codecs we do / don't provide on compile time, e.g. VBOX_WITH_LIBVPX.

Location:
trunk/src/VBox/Frontends/VBoxHeadless
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/Makefile.kmk

    r62493 r65263  
    55
    66#
    7 # Copyright (C) 2006-2016 Oracle Corporation
     7# Copyright (C) 2006-2017 Oracle Corporation
    88#
    99# This file is part of VirtualBox Open Source Edition (OSE), as
     
    4545#
    4646VBoxHeadless_TEMPLATE  := $(if $(VBOX_WITH_HARDENING),VBOXMAINCLIENTDLL,VBOXMAINCLIENTEXE)
    47 VBoxHeadless_DEFS      += $(if $(VBOX_WITH_VPX),VBOX_WITH_VPX,)
     47VBoxHeadless_DEFS      += $(if $(VBOX_WITH_VIDEOREC),VBOX_WITH_VIDEOREC,)
    4848VBoxHeadless_SOURCES    = VBoxHeadless.cpp
    4949ifdef VBOX_WITH_GUEST_PROPS
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r64184 r65263  
    55
    66/*
    7  * Copyright (C) 2006-2016 Oracle Corporation
     7 * Copyright (C) 2006-2017 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4444#include <VBox/VBoxVideo.h>
    4545
    46 #ifdef VBOX_WITH_VPX
     46#ifdef VBOX_WITH_VIDEOREC
    4747# include <cstdlib>
    4848# include <cerrno>
     
    464464             "                                       settings password\n"
    465465             "   -start-paused, --start-paused     Start the VM in paused state\n"
    466 #ifdef VBOX_WITH_VPX
     466#ifdef VBOX_WITH_VIDEOREC
    467467             "   -c, -capture, --capture           Record the VM screen output to a file\n"
    468468             "   -w, --width                       Frame width when recording\n"
     
    475475}
    476476
    477 #ifdef VBOX_WITH_VPX
     477#ifdef VBOX_WITH_VIDEOREC
    478478/**
    479479 * Parse the environment for variables which can influence the VIDEOREC settings.
     
    524524        *ppszFileName = pszEnvTemp;
    525525}
    526 #endif /* VBOX_WITH_VPX defined */
     526#endif /* VBOX_WITH_VIDEOREC defined */
    527527
    528528static RTEXITCODE readPasswordFile(const char *pszFilename, com::Utf8Str *pPasswd)
     
    626626    unsigned fCSAM  = ~0U;
    627627    unsigned fPaused = 0;
    628 #ifdef VBOX_WITH_VPX
     628#ifdef VBOX_WITH_VIDEOREC
    629629    bool fVideoRec = 0;
    630630    unsigned long ulFrameWidth = 800;
     
    633633    char szMpegFile[RTPATH_MAX];
    634634    const char *pszFileNameParam = "VBox-%d.vob";
    635 #endif /* VBOX_WITH_VPX */
     635#endif /* VBOX_WITH_VIDEOREC */
    636636#ifdef RT_OS_WINDOWS
    637637    ATL::CComModule _Module; /* Required internally by ATL (constructor records instance in global variable). */
     
    643643             "All rights reserved.\n\n");
    644644
    645 #ifdef VBOX_WITH_VPX
     645#ifdef VBOX_WITH_VIDEOREC
    646646    /* Parse the environment */
    647647    parse_environ(&ulFrameWidth, &ulFrameHeight, &ulBitRate, &pszFileNameParam);
     
    696696        { "--settingspw", OPT_SETTINGSPW, RTGETOPT_REQ_STRING },
    697697        { "--settingspwfile", OPT_SETTINGSPW_FILE, RTGETOPT_REQ_STRING },
    698 #ifdef VBOX_WITH_VPX
     698#ifdef VBOX_WITH_VIDEOREC
    699699        { "-capture", 'c', 0 },
    700700        { "--capture", 'c', 0 },
     
    703703        { "--bitrate", 'r', RTGETOPT_REQ_UINT32 },
    704704        { "--filename", 'f', RTGETOPT_REQ_STRING },
    705 #endif /* VBOX_WITH_VPX defined */
     705#endif /* VBOX_WITH_VIDEOREC defined */
    706706        { "-comment", OPT_COMMENT, RTGETOPT_REQ_STRING },
    707707        { "--comment", OPT_COMMENT, RTGETOPT_REQ_STRING },
     
    780780                fPaused = true;
    781781                break;
    782 #ifdef VBOX_WITH_VPX
     782#ifdef VBOX_WITH_VIDEOREC
    783783            case 'c':
    784784                fVideoRec = true;
     
    793793                pszFileNameParam = ValueUnion.psz;
    794794                break;
    795 #endif /* VBOX_WITH_VPX defined */
     795#endif /* VBOX_WITH_VIDEOREC defined */
    796796            case 'h':
    797 #ifdef VBOX_WITH_VPX
     797#ifdef VBOX_WITH_VIDEOREC
    798798                if ((GetState.pDef->fFlags & RTGETOPT_REQ_MASK) != RTGETOPT_REQ_NOTHING)
    799799                {
     
    817817    }
    818818
    819 #ifdef VBOX_WITH_VPX
     819#ifdef VBOX_WITH_VIDEOREC
    820820    if (ulFrameWidth < 512 || ulFrameWidth > 2048 || ulFrameWidth % 2)
    821821    {
     
    847847    }
    848848    RTStrPrintf(&szMpegFile[0], RTPATH_MAX, pszFileNameParam, RTProcSelf());
    849 #endif /* defined VBOX_WITH_VPX */
     849#endif /* defined VBOX_WITH_VIDEOREC */
    850850
    851851    if (!pcszNameOrUUID)
     
    958958        CHECK_ERROR_BREAK(console, COMGETTER(Display)(display.asOutParam()));
    959959
    960 #ifdef VBOX_WITH_VPX
     960#ifdef VBOX_WITH_VIDEOREC
    961961        if (fVideoRec)
    962962        {
     
    967967            CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureEnabled)(TRUE));
    968968        }
    969 #endif /* defined(VBOX_WITH_VPX) */
     969#endif /* defined(VBOX_WITH_VIDEOREC) */
    970970
    971971        /* get the machine debugger (isn't necessarily available) */
     
    12161216        Log(("VBoxHeadless: event loop has terminated...\n"));
    12171217
    1218 #ifdef VBOX_WITH_VPX
     1218#ifdef VBOX_WITH_VIDEOREC
    12191219        if (fVideoRec)
    12201220        {
     
    12221222                machine->COMSETTER(VideoCaptureEnabled)(FALSE);
    12231223        }
    1224 #endif /* defined(VBOX_WITH_VPX) */
     1224#endif /* defined(VBOX_WITH_VIDEOREC) */
    12251225
    12261226        /* we don't have to disable VRDE here because we don't save the settings of the VM */
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