50#include "debug/VNC.hh"
58 _videoWidth(
fb->
width()), _videoHeight(
fb->height()),
59 captureEnabled(
p.frame_capture),
60 captureCurrentFrame(0), captureLastHash(0),
61 imgFormat(
p.img_format)
66 const std::string FRAME_OUTPUT_SUBDIR =
"frames_" +
name();
77 panic(
"Trying to VNC frame buffer to NULL!");
99 DPRINTF(VNC,
"Updating video params: width: %d height: %d\n",
124 char frameFilenameBuffer[64];
125 snprintf(frameFilenameBuffer, 64,
"fb.%06d.%lld.%s.gz",
128 const std::string frameFilename(frameFilenameBuffer);
Internal gem5 representation of a frame buffer.
uint64_t getHash() const
Create a hash of the image that can be used for quick comparisons.
unsigned height() const
Frame buffer height in pixels.
unsigned width() const
Frame buffer width in pixels.
virtual std::string name() const
void close(OutputStream *file)
Closes an output file and free the corresponding OutputFile.
void remove(const std::string &name, bool recursive=false)
Removes a specified file or subdirectory.
OutputDirectory * createSubdirectory(const std::string &name)
Creates a subdirectory within this directory.
OutputStream * create(const std::string &name, bool binary=false, bool no_gz=false)
Creates a file in this directory (optionally compressed).
std::ostream * stream() const
Get the output underlying output stream.
Abstract superclass for simulation objects.
#define panic(...)
This implements a cprintf based panic() function.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
Tick curTick()
The universal simulation clock.
std::unique_ptr< ImgWriter > createImgWriter(enums::ImageFormat type, const FrameBuffer *fb)
Factory Function which allocates a ImgWriter object and returns a smart pointer to it.