summaryrefslogtreecommitdiffstats
path: root/java/src/com/tightvnc/vncviewer/RfbProto.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/com/tightvnc/vncviewer/RfbProto.java')
-rw-r--r--java/src/com/tightvnc/vncviewer/RfbProto.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/java/src/com/tightvnc/vncviewer/RfbProto.java b/java/src/com/tightvnc/vncviewer/RfbProto.java
index 156b41a5..9e6284f8 100644
--- a/java/src/com/tightvnc/vncviewer/RfbProto.java
+++ b/java/src/com/tightvnc/vncviewer/RfbProto.java
@@ -100,6 +100,8 @@ class RfbProto {
// Non-standard client-to-server messages
final static int EnableContinuousUpdates = 150;
final static int VideoRectangleSelection = 151;
+ final static int VideoFreeze = 152;
+ final static String SigVideoFreeze = "VD_FREEZ";
final static String SigEnableContinuousUpdates = "CUC_ENCU";
final static String SigVideoRectangleSelection = "VRECTSEL";
@@ -498,6 +500,9 @@ class RfbProto {
clientMsgCaps.add(VideoRectangleSelection, TightVncVendor,
SigVideoRectangleSelection,
"Select a rectangle to be treated as video");
+ clientMsgCaps.add(VideoFreeze, TightVncVendor,
+ SigVideoFreeze,
+ "Disable/enable video rectangle");
// Supported encoding types
encodingCaps.add(EncodingCopyRect, StandardVendor,
@@ -1406,6 +1411,27 @@ class RfbProto {
System.out.println("Video rectangle selection message sent");
}
+ void trySendVideoFreeze(boolean freeze) throws IOException
+ {
+ if (!clientMsgCaps.isEnabled(VideoFreeze)) {
+ System.out.println("Video freeze is not supported by the server");
+ return;
+ }
+
+ byte[] b = new byte[2];
+ byte fb = 0;
+ if (freeze) {
+ fb = 1;
+ }
+
+ b[0] = (byte) VideoFreeze;
+ b[1] = (byte) fb;
+
+ os.write(b);
+
+ System.out.println("Video freeze selection message sent");
+ }
+
public void startTiming() {
timing = true;