diff options
author | Constantin Kaplinsky <const@tightvnc.com> | 2007-10-17 17:40:23 +0000 |
---|---|---|
committer | Constantin Kaplinsky <const@tightvnc.com> | 2007-10-17 17:40:23 +0000 |
commit | 651606d27852f0158da7243f5db94ebbd3c6b813 (patch) | |
tree | ecb57c595d8e3beac123c8ff8ece0b5164919549 /common/rfb/SMsgWriter.cxx | |
parent | c257370bef6c70176eef01e47edc3e59080fcef4 (diff) | |
download | tigervnc-651606d27852f0158da7243f5db94ebbd3c6b813.tar.gz tigervnc-651606d27852f0158da7243f5db94ebbd3c6b813.zip |
Using JpegEncoder for video only with proper pixel formats.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2361 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/SMsgWriter.cxx')
-rw-r--r-- | common/rfb/SMsgWriter.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/common/rfb/SMsgWriter.cxx b/common/rfb/SMsgWriter.cxx index 8d09f881..1a02ce34 100644 --- a/common/rfb/SMsgWriter.cxx +++ b/common/rfb/SMsgWriter.cxx @@ -173,7 +173,12 @@ bool SMsgWriter::writeRect(const Rect& r, unsigned int encoding, return encoders[encoding]->writeRect(r, ig, actual); } -void SMsgWriter::writeVideoRect(PixelBuffer *pb, const Rect& r) +bool SMsgWriter::canUseJpegEncoder(PixelBuffer *pb) const +{ + return jpegEncoder->isPixelFormatSupported(pb); +} + +void SMsgWriter::writeJpegRect(PixelBuffer *pb, const Rect& r) { jpegEncoder->writeRect(pb, r); } |