Index: /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 75251)
+++ /trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp	(revision 75252)
@@ -5,5 +5,5 @@
 
 /*
- * Copyright (C) 2006-2017 Oracle Corporation
+ * Copyright (C) 2006-2018 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -627,5 +627,5 @@
     unsigned fPaused = 0;
 #ifdef VBOX_WITH_VIDEOREC
-    bool fVideoRec = 0;
+    bool fVideoRec = false;
     unsigned long ulFrameWidth = 800;
     unsigned long ulFrameHeight = 600;
@@ -961,9 +961,20 @@
         if (fVideoRec)
         {
-            CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureFile)(Bstr(szMpegFile).raw()));
-            CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureWidth)(ulFrameWidth));
-            CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureHeight)(ulFrameHeight));
-            CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureRate)(ulBitRate));
-            CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureEnabled)(TRUE));
+            ComPtr<ICaptureSettings> captureSettings;
+            CHECK_ERROR_BREAK(machine, COMGETTER(CaptureSettings)(captureSettings.asOutParam()));
+            CHECK_ERROR_BREAK(captureSettings, COMSETTER(Enabled)(TRUE));
+
+            SafeIfaceArray <ICaptureScreenSettings> saCaptureScreenScreens;
+            CHECK_ERROR_BREAK(captureSettings, COMGETTER(Screens)(ComSafeArrayAsOutParam(saCaptureScreenScreens)));
+
+            /* Note: For now all screens have the same configuration. */
+            for (size_t i = 0; i < saCaptureScreenScreens.size(); ++i)
+            {
+                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(Enabled)(TRUE));
+                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(FileName)(Bstr(szMpegFile).raw()));
+                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(VideoWidth)(ulFrameWidth));
+                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(VideoHeight)(ulFrameHeight));
+                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(VideoRate)(ulBitRate));
+            }
         }
 #endif /* defined(VBOX_WITH_VIDEOREC) */
@@ -1220,7 +1231,11 @@
         {
             if (!machine.isNull())
-                machine->COMSETTER(VideoCaptureEnabled)(FALSE);
-        }
-#endif /* defined(VBOX_WITH_VIDEOREC) */
+            {
+                ComPtr<ICaptureSettings> captureSettings;
+                CHECK_ERROR_BREAK(machine, COMGETTER(CaptureSettings)(captureSettings.asOutParam()));
+                CHECK_ERROR_BREAK(captureSettings, COMSETTER(Enabled)(FALSE));
+            }
+        }
+#endif /* VBOX_WITH_VIDEOREC */
 
         /* we don't have to disable VRDE here because we don't save the settings of the VM */
Index: /trunk/src/VBox/Main/idl/VirtualBox.xidl
===================================================================
--- /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 75251)
+++ /trunk/src/VBox/Main/idl/VirtualBox.xidl	(revision 75252)
@@ -4774,5 +4774,5 @@
     <desc>
       The ICaptureScreenSettings interface represents capturing settings of a
-      singke virtual screen. This is used only in the <link to="ICaptureSettings" />
+      single virtual screen. This is used only in the <link to="ICaptureSettings" />
       interface.
     </desc>
@@ -4901,5 +4901,5 @@
     <desc>
       The ICaptureSettings interface represents capturing settings of the virtual
-      machine. This is used only in the <link to="IMachine::CaptureSettings" />
+      machine. This is used only in the <link to="IMachine::captureSettings" />
       attribute.
     </desc>
