#include <iostream>
+#include "base/vnc/convert.hh"
+#include "base/bitmap.hh"
#include "base/circlebuf.hh"
#include "base/pollevent.hh"
#include "base/socket.hh"
-#include "base/vnc/convert.hh"
#include "cpu/intr_control.hh"
-#include "sim/sim_object.hh"
#include "params/VncServer.hh"
+#include "sim/sim_object.hh"
+
/**
* A device that expects to receive input from the vnc server should derrive
/** The video converter that transforms data for us */
VideoConvert *vc;
+ /** Flag indicating whether to capture snapshots of frame buffer or not */
+ bool captureEnabled;
+
+ /** Current frame number being captured to a file */
+ int captureCurrentFrame;
+
+ /** Directory to store captured frames to */
+ std::string captureOutputDirectory;
+
+ /** Computed hash of the last captured frame */
+ uint64_t captureLastHash;
+
+ /** Cached bitmap object for writing out frame buffers to file */
+ Bitmap *captureBitmap;
+
protected:
+ /** Captures the current frame buffer to a file */
+ void captureFrameBuffer();
+
/**
* vnc client Interface
*/
setDirty()
{
sendUpdate = true;
+ if (captureEnabled)
+ captureFrameBuffer();
sendFrameBufferUpdate();
}