47 #include <sys/types.h>
52 #include "debug/VNC.hh"
57 :
SimObject(p), keyboard(NULL), mouse(NULL),
59 _videoWidth(
fb->
width()), _videoHeight(
fb->height()),
60 captureEnabled(p->frame_capture),
61 captureCurrentFrame(0), captureLastHash(0)
66 const string FRAME_OUTPUT_SUBDIR =
"frames_" +
name();
77 panic(
"Trying to VNC frame buffer to NULL!");
97 DPRINTF(VNC,
"Updating video params: width: %d height: %d\n",
122 char frameFilenameBuffer[64];
123 snprintf(frameFilenameBuffer, 64,
"fb.%06d.%lld.bmp.gz",
125 const string frameFilename(frameFilenameBuffer);
137 VncInputParams::create()
OutputDirectory * createSubdirectory(const std::string &name)
Creates a subdirectory within this directory.
Internal gem5 representation of a frame buffer.
OutputStream * create(const std::string &name, bool binary=false, bool no_gz=false)
Creates a file in this directory (optionally compressed).
Tick curTick()
The current simulated tick.
unsigned height() const
Frame buffer height in pixels.
void remove(const std::string &name, bool recursive=false)
Removes a specified file or subdirectory.
void close(OutputStream *file)
Closes an output file and free the corresponding OutputFile.
virtual const std::string name() const
unsigned width() const
Frame buffer width in pixels.
uint64_t getHash() const
Create a hash of the image that can be used for quick comparisons.
Abstract superclass for simulation objects.