Index: trunk/src/VBox/Main/src-client/VideoRec.cpp
===================================================================
--- trunk/src/VBox/Main/src-client/VideoRec.cpp	(revision 65414)
+++ trunk/src/VBox/Main/src-client/VideoRec.cpp	(revision 65415)
@@ -58,6 +58,6 @@
     /** Initialized, idle. */
     VIDEORECSTS_IDLE          = 1,
-    /** Currently in VideoRecCopyToIntBuf(), delay termination. */
-    VIDEORECSTS_COPYING       = 2,
+    /** Currently busy, delay termination. */
+    VIDEORECSTS_BUSY          = 2,
     /** Signal that we are terminating. */
     VIDEORECSTS_TERMINATING   = 3
@@ -110,6 +110,8 @@
     /** Container context. */
     WebMWriter         *pEBML;
+#ifdef VBOX_WITH_AUDIO_VIDEOREC
     /** Track number of audio stream. */
     uint8_t             uTrackAudio;
+#endif
     /** Track number of video stream. */
     uint8_t             uTrackVideo;
@@ -588,5 +590,5 @@
     }
 
-    if (enmState == VIDEORECSTS_COPYING)
+    if (enmState == VIDEORECSTS_BUSY)
     {
         int rc = RTSemEventWait(pCtx->TermEvent, RT_INDEFINITE_WAIT);
@@ -804,4 +806,7 @@
             return rc;
         }
+
+        LogRel(("VideoRec: Recording screen #%u with %ux%u @ %u kbps, %u fps to '%s'\n",
+                uScreen, uWidth, uHeight, uRate, uFPS, pszFile));
     }
 
@@ -809,5 +814,5 @@
     if (fHasAudioTrack)
     {
-        rc = pStream->pEBML->AddAudioTrack(48000, 2, 16, &pStream->uTrackAudio);
+        rc = pStream->pEBML->AddAudioTrack(48000, 2, 16, &pStream->uTrackAudio); /** @todo Make this configurable. */
         if (RT_FAILURE(rc))
         {
@@ -815,4 +820,6 @@
             return rc;
         }
+
+        LogRel(("VideoRec: Recording audio enabled\n"));
     }
 #endif
@@ -851,6 +858,5 @@
     pStream->fEnabled = true;
 
-    LogRel(("VideoRec: Recording screen #%u with %ux%u @ %u kbps, %u fps to '%s' started\n",
-            uScreen, uWidth, uHeight, uRate, uFPS, pszFile));
+
 
     return VINF_SUCCESS;
@@ -868,5 +874,5 @@
     uint32_t enmState = ASMAtomicReadU32(&g_enmState);
     return (   enmState == VIDEORECSTS_IDLE
-            || enmState == VIDEORECSTS_COPYING);
+            || enmState == VIDEORECSTS_BUSY);
 }
 
@@ -1048,5 +1054,5 @@
 
 /**
- * VideoRec utility function to copy a source image (FrameBuf) to the intermediate
+ * VideoRec utility function to copy a source video frame to the intermediate
  * RGB buffer. This function is executed only once per time.
  *
@@ -1056,21 +1062,21 @@
  * @param   pCtx               Pointer to the video recording context.
  * @param   uScreen            Screen number.
- * @param   x                  Starting x coordinate of the source buffer (Framebuffer).
- * @param   y                  Starting y coordinate of the source buffer (Framebuffer).
- * @param   uPixelFormat       Pixel Format.
- * @param   uBitsPerPixel      Bits Per Pixel
- * @param   uBytesPerLine      Bytes per source scanlineName.
- * @param   uSrcWidth          Width of the source frame.
- * @param   uSrcHeight         Height of the source frame.
- * @param   puSrcData          Pointer to source frame data.
+ * @param   x                  Starting x coordinate of the video frame.
+ * @param   y                  Starting y coordinate of the video frame.
+ * @param   uPixelFormat       Pixel format.
+ * @param   uBPP               Bits Per Pixel (BPP).
+ * @param   uBytesPerLine      Bytes per scanline.
+ * @param   uSrcWidth          Width of the video frame.
+ * @param   uSrcHeight         Height of the video frame.
+ * @param   puSrcData          Pointer to video frame data.
  * @param   u64TimeStampMs     Time stamp (in ms).
  */
 int VideoRecSendVideoFrame(PVIDEORECCONTEXT pCtx, uint32_t uScreen, uint32_t x, uint32_t y,
-                           uint32_t uPixelFormat, uint32_t uBitsPerPixel, uint32_t uBytesPerLine,
+                           uint32_t uPixelFormat, uint32_t uBPP, uint32_t uBytesPerLine,
                            uint32_t uSrcWidth, uint32_t uSrcHeight, uint8_t *puSrcData,
                            uint64_t uTimeStampMs)
 {
     /* Do not execute during termination and guard against termination */
-    if (!ASMAtomicCmpXchgU32(&g_enmState, VIDEORECSTS_COPYING, VIDEORECSTS_IDLE))
+    if (!ASMAtomicCmpXchgU32(&g_enmState, VIDEORECSTS_BUSY, VIDEORECSTS_IDLE))
         return VINF_TRY_AGAIN;
 
@@ -1161,5 +1167,5 @@
         if (uPixelFormat == BitmapFormat_BGR)
         {
-            switch (uBitsPerPixel)
+            switch (uBPP)
             {
                 case 32:
@@ -1176,5 +1182,5 @@
                     break;
                 default:
-                    AssertMsgFailed(("Unknown color depth! mBitsPerPixel=%d\n", uBitsPerPixel));
+                    AssertMsgFailed(("Unknown color depth! mBitsPerPixel=%d\n", uBPP));
                     break;
             }
@@ -1212,5 +1218,5 @@
     } while (0);
 
-    if (!ASMAtomicCmpXchgU32(&g_enmState, VIDEORECSTS_IDLE, VIDEORECSTS_COPYING))
+    if (!ASMAtomicCmpXchgU32(&g_enmState, VIDEORECSTS_IDLE, VIDEORECSTS_BUSY))
     {
         rc = RTSemEventSignal(pCtx->TermEvent);
