Index: /trunk/include/VBox/settings.h
===================================================================
--- /trunk/include/VBox/settings.h	(revision 35145)
+++ /trunk/include/VBox/settings.h	(revision 35146)
@@ -283,7 +283,5 @@
           ulAuthTimeout(5000),
           fAllowMultiConnection(false),
-          fReuseSingleConnection(false),
-          fVideoChannel(false),
-          ulVideoChannelQuality(75)
+          fReuseSingleConnection(false)
     {}
 
@@ -295,7 +293,5 @@
     com::Utf8Str    strAuthLibrary;
     bool            fAllowMultiConnection,
-                    fReuseSingleConnection,
-                    fVideoChannel;
-    uint32_t        ulVideoChannelQuality;
+                    fReuseSingleConnection;
     com::Utf8Str    strVrdeExtPack;
     StringsMap      mapProperties;
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 35145)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp	(revision 35146)
@@ -653,7 +653,7 @@
             if (vrdeServer)
             {
-                unsigned n = parseNum(a->argv[2], 100, "VRDE video redirection quality in percent");
-
-                CHECK_ERROR(vrdeServer, COMSETTER(VideoChannelQuality)(n));
+                Bstr value = a->argv[2];
+
+                CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("VideoChannel/Quality").raw(), value.raw()));
             }
         }
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 35145)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp	(revision 35146)
@@ -1406,8 +1406,10 @@
             BOOL fReuseCon;
             vrdeServer->COMGETTER(ReuseSingleConnection)(&fReuseCon);
-            BOOL fVideoChannel;
-            vrdeServer->COMGETTER(VideoChannel)(&fVideoChannel);
-            ULONG ulVideoChannelQuality;
-            vrdeServer->COMGETTER(VideoChannelQuality)(&ulVideoChannelQuality);
+            Bstr videoChannel;
+            vrdeServer->GetVRDEProperty(Bstr("VideoChannel/Enabled").raw(), videoChannel.asOutParam());
+            BOOL fVideoChannel =    (videoChannel.compare(Bstr("true"), Bstr::CaseInsensitive)== 0)
+                                 || (videoChannel == "1");
+            Bstr videoChannelQuality;
+            vrdeServer->GetVRDEProperty(Bstr("VideoChannel/Quality").raw(), videoChannelQuality.asOutParam());
             AuthType_T authType;
             const char *strAuthType;
@@ -1455,5 +1457,5 @@
                 RTPrintf("vrdevideochannel=\"%s\"\n", fVideoChannel ? "on" : "off");
                 if (fVideoChannel)
-                    RTPrintf("vrdevideochannelquality=\"%d\"\n", ulVideoChannelQuality);
+                    RTPrintf("vrdevideochannelquality=\"%lS\"\n", videoChannelQuality.raw());
             }
             else
@@ -1465,5 +1467,5 @@
                    RTPrintf("VRDE port:       %d\n", currentPort);
                 if (fVideoChannel)
-                    RTPrintf("Video redirection: enabled (Quality %d)\n", ulVideoChannelQuality);
+                    RTPrintf("Video redirection: enabled (Quality %lS)\n", videoChannelQuality.raw());
                 else
                     RTPrintf("Video redirection: disabled\n");
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 35145)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp	(revision 35146)
@@ -264,5 +264,5 @@
     { "--vrdpreusecon",             MODIFYVM_VRDPREUSECON,              RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
     { "--vrdpvideochannel",         MODIFYVM_VRDPVIDEOCHANNEL,          RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
-    { "--vrdpvideochannelquality",  MODIFYVM_VRDPVIDEOCHANNELQUALITY,   RTGETOPT_REQ_UINT32 },     /* deprecated */
+    { "--vrdpvideochannelquality",  MODIFYVM_VRDPVIDEOCHANNELQUALITY,   RTGETOPT_REQ_STRING },     /* deprecated */
     { "--vrdp",                     MODIFYVM_VRDP,                      RTGETOPT_REQ_BOOL_ONOFF }, /* deprecated */
     { "--vrdeproperty",             MODIFYVM_VRDEPROPERTY,              RTGETOPT_REQ_STRING },
@@ -274,5 +274,5 @@
     { "--vrdereusecon",             MODIFYVM_VRDEREUSECON,              RTGETOPT_REQ_BOOL_ONOFF },
     { "--vrdevideochannel",         MODIFYVM_VRDEVIDEOCHANNEL,          RTGETOPT_REQ_BOOL_ONOFF },
-    { "--vrdevideochannelquality",  MODIFYVM_VRDEVIDEOCHANNELQUALITY,   RTGETOPT_REQ_UINT32 },
+    { "--vrdevideochannelquality",  MODIFYVM_VRDEVIDEOCHANNELQUALITY,   RTGETOPT_REQ_STRING },
     { "--vrdeextpack",              MODIFYVM_VRDE_EXTPACK,              RTGETOPT_REQ_STRING },
     { "--vrde",                     MODIFYVM_VRDE,                      RTGETOPT_REQ_BOOL_ONOFF },
@@ -1988,5 +1988,6 @@
                 ASSERT(vrdeServer);
 
-                CHECK_ERROR(vrdeServer, COMSETTER(VideoChannel)(ValueUnion.f));
+                CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("VideoChannel/Enabled").raw(),
+                                                        ValueUnion.f? Bstr("true").raw():  Bstr("false").raw()));
                 break;
             }
