VirtualBox

Changeset 28802 in vbox


Ignore:
Timestamp:
Apr 27, 2010 9:23:16 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
60695
Message:

VRDP video channel configuration API.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/settings.h

    r28800 r28802  
    265265          ulAuthTimeout(5000),
    266266          fAllowMultiConnection(false),
    267           fReuseSingleConnection(false)
     267          fReuseSingleConnection(false),
     268          fVideoChannel(false),
     269          ulVideoChannelQuality(75)
    268270    {}
    269271
     
    276278    uint32_t        ulAuthTimeout;
    277279    bool            fAllowMultiConnection,
    278                     fReuseSingleConnection;
     280                    fReuseSingleConnection,
     281                    fVideoChannel;
     282    uint32_t        ulVideoChannelQuality;
    279283};
    280284
  • trunk/include/VBox/vrdpapi.h

    r28800 r28802  
    955955#define VRDP_QP_NUMBER_MONITORS   (3)
    956956#define VRDP_QP_NETWORK_PORT_RANGE (4)
     957#ifdef VBOX_WITH_VRDP_VIDEO_CHANNEL
     958#define VRDP_QP_VIDEO_CHANNEL         (5)
     959#define VRDP_QP_VIDEO_CHANNEL_QUALITY (6)
     960#endif /* VBOX_WITH_VRDP_VIDEO_CHANNEL */
    957961
    958962#define VRDP_SP_BASE 0x1000
  • trunk/src/VBox/Main/ConsoleVRDPServer.cpp

    r28800 r28802  
    756756            *pcbOut = (uint32_t)cbPortRange;
    757757        } break;
     758
     759#ifdef VBOX_WITH_VRDP_VIDEO_CHANNEL
     760        case VRDP_QP_VIDEO_CHANNEL:
     761        {
     762            BOOL fVideoEnabled = FALSE;
     763
     764            server->mConsole->getVRDPServer()->COMGETTER(VideoChannel)(&fVideoEnabled);
     765
     766            if (cbBuffer >= sizeof(uint32_t))
     767            {
     768                *(uint32_t *)pvBuffer = (uint32_t)fVideoEnabled;
     769                rc = VINF_SUCCESS;
     770            }
     771            else
     772            {
     773                rc = VINF_BUFFER_OVERFLOW;
     774            }
     775
     776            *pcbOut = sizeof(uint32_t);
     777        } break;
     778
     779        case VRDP_QP_VIDEO_CHANNEL_QUALITY:
     780        {
     781            ULONG ulQuality = 0;
     782
     783            server->mConsole->getVRDPServer()->COMGETTER(VideoChannelQuality)(&ulQuality);
     784
     785            if (cbBuffer >= sizeof(uint32_t))
     786            {
     787                *(uint32_t *)pvBuffer = (uint32_t)ulQuality;
     788                rc = VINF_SUCCESS;
     789            }
     790            else
     791            {
     792                rc = VINF_BUFFER_OVERFLOW;
     793            }
     794
     795            *pcbOut = sizeof(uint32_t);
     796        } break;
     797#endif /* VBOX_WITH_VRDP_VIDEO_CHANNEL */
    758798
    759799        case VRDP_SP_NETWORK_BIND_PORT:
  • trunk/src/VBox/Main/Makefile.kmk

    r28800 r28802  
    547547        VBOX_COM_INPROC \
    548548        $(if $(VBOX_WITH_VRDP),VBOX_WITH_VRDP,) \
     549        $(if $(VBOX_WITH_VRDP_VIDEO_CHANNEL),VBOX_WITH_VRDP_VIDEO_CHANNEL,) \
    549550        $(if $(VBOX_WITH_HGCM),VBOX_WITH_HGCM,) \
    550551        $(if $(VBOX_MAIN_RELEASE_LOG),VBOX_MAIN_RELEASE_LOG LOG_ENABLED,) \
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r28800 r28802  
    1284212842    </attribute>
    1284312843
     12844    <attribute name="videoChannel" type="boolean">
     12845      <desc>
     12846        Flag whether RDP video channel is supported.
     12847      </desc>
     12848    </attribute>
     12849
     12850    <attribute name="videoChannelQuality" type="unsigned long">
     12851      <desc>
     12852        Image quality in percents.
     12853      </desc>
     12854    </attribute>
     12855
    1284412856  </interface>
    1284512857
  • trunk/src/VBox/Main/include/VRDPServerImpl.h

    r28800 r28802  
    4747        BOOL mAllowMultiConnection;
    4848        BOOL mReuseSingleConnection;
     49        BOOL mVideoChannel;
     50        ULONG mVideoChannelQuality;
    4951    };
    5052
     
    8789    STDMETHOD(COMGETTER(ReuseSingleConnection)) (BOOL *aReuseSingleConnection);
    8890    STDMETHOD(COMSETTER(ReuseSingleConnection)) (BOOL aReuseSingleConnection);
     91    STDMETHOD(COMGETTER(VideoChannel)) (BOOL *aVideoChannel);
     92    STDMETHOD(COMSETTER(VideoChannel)) (BOOL aVideoChannel);
     93    STDMETHOD(COMGETTER(VideoChannelQuality)) (ULONG *aVideoChannelQuality);
     94    STDMETHOD(COMSETTER(VideoChannelQuality)) (ULONG aVideoChannelQuality);
    8995
    9096    // IVRDPServer methods
  • trunk/src/VBox/Main/xml/Settings.cpp

    r28800 r28802  
    13171317                  && (fAllowMultiConnection     == v.fAllowMultiConnection)
    13181318                  && (fReuseSingleConnection    == v.fReuseSingleConnection)
     1319                  && (fVideoChannel             == v.fVideoChannel)
     1320                  && (ulVideoChannelQuality     == v.ulVideoChannelQuality)
    13191321                )
    13201322           );
     
    23112313            pelmHwChild->getAttributeValue("allowMultiConnection", hw.vrdpSettings.fAllowMultiConnection);
    23122314            pelmHwChild->getAttributeValue("reuseSingleConnection", hw.vrdpSettings.fReuseSingleConnection);
     2315
     2316            const xml::ElementNode *pelmVideoChannel;
     2317            if ((pelmVideoChannel = pelmHwChild->findChildElement("VideoChannel")))
     2318            {
     2319                pelmVideoChannel->getAttributeValue("enabled", hw.vrdpSettings.fVideoChannel);
     2320                pelmVideoChannel->getAttributeValue("quality", hw.vrdpSettings.ulVideoChannelQuality);
     2321                RT_CLAMP(hw.vrdpSettings.ulVideoChannelQuality, 10, 100);
     2322            }
    23132323        }
    23142324        else if (pelmHwChild->nameEquals("BIOS"))
     
    32473257        pelmVRDP->setAttribute("reuseSingleConnection", hw.vrdpSettings.fReuseSingleConnection);
    32483258
     3259    if (m->sv >= SettingsVersion_v1_10)
     3260    {
     3261        xml::ElementNode *pelmVideoChannel = pelmVRDP->createChild("VideoChannel");
     3262        pelmVideoChannel->setAttribute("enabled", hw.vrdpSettings.fVideoChannel);
     3263        pelmVideoChannel->setAttribute("quality", hw.vrdpSettings.ulVideoChannelQuality);
     3264    }
     3265
    32493266    xml::ElementNode *pelmBIOS = pelmHardware->createChild("BIOS");
    32503267    pelmBIOS->createChild("ACPI")->setAttribute("enabled", hw.biosSettings.fACPIEnabled);
     
    40614078            m->sv = SettingsVersion_v1_10;
    40624079    }
     4080
     4081    // VirtualBox 3.2 adds support for VRDP video channel
     4082    if (    m->sv < SettingsVersion_v1_10
     4083         && (    hardwareMachine.vrdpSettings.fVideoChannel
     4084            )
     4085       )
     4086        m->sv = SettingsVersion_v1_10;
     4087
    40634088}
    40644089
Note: See TracChangeset for help on using the changeset viewer.

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