Index: /trunk/src/VBox/Main/src-client/DisplayImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 42478)
+++ /trunk/src/VBox/Main/src-client/DisplayImpl.cpp	(revision 42479)
@@ -47,4 +47,9 @@
 
 #include <VBox/com/array.h>
+
+#ifdef VBOX_WITH_VPX_MAIN
+# include "EncodeAndWrite.h"
+  PVIDEORECCONTEXT pVideoRecContext;
+#endif
 
 /**
@@ -3240,4 +3245,13 @@
         }
     }
+#ifdef VBOX_WITH_VPX_MAIN
+    VideoRecCopyToIntBuffer(pVideoRecContext, pDisplay->xOrigin, pDisplay->yOrigin,
+                            pDisplay->w, pDisplay->h, mPixelFormat,
+                            pDisplay->u16BitsPerPixel, mBytesPerLine, pDisplay->w,
+                            pDisplay->h, pDisplay->h, pDisplay->w,
+                            pu8Framebuffer, mTempRGBBuffer);
+#endif
+
+
 
 #ifdef DEBUG_sunlover
@@ -4218,4 +4232,13 @@
     pData->IConnector.pfnVBVAMousePointerShape = Display::displayVBVAMousePointerShape;
 #endif
+#ifdef VBOX_WITH_VPX_MAIN
+    rc = VideoRecContextCreate(&pVideoRecContext);
+    rc = RTCritSectInit(&mCritSect);
+    AssertReturn(rc == VINF_SUCCESS, E_UNEXPECTED);
+
+    if(rc == VINF_SUCCESS)
+        rc = VideoRecContextInit(pVideoRecContext, "test.webm", 800, 720);
+
+#endif
 
 