@@ -2000,5 +2001,6 @@
                 ASSERT(vrdeServer);
 
-                CHECK_ERROR(vrdeServer, COMSETTER(VideoChannelQuality)(ValueUnion.u32));
+                CHECK_ERROR(vrdeServer, SetVRDEProperty(Bstr("VideoChannel/Quality").raw(),
+                                                        Bstr(ValueUnion.psz).raw()));
                 break;
             }
Index: /trunk/src/VBox/Main/ConsoleVRDPServer.cpp
===================================================================
--- /trunk/src/VBox/Main/ConsoleVRDPServer.cpp	(revision 35145)
+++ /trunk/src/VBox/Main/ConsoleVRDPServer.cpp	(revision 35146)
@@ -650,7 +650,16 @@
         case VRDE_QP_VIDEO_CHANNEL:
         {
-            BOOL fVideoEnabled = FALSE;
-
-            server->mConsole->getVRDEServer()->COMGETTER(VideoChannel)(&fVideoEnabled);
+            com::Bstr bstr;
+            HRESULT hrc = server->mConsole->getVRDEServer()->GetVRDEProperty(Bstr("VideoChannel/Enabled").raw(), bstr.asOutParam());
+
+            if (hrc != S_OK)
+            {
+                bstr = "";
+            }
+
+            com::Utf8Str value = bstr;
+
+            BOOL fVideoEnabled =    RTStrICmp(value.c_str(), "true") == 0
+                                 || RTStrICmp(value.c_str(), "1") == 0;
 
             if (cbBuffer >= sizeof(uint32_t))
@@ -669,7 +678,15 @@
         case VRDE_QP_VIDEO_CHANNEL_QUALITY:
         {
-            ULONG ulQuality = 0;
-
-            server->mConsole->getVRDEServer()->COMGETTER(VideoChannelQuality)(&ulQuality);
+            com::Bstr bstr;
+            HRESULT hrc = server->mConsole->getVRDEServer()->GetVRDEProperty(Bstr("VideoChannel/Quality").raw(), bstr.asOutParam());
+
+            if (hrc != S_OK)
+            {
+                bstr = "";
+            }
+
+            com::Utf8Str value = bstr;
+
+            ULONG ulQuality = RTStrToUInt32(value.c_str()); /* This returns 0 on invalid string which is ok. */
 
             if (cbBuffer >= sizeof(uint32_t))
Index: /trunk/src/VBox/Main/VRDEServerImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/VRDEServerImpl.cpp	(revision 35145)
+++ /trunk/src/VBox/Main/VRDEServerImpl.cpp	(revision 35146)
@@ -93,6 +93,4 @@
     mData->mAllowMultiConnection = FALSE;
     mData->mReuseSingleConnection = FALSE;
-    mData->mVideoChannel         = FALSE;
-    mData->mVideoChannelQuality  = 75;
     mData->mVrdeExtPack.setNull();
 
@@ -212,6 +210,4 @@
     mData->mAllowMultiConnection = data.fAllowMultiConnection;
     mData->mReuseSingleConnection = data.fReuseSingleConnection;
-    mData->mVideoChannel = data.fVideoChannel;
-    mData->mVideoChannelQuality = data.ulVideoChannelQuality;
     mData->mVrdeExtPack = data.strVrdeExtPack;
     mData->mProperties = data.mapProperties;
@@ -240,6 +236,4 @@
     data.fAllowMultiConnection = !!mData->mAllowMultiConnection;
     data.fReuseSingleConnection = !!mData->mReuseSingleConnection;
-    data.fVideoChannel = !!mData->mVideoChannel;
-    data.ulVideoChannelQuality = mData->mVideoChannelQuality;
     data.strVrdeExtPack = mData->mVrdeExtPack;
     data.mapProperties = mData->mProperties;
@@ -870,96 +864,4 @@
 
         mParent->onVRDEServerChange(/* aRestart */ TRUE); // @todo needs a restart?
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP VRDEServer::COMGETTER(VideoChannel) (
-    BOOL *aVideoChannel)
-{
-    CheckComArgOutPointerValid(aVideoChannel);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    *aVideoChannel = mData->mVideoChannel;
-
-    return S_OK;
-}
-
-STDMETHODIMP VRDEServer::COMSETTER(VideoChannel) (
-    BOOL aVideoChannel)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent);
-    if (FAILED(adep.rc())) return adep.rc();
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    if (mData->mVideoChannel != aVideoChannel)
-    {
-        mData.backup();
-        mData->mVideoChannel = aVideoChannel;
-
-        /* leave the lock before informing callbacks */
-        alock.release();
-
-        AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, needs no locking
-        mParent->setModified(Machine::IsModified_VRDEServer);
-        mlock.release();
-
-        mParent->onVRDEServerChange(/* aRestart */ TRUE);
-    }
-
-    return S_OK;
-}
-
-STDMETHODIMP VRDEServer::COMGETTER(VideoChannelQuality) (
-    ULONG *aVideoChannelQuality)
-{
-    CheckComArgOutPointerValid(aVideoChannelQuality);
-
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    *aVideoChannelQuality = mData->mVideoChannelQuality;
-
-    return S_OK;
-}
-
-STDMETHODIMP VRDEServer::COMSETTER(VideoChannelQuality) (
-    ULONG aVideoChannelQuality)
-{
-    AutoCaller autoCaller(this);
-    if (FAILED(autoCaller.rc())) return autoCaller.rc();
-
-    /* the machine needs to be mutable */
-    AutoMutableStateDependency adep(mParent);
-    if (FAILED(adep.rc())) return adep.rc();
-
-    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
-
-    aVideoChannelQuality = RT_CLAMP(aVideoChannelQuality, 10, 100);
-
-    if (mData->mVideoChannelQuality != aVideoChannelQuality)
-    {
-        mData.backup();
-        mData->mVideoChannelQuality = aVideoChannelQuality;
-
-        /* leave the lock before informing callbacks */
-        alock.release();
-
-        AutoWriteLock mlock(mParent COMMA_LOCKVAL_SRC_POS);       // mParent is const, needs no locking
-        mParent->setModified(Machine::IsModified_VRDEServer);
-        mlock.release();
-
-        mParent->onVRDEServerChange(/* aRestart */ FALSE);
     }
 
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 35145)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 35146)
@@ -12702,5 +12702,5 @@
   <interface
     name="IVRDEServer" extends="$unknown"
