VirtualBox

Changeset 75341 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Nov 9, 2018 8:37:28 AM (6 years ago)
Author:
vboxsync
Message:

Recording: Renaming APIs ICapture* -> IRecord* and other terminology to better distinguish from features like mouse capturing and stuff.

Location:
trunk/src/VBox/Main/src-client
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r75313 r75341  
    56325632# ifdef VBOX_WITH_AUDIO_VIDEOREC
    56335633                    /* Attach the video recording audio driver if required. */
    5634                     if (   Capture.mpVideoRecCtx->IsFeatureEnabled(CaptureFeature_Audio)
     5634                    if (   Capture.mpVideoRecCtx->IsFeatureEnabled(RecordFeature_Audio)
    56355635                        && Capture.mAudioVideoRec)
    56365636                    {
     
    56675667#endif /* VBOX_WITH_VIDEOREC */
    56685668
    5669 HRESULT Console::i_onCaptureChange()
     5669HRESULT Console::i_onRecordChange()
    56705670{
    56715671    AutoCaller autoCaller(this);
     
    56805680    if (ptrVM.isOk())
    56815681    {
    5682         ComPtr<ICaptureSettings> CaptureSettings;
    5683         rc = mMachine->COMGETTER(CaptureSettings)(CaptureSettings.asOutParam());
     5682        ComPtr<IRecordSettings> RecordSettings;
     5683        rc = mMachine->COMGETTER(RecordSettings)(RecordSettings.asOutParam());
    56845684        AssertComRCReturnRC(rc);
    56855685
    56865686        BOOL fEnabled;
    5687         rc = CaptureSettings->COMGETTER(Enabled)(&fEnabled);
     5687        rc = RecordSettings->COMGETTER(Enabled)(&fEnabled);
    56885688        AssertComRCReturnRC(rc);
    56895689
     
    56925692        {
    56935693            alock.release();
    5694             fireCaptureChangedEvent(mEventSource);
     5694            fireRecordChangedEvent(mEventSource);
    56955695        }
    56965696
     
    68826882
    68836883    if (   Capture.mpVideoRecCtx->IsStarted()
    6884         && Capture.mpVideoRecCtx->IsFeatureEnabled(CaptureFeature_Audio))
     6884        && Capture.mpVideoRecCtx->IsFeatureEnabled(RecordFeature_Audio))
    68856885    {
    68866886        return Capture.mpVideoRecCtx->SendAudioFrame(pvData, cbData, uTimestampMs);
     
    68926892
    68936893#ifdef VBOX_WITH_VIDEOREC
    6894 int Console::i_videoRecGetSettings(settings::CaptureSettings &Settings)
     6894int Console::i_videoRecGetSettings(settings::RecordSettings &Settings)
    68956895{
    68966896    Assert(mMachine.isNotNull());
     
    68986898    Settings.applyDefaults();
    68996899
    6900     ComPtr<ICaptureSettings> pCaptureSettings;
    6901     HRESULT hrc = mMachine->COMGETTER(CaptureSettings)(pCaptureSettings.asOutParam());
     6900    ComPtr<IRecordSettings> pRecordSettings;
     6901    HRESULT hrc = mMachine->COMGETTER(RecordSettings)(pRecordSettings.asOutParam());
    69026902    AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    69036903
    69046904    BOOL fTemp;
    6905     hrc = pCaptureSettings->COMGETTER(Enabled)(&fTemp);
     6905    hrc = pRecordSettings->COMGETTER(Enabled)(&fTemp);
    69066906    AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    69076907    Settings.fEnabled = RT_BOOL(fTemp);
    69086908
    6909     SafeIfaceArray<ICaptureScreenSettings> paCaptureScreens;
    6910     hrc = pCaptureSettings->COMGETTER(Screens)(ComSafeArrayAsOutParam(paCaptureScreens));
     6909    SafeIfaceArray<IRecordScreenSettings> paCaptureScreens;
     6910    hrc = pRecordSettings->COMGETTER(Screens)(ComSafeArrayAsOutParam(paCaptureScreens));
    69116911    AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    69126912
    69136913    for (unsigned long i = 0; i < (unsigned long)paCaptureScreens.size(); ++i)
    69146914    {
    6915         settings::CaptureScreenSettings CaptureScreenSettings;
    6916         ComPtr<ICaptureScreenSettings> pCaptureScreenSettings = paCaptureScreens[i];
    6917 
    6918         hrc = pCaptureScreenSettings->COMGETTER(Enabled)(&fTemp);
     6915        settings::RecordScreenSettings RecordScreenSettings;
     6916        ComPtr<IRecordScreenSettings> pRecordScreenSettings = paCaptureScreens[i];
     6917
     6918        hrc = pRecordScreenSettings->COMGETTER(Enabled)(&fTemp);
    69196919        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    6920         CaptureScreenSettings.fEnabled = RT_BOOL(fTemp);
    6921         hrc = pCaptureScreenSettings->COMGETTER(MaxTime)((ULONG *)&CaptureScreenSettings.ulMaxTimeS);
     6920        RecordScreenSettings.fEnabled = RT_BOOL(fTemp);
     6921        hrc = pRecordScreenSettings->COMGETTER(MaxTime)((ULONG *)&RecordScreenSettings.ulMaxTimeS);
    69226922        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    6923         hrc = pCaptureScreenSettings->COMGETTER(MaxFileSize)((ULONG *)&CaptureScreenSettings.File.ulMaxSizeMB);
     6923        hrc = pRecordScreenSettings->COMGETTER(MaxFileSize)((ULONG *)&RecordScreenSettings.File.ulMaxSizeMB);
    69246924        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    69256925        Bstr bstrTemp;
    6926         hrc = pCaptureScreenSettings->COMGETTER(FileName)(bstrTemp.asOutParam());
     6926        hrc = pRecordScreenSettings->COMGETTER(FileName)(bstrTemp.asOutParam());
    69276927        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    6928         CaptureScreenSettings.File.strName = bstrTemp;
    6929         hrc = pCaptureScreenSettings->COMGETTER(Options)(bstrTemp.asOutParam());
     6928        RecordScreenSettings.File.strName = bstrTemp;
     6929        hrc = pRecordScreenSettings->COMGETTER(Options)(bstrTemp.asOutParam());
    69306930        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    6931         CaptureScreenSettings.strOptions = bstrTemp;
    6932         hrc = pCaptureScreenSettings->COMGETTER(VideoWidth)((ULONG *)&CaptureScreenSettings.Video.ulWidth);
     6931        RecordScreenSettings.strOptions = bstrTemp;
     6932        hrc = pRecordScreenSettings->COMGETTER(VideoWidth)((ULONG *)&RecordScreenSettings.Video.ulWidth);
    69336933        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    6934         hrc = pCaptureScreenSettings->COMGETTER(VideoHeight)((ULONG *)&CaptureScreenSettings.Video.ulHeight);
     6934        hrc = pRecordScreenSettings->COMGETTER(VideoHeight)((ULONG *)&RecordScreenSettings.Video.ulHeight);
    69356935        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    6936         hrc = pCaptureScreenSettings->COMGETTER(VideoRate)((ULONG *)&CaptureScreenSettings.Video.ulRate);
     6936        hrc = pRecordScreenSettings->COMGETTER(VideoRate)((ULONG *)&RecordScreenSettings.Video.ulRate);
    69376937        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    6938         hrc = pCaptureScreenSettings->COMGETTER(VideoFPS)((ULONG *)&CaptureScreenSettings.Video.ulFPS);
     6938        hrc = pRecordScreenSettings->COMGETTER(VideoFPS)((ULONG *)&RecordScreenSettings.Video.ulFPS);
    69396939        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    69406940
    6941         Settings.mapScreens[i] = CaptureScreenSettings;
     6941        Settings.mapScreens[i] = RecordScreenSettings;
    69426942    }
    69436943
     
    69716971    }
    69726972
    6973     settings::CaptureSettings Settings;
     6973    settings::RecordSettings Settings;
    69746974    rc = i_videoRecGetSettings(Settings);
    69756975    if (RT_SUCCESS(rc))
     
    70437043            mDisplay->i_videoRecScreenChanged(uScreen);
    70447044
    7045         ComPtr<ICaptureSettings> pCaptureSettings;
    7046         HRESULT hrc = mMachine->COMGETTER(CaptureSettings)(pCaptureSettings.asOutParam());
     7045        ComPtr<IRecordSettings> pRecordSettings;
     7046        HRESULT hrc = mMachine->COMGETTER(RecordSettings)(pRecordSettings.asOutParam());
    70477047        ComAssertComRC(hrc);
    7048         hrc = pCaptureSettings->COMSETTER(Enabled)(false);
     7048        hrc = pRecordSettings->COMSETTER(Enabled)(false);
    70497049        ComAssertComRC(hrc);
    70507050
     
    1014610146
    1014710147#ifdef VBOX_WITH_VIDEOREC
    10148         ComPtr<ICaptureSettings> CaptureSettings;
    10149         rc = pConsole->mMachine->COMGETTER(CaptureSettings)(CaptureSettings.asOutParam());
     10148        ComPtr<IRecordSettings> RecordSettings;
     10149        rc = pConsole->mMachine->COMGETTER(RecordSettings)(RecordSettings.asOutParam());
    1015010150        AssertComRCReturnVoid(rc);
    1015110151
    1015210152        BOOL fCaptureEnabled;
    10153         rc = CaptureSettings->COMGETTER(Enabled)(&fCaptureEnabled);
     10153        rc = RecordSettings->COMGETTER(Enabled)(&fCaptureEnabled);
    1015410154        AssertComRCReturnVoid(rc);
    1015510155
     
    1015910159            if (RT_SUCCESS(vrc2))
    1016010160            {
    10161                 fireCaptureChangedEvent(pConsole->mEventSource);
     10161                fireRecordChangedEvent(pConsole->mEventSource);
    1016210162            }
    1016310163            else
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r75251 r75341  
    33933393    if (   pCtx
    33943394        && pCtx->IsStarted()
    3395         && pCtx->IsFeatureEnabled(CaptureFeature_Video))
     3395        && pCtx->IsFeatureEnabled(RecordFeature_Video))
    33963396    {
    33973397        do {
     
    38593859    if (   pCtx
    38603860        && pCtx->IsStarted()
    3861         && pCtx->IsFeatureEnabled(CaptureFeature_Video))
     3861        && pCtx->IsFeatureEnabled(RecordFeature_Video))
    38623862    {
    38633863        int rc2 = pCtx->SendVideoFrame(uScreen, x, y,
  • trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp

    r75254 r75341  
    10881088 * @param   Settings        Capturing configuration to apply.
    10891089 */
    1090 int AudioVideoRec::applyConfiguration(const settings::CaptureSettings &Settings)
     1090int AudioVideoRec::applyConfiguration(const settings::RecordSettings &Settings)
    10911091{
    10921092    /** @todo Do some validation here. */
     
    11081108    /** @todo For now we're using the configuration of the first screen here audio-wise. */
    11091109    Assert(mVideoRecCfg.mapScreens.size() >= 1);
    1110     const settings::CaptureScreenSettings &Screen0Settings = mVideoRecCfg.mapScreens[0];
     1110    const settings::RecordScreenSettings &Screen0Settings = mVideoRecCfg.mapScreens[0];
    11111111
    11121112    rc = CFGMR3InsertInteger(pLunCfg, "ContainerType", (uint64_t)Screen0Settings.enmDest);
    11131113    AssertRCReturn(rc, rc);
    1114     if (Screen0Settings.enmDest == CaptureDestination_File)
     1114    if (Screen0Settings.enmDest == RecordDestination_File)
    11151115    {
    11161116        rc = CFGMR3InsertString(pLunCfg, "ContainerFileName", Utf8Str(Screen0Settings.File.strName).c_str());
  • trunk/src/VBox/Main/src-client/SessionImpl.cpp

    r75251 r75341  
    725725}
    726726
    727 HRESULT Session::onCaptureChange()
    728 {
    729     LogFlowThisFunc(("\n"));
    730 
    731     AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    732     AssertReturn(mState == SessionState_Locked, VBOX_E_INVALID_VM_STATE);
    733     AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE);
    734 #ifndef VBOX_COM_INPROC_API_CLIENT
    735     AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE);
    736 
    737     return mConsole->i_onCaptureChange();
     727HRESULT Session::onRecordChange()
     728{
     729    LogFlowThisFunc(("\n"));
     730
     731    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     732    AssertReturn(mState == SessionState_Locked, VBOX_E_INVALID_VM_STATE);
     733    AssertReturn(mType == SessionType_WriteLock, VBOX_E_INVALID_OBJECT_STATE);
     734#ifndef VBOX_COM_INPROC_API_CLIENT
     735    AssertReturn(mConsole, VBOX_E_INVALID_OBJECT_STATE);
     736
     737    return mConsole->i_onRecordChange();
    738738#else
    739739    return S_OK;
  • trunk/src/VBox/Main/src-client/VideoRec.cpp

    r75313 r75341  
    9494    , enmState(VIDEORECSTS_UNINITIALIZED) { }
    9595
    96 CaptureContext::CaptureContext(Console *a_pConsole, const settings::CaptureSettings &a_Settings)
     96CaptureContext::CaptureContext(Console *a_pConsole, const settings::RecordSettings &a_Settings)
    9797    : pConsole(a_pConsole)
    9898    , enmState(VIDEORECSTS_UNINITIALIZED)
     
    177177 * @param   a_Settings          Capture settings to use for context creation.
    178178 */
    179 int CaptureContext::createInternal(const settings::CaptureSettings &a_Settings)
     179int CaptureContext::createInternal(const settings::RecordSettings &a_Settings)
    180180{
    181181    int rc = RTCritSectInit(&this->CritSect);
     
    183183        return rc;
    184184
    185     settings::CaptureScreenMap::const_iterator itScreen = a_Settings.mapScreens.begin();
     185    settings::RecordScreenMap::const_iterator itScreen = a_Settings.mapScreens.begin();
    186186    while (itScreen != a_Settings.mapScreens.end())
    187187    {
     
    318318}
    319319
    320 const settings::CaptureSettings &CaptureContext::GetConfig(void) const
     320const settings::RecordSettings &CaptureContext::GetConfig(void) const
    321321{
    322322    return this->Settings;
     
    355355}
    356356
    357 int CaptureContext::Create(const settings::CaptureSettings &a_Settings)
     357int CaptureContext::Create(const settings::RecordSettings &a_Settings)
    358358{
    359359    return createInternal(a_Settings);
     
    375375}
    376376
    377 bool CaptureContext::IsFeatureEnabled(CaptureFeature_T enmFeature) const
     377bool CaptureContext::IsFeatureEnabled(RecordFeature_T enmFeature) const
    378378{
    379379    VideoRecStreams::const_iterator itStream = this->vecStreams.begin();
  • trunk/src/VBox/Main/src-client/VideoRecStream.cpp

    r75313 r75341  
    5151}
    5252
    53 CaptureStream::CaptureStream(CaptureContext *a_pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings)
     53CaptureStream::CaptureStream(CaptureContext *a_pCtx, uint32_t uScreen, const settings::RecordScreenSettings &Settings)
    5454    : enmState(RECORDINGSTREAMSTATE_UNINITIALIZED)
    5555    , tsStartMs(0)
     
    7474 * @returns IPRT status code.
    7575 */
    76 int CaptureStream::open(const settings::CaptureScreenSettings &Settings)
     76int CaptureStream::open(const settings::RecordScreenSettings &Settings)
    7777{
    7878    /* Sanity. */
    79     Assert(Settings.enmDest != CaptureDestination_None);
     79    Assert(Settings.enmDest != RecordDestination_None);
    8080
    8181    int rc;
     
    8383    switch (Settings.enmDest)
    8484    {
    85         case CaptureDestination_File:
     85        case RecordDestination_File:
    8686        {
    8787            Assert(Settings.File.strName.isNotEmpty());
     
    209209            if (value.compare("false", Utf8Str::CaseInsensitive) == 0)
    210210            {
    211                 this->ScreenSettings.featureMap[CaptureFeature_Video] = false;
     211                this->ScreenSettings.featureMap[RecordFeature_Video] = false;
    212212#ifdef VBOX_WITH_AUDIO_VIDEOREC
    213213                LogRel(("VideoRec: Only audio will be recorded\n"));
     
    220220            if (value.compare("true", Utf8Str::CaseInsensitive) == 0)
    221221            {
    222                 this->ScreenSettings.featureMap[CaptureFeature_Audio] = true;
     222                this->ScreenSettings.featureMap[RecordFeature_Audio] = true;
    223223            }
    224224            else
     
    255255}
    256256
    257 const settings::CaptureScreenSettings &CaptureStream::GetConfig(void) const
     257const settings::RecordScreenSettings &CaptureStream::GetConfig(void) const
    258258{
    259259    return this->ScreenSettings;
     
    277277    }
    278278
    279     if (this->ScreenSettings.enmDest == CaptureDestination_File)
     279    if (this->ScreenSettings.enmDest == RecordDestination_File)
    280280    {
    281281
     
    661661 * @param   Settings            Capturing configuration to use for initialization.
    662662 */
    663 int CaptureStream::Init(CaptureContext *a_pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings)
     663int CaptureStream::Init(CaptureContext *a_pCtx, uint32_t uScreen, const settings::RecordScreenSettings &Settings)
    664664{
    665665    return initInternal(a_pCtx, uScreen, Settings);
     
    674674 * @param   Settings            Capturing configuration to use for initialization.
    675675 */
    676 int CaptureStream::initInternal(CaptureContext *a_pCtx, uint32_t uScreen, const settings::CaptureScreenSettings &Settings)
     676int CaptureStream::initInternal(CaptureContext *a_pCtx, uint32_t uScreen, const settings::RecordScreenSettings &Settings)
    677677{
    678678    int rc = parseOptionsString(Settings.strOptions);
     
    688688        return rc;
    689689
    690     const bool fVideoEnabled = Settings.isFeatureEnabled(CaptureFeature_Video);
    691     const bool fAudioEnabled = Settings.isFeatureEnabled(CaptureFeature_Audio);
     690    const bool fVideoEnabled = Settings.isFeatureEnabled(RecordFeature_Video);
     691    const bool fAudioEnabled = Settings.isFeatureEnabled(RecordFeature_Audio);
    692692
    693693    if (fVideoEnabled)
     
    699699    switch (this->ScreenSettings.enmDest)
    700700    {
    701         case CaptureDestination_File:
     701        case RecordDestination_File:
    702702        {
    703703            const char *pszFile = this->ScreenSettings.File.strName.c_str();
     
    706706            rc = File.pWEBM->OpenEx(pszFile, &this->File.hFile,
    707707#ifdef VBOX_WITH_AUDIO_VIDEOREC
    708                                       Settings.isFeatureEnabled(CaptureFeature_Audio)
     708                                      Settings.isFeatureEnabled(RecordFeature_Audio)
    709709                                    ? WebMWriter::AudioCodec_Opus : WebMWriter::AudioCodec_None,
    710710#else
    711711                                      WebMWriter::AudioCodec_None,
    712712#endif
    713                                       Settings.isFeatureEnabled(CaptureFeature_Video)
     713                                      Settings.isFeatureEnabled(RecordFeature_Video)
    714714                                    ? WebMWriter::VideoCodec_VP8 : WebMWriter::VideoCodec_None);
    715715            if (RT_FAILURE(rc))
     
    814814        switch (this->ScreenSettings.enmDest)
    815815        {
    816             case CaptureDestination_File:
     816            case RecordDestination_File:
    817817            {
    818818                if (this->File.pWEBM)
     
    839839    switch (this->ScreenSettings.enmDest)
    840840    {
    841         case CaptureDestination_File:
     841        case RecordDestination_File:
    842842        {
    843843            if (RTFileIsValid(this->File.hFile))
     
    891891        return rc;
    892892
    893     if (this->ScreenSettings.isFeatureEnabled(CaptureFeature_Video))
     893    if (this->ScreenSettings.isFeatureEnabled(RecordFeature_Video))
    894894    {
    895895        int rc2 = unitVideo();
     
    10251025{
    10261026#ifdef VBOX_WITH_AUDIO_VIDEOREC
    1027     if (this->ScreenSettings.isFeatureEnabled(CaptureFeature_Audio))
     1027    if (this->ScreenSettings.isFeatureEnabled(RecordFeature_Audio))
    10281028    {
    10291029        /* Sanity. */
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