diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2012-01-07 02:15:35 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2012-01-07 02:15:35 -0800 |
commit | ec936364b7238cddea7734ea79c6e04b52a683c6 (patch) | |
tree | 788fc19c3ba599d6f39d3990769888a0650be5ff /src/base/vnc/vncserver.hh | |
parent | 36a822f08e88483b41af214ace4fd3dccf3aa8cb (diff) | |
parent | 9b52717a92ed9592bd98a41683509f538262a5c7 (diff) | |
download | gem5-ec936364b7238cddea7734ea79c6e04b52a683c6.tar.xz |
Merge with the main repository again.
Diffstat (limited to 'src/base/vnc/vncserver.hh')
-rw-r--r-- | src/base/vnc/vncserver.hh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/base/vnc/vncserver.hh b/src/base/vnc/vncserver.hh index 96dbdedda..33d833f26 100644 --- a/src/base/vnc/vncserver.hh +++ b/src/base/vnc/vncserver.hh @@ -48,6 +48,7 @@ #include <iostream> #include "base/vnc/convert.hh" +#include "base/bitmap.hh" #include "base/circlebuf.hh" #include "base/pollevent.hh" #include "base/socket.hh" @@ -55,6 +56,7 @@ #include "params/VncServer.hh" #include "sim/sim_object.hh" + /** * A device that expects to receive input from the vnc server should derrive * (through mulitple inheritence if necessary from VncKeyboard or VncMouse @@ -316,7 +318,25 @@ class VncServer : public SimObject /** 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 */ @@ -449,6 +469,8 @@ class VncServer : public SimObject setDirty() { sendUpdate = true; + if (captureEnabled) + captureFrameBuffer(); sendFrameBufferUpdate(); } |