-    uuid="b5bd49dc-26ef-42b4-ae7a-0c4b734a7653"
+    uuid="be24e0db-e1d6-4d58-b85b-21053d1511b4"
     wsmap="managed"
     >
@@ -12729,16 +12729,4 @@
         must be established by the VRDE server, when a new client connects in single
         connection mode.
-      </desc>
-    </attribute>
-
-    <attribute name="videoChannel" type="boolean">
-      <desc>
-        Flag whether video redirectiron channel is enabled.
-      </desc>
-    </attribute>
-
-    <attribute name="videoChannelQuality" type="unsigned long">
-      <desc>
-        Image quality in percents.
       </desc>
     </attribute>
Index: /trunk/src/VBox/Main/include/VRDEServerImpl.h
===================================================================
--- /trunk/src/VBox/Main/include/VRDEServerImpl.h	(revision 35145)
+++ /trunk/src/VBox/Main/include/VRDEServerImpl.h	(revision 35146)
@@ -40,6 +40,4 @@
         BOOL mAllowMultiConnection;
         BOOL mReuseSingleConnection;
-        BOOL mVideoChannel;
-        ULONG mVideoChannelQuality;
         Utf8Str mVrdeExtPack;
         settings::StringsMap mProperties;
@@ -80,8 +78,4 @@
     STDMETHOD(COMGETTER(ReuseSingleConnection)) (BOOL *aReuseSingleConnection);
     STDMETHOD(COMSETTER(ReuseSingleConnection)) (BOOL aReuseSingleConnection);
