"If the argument is empty, full screen is shown to VNC clients.",
"");
-StringParameter Geometry::m_videoAreaParam("VideoArea",
- "Screen area to be handled as video. "
- "Format is <width>x<height>+<offset_x>+<offset_y>.",
- "");
-
Geometry::Geometry(int fullWidth, int fullHeight)
: m_fullWidth(fullWidth),
m_fullHeight(fullHeight),
// Everything went good so far.
vlog.info("Desktop geometry is set to %dx%d+%d+%d",
width(), height(), offsetLeft(), offsetTop());
-
- // Handle the VideoArea parameter, save the result in m_videoRect.
- // Note that we log absolute coordinates but save relative ones.
- param = m_videoAreaParam.getData();
- bool videoAreaSpecified = (strlen(param) > 0);
- if (videoAreaSpecified) {
- Rect absVideoRect = parseString(param);
- if (!absVideoRect.is_empty()) {
- vlog.info("Video area set to %dx%d+%d+%d",
- absVideoRect.width(), absVideoRect.height(),
- absVideoRect.tl.x, absVideoRect.tl.y);
- Point base(-offsetLeft(), -offsetTop());
- m_videoRect = absVideoRect.translate(base);
- } else {
- vlog.info("Video area was not set");
- m_videoRect.clear();
- }
- }
- delete[] param;
}
Rect Geometry::parseString(const char *arg) const
// Return the same information as a Rect structure.
const Rect& getRect() const { return m_rect; }
- // Return coordinates of the video rectangle if one was set with the
- // "VideoArea" parameter. The coordinates are relative to the whole
- // rectangle as returned by getRect(). In other words, the
- // coordinate (0, 0) corresponds to the top left corner of the
- // rectangle shown to RFB clients.
- const Rect& getVideoRect() const { return m_videoRect; }
-
protected:
// Parse a string, extract size and coordinates,
// and return that rectangle clipped to m_rect.
Rect parseString(const char *arg) const;
static StringParameter m_geometryParam;
- static StringParameter m_videoAreaParam;
int m_fullWidth;
int m_fullHeight;
Rect m_rect;
- Rect m_videoRect;
};
#endif // __GEOMETRY_H__
adjusted to satisfy \fBMaxProcessorUsage\fP setting. Default is 30.
.
.TP
-.B VideoArea
-This option specifies the screen area that will be handled as video. The
-format is
-.B \fIwidth\fPx\fIheight\fP+\fIxoffset\fP+\fIyoffset\fP
-, where `+' signs can be replaced with `\-' signs to specify offsets from the
-right and/or from the bottom of the screen. Offsets are optional, +0+0 is
-assumed by default (top left corner). Video area is not checked for actual
-changes, it is assumed to be changing continuously and is sent in each screen
-update. Normally, video area is compressed with JPEG (if allowed by the
-client). Note that this setting can be overriden by TigerVNC clients
-supporting VideoRectangleSelection protocol extension. In other words,
-clients may choose video selection themselves, but if they do not, then the
-\fBVideoArea\fP parameter will take effect. If the argument is empty, no
-video area is set (this is the default).
-.
-.TP
.B DeferUpdate
x0vncserver uses a "deferred update" mechanism which enhances performance in
many cases. After any change to the framebuffer, x0vncserver waits for this