-    STDMETHOD(COMGETTER(VideoChannel)) (BOOL *aVideoChannel);
-    STDMETHOD(COMSETTER(VideoChannel)) (BOOL aVideoChannel);
-    STDMETHOD(COMGETTER(VideoChannelQuality)) (ULONG *aVideoChannelQuality);
-    STDMETHOD(COMSETTER(VideoChannelQuality)) (ULONG aVideoChannelQuality);
     STDMETHOD(COMGETTER(VRDEExtPack))(BSTR *aExtPack);
     STDMETHOD(COMSETTER(VRDEExtPack))(IN_BSTR aExtPack);
Index: /trunk/src/VBox/Main/xml/Settings.cpp
===================================================================
--- /trunk/src/VBox/Main/xml/Settings.cpp	(revision 35145)
+++ /trunk/src/VBox/Main/xml/Settings.cpp	(revision 35146)
@@ -1401,6 +1401,4 @@
                   && (fAllowMultiConnection     == v.fAllowMultiConnection)
                   && (fReuseSingleConnection    == v.fReuseSingleConnection)
-                  && (fVideoChannel             == v.fVideoChannel)
-                  && (ulVideoChannelQuality     == v.ulVideoChannelQuality)
                   && (strVrdeExtPack            == v.strVrdeExtPack)
                   && (mapProperties             == v.mapProperties)
@@ -2493,10 +2491,23 @@
             pelmHwChild->getAttributeValue("reuseSingleConnection", hw.vrdeSettings.fReuseSingleConnection);
 
+            /* 3.2 and 4.0 betas, 4.0 has this information in VRDEProperties. */
             const xml::ElementNode *pelmVideoChannel;
             if ((pelmVideoChannel = pelmHwChild->findChildElement("VideoChannel")))
             {
-                pelmVideoChannel->getAttributeValue("enabled", hw.vrdeSettings.fVideoChannel);
-                pelmVideoChannel->getAttributeValue("quality", hw.vrdeSettings.ulVideoChannelQuality);
-                hw.vrdeSettings.ulVideoChannelQuality = RT_CLAMP(hw.vrdeSettings.ulVideoChannelQuality, 10, 100);
+                bool fVideoChannel = false;
+                pelmVideoChannel->getAttributeValue("enabled", fVideoChannel);
+                hw.vrdeSettings.mapProperties["VideoChannel/Enabled"] = fVideoChannel? "true": "false";
+
+                uint32_t ulVideoChannelQuality = 75;
+                pelmVideoChannel->getAttributeValue("quality", ulVideoChannelQuality);
+                ulVideoChannelQuality = RT_CLAMP(ulVideoChannelQuality, 10, 100);
+                char *pszBuffer = NULL;
+                if (RTStrAPrintf(&pszBuffer, "%d", ulVideoChannelQuality) >= 0)
+                {
+                    hw.vrdeSettings.mapProperties["VideoChannel/Quality"] = pszBuffer;
+                    RTStrFree(pszBuffer);
+                }
+                else
+                    hw.vrdeSettings.mapProperties["VideoChannel/Quality"] = "75";
             }
             pelmHwChild->getAttributeValue("VRDEExtPack", hw.vrdeSettings.strVrdeExtPack);
@@ -3480,9 +3491,26 @@
         pelmVRDE->setAttribute("reuseSingleConnection", hw.vrdeSettings.fReuseSingleConnection);
 
-    if (m->sv >= SettingsVersion_v1_10)
+    if (m->sv == SettingsVersion_v1_10)
     {
         xml::ElementNode *pelmVideoChannel = pelmVRDE->createChild("VideoChannel");
-        pelmVideoChannel->setAttribute("enabled", hw.vrdeSettings.fVideoChannel);
-        pelmVideoChannel->setAttribute("quality", hw.vrdeSettings.ulVideoChannelQuality);
+
+        /* In 4.0 videochannel settings were replaced with properties, so look at properties. */
+        Utf8Str str;
+        StringsMap::const_iterator it = hw.vrdeSettings.mapProperties.find("VideoChannel/Enabled");
+        if (it != hw.vrdeSettings.mapProperties.end())
+            str = it->second;
+        bool fVideoChannel =    RTStrICmp(str.c_str(), "true") == 0
+                             || RTStrCmp(str.c_str(), "1") == 0;
+        pelmVideoChannel->setAttribute("enabled", fVideoChannel);
+
+        it = hw.vrdeSettings.mapProperties.find("VideoChannel/Quality");
+        if (it != hw.vrdeSettings.mapProperties.end())
+            str = it->second;
+        uint32_t ulVideoChannelQuality = RTStrToUInt32(str.c_str()); /* This returns 0 on invalid string which is ok. */
+        if (ulVideoChannelQuality == 0)
+            ulVideoChannelQuality = 75;
+        else
+            ulVideoChannelQuality = RT_CLAMP(ulVideoChannelQuality, 10, 100);
+        pelmVideoChannel->setAttribute("quality", ulVideoChannelQuality);
     }
     if (m->sv >= SettingsVersion_v1_11)
@@ -4408,8 +4436,8 @@
     }
 
-    if (m->sv < SettingsVersion_v1_11)
+    if (m->sv < SettingsVersion_v1_10)
     {
         /* If the properties contain elements other than "TCP/Ports" and "TCP/Address",
-         * then increase the version to VBox 4.0.
+         * then increase the version to at least VBox 3.2, which can have video channel properties.
          */
         unsigned cOldProperties = 0;
@@ -4419,4 +4447,28 @@
             cOldProperties++;
         it = hardwareMachine.vrdeSettings.mapProperties.find("TCP/Address");
+        if (it != hardwareMachine.vrdeSettings.mapProperties.end())
+            cOldProperties++;
+
+        if (hardwareMachine.vrdeSettings.mapProperties.size() != cOldProperties)
+            m->sv = SettingsVersion_v1_10;
+    }
+
+    if (m->sv < SettingsVersion_v1_11)
+    {
+        /* If the properties contain elements other than "TCP/Ports", "TCP/Address",
+         * "VideoChannel/Enabled" and "VideoChannel/Quality" then increase the version to VBox 4.0.
+         */
+        unsigned cOldProperties = 0;
+
+        StringsMap::const_iterator it = hardwareMachine.vrdeSettings.mapProperties.find("TCP/Ports");
+        if (it != hardwareMachine.vrdeSettings.mapProperties.end())
+            cOldProperties++;
+        it = hardwareMachine.vrdeSettings.mapProperties.find("TCP/Address");
+        if (it != hardwareMachine.vrdeSettings.mapProperties.end())
+            cOldProperties++;
+        it = hardwareMachine.vrdeSettings.mapProperties.find("VideoChannel/Enabled");
+        if (it != hardwareMachine.vrdeSettings.mapProperties.end())
+            cOldProperties++;
+        it = hardwareMachine.vrdeSettings.mapProperties.find("VideoChannel/Quality");
         if (it != hardwareMachine.vrdeSettings.mapProperties.end())
             cOldProperties++;
@@ -4557,6 +4609,4 @@
         if (   (hardwareMachine.ioSettings.fIoCacheEnabled != true)
             || (hardwareMachine.ioSettings.ulIoCacheSize != 5)
-                // and remote desktop video redirection channel
-            || (hardwareMachine.vrdeSettings.fVideoChannel)
                 // and page fusion
             || (hardwareMachine.fPageFusionEnabled)
