]> source.dussan.org Git - tigervnc.git/commitdiff
Add method to get compression settings from encoder
authorPierre Ossman <ossman@cendio.se>
Thu, 20 Sep 2018 08:51:00 +0000 (10:51 +0200)
committerPierre Ossman <ossman@cendio.se>
Thu, 20 Sep 2018 10:08:46 +0000 (12:08 +0200)
common/rfb/Encoder.h
common/rfb/TightJPEGEncoder.cxx
common/rfb/TightJPEGEncoder.h

index 1e57fda513dd7a49d1b9332907ed1ef6abbbd76f..e135ec0e10dc3aec7fe45b203daf71b76144196b 100644 (file)
@@ -54,6 +54,9 @@ namespace rfb {
     virtual void setQualityLevel(int level) {};
     virtual void setFineQualityLevel(int quality, int subsampling) {};
 
+    virtual int getCompressLevel() { return -1; };
+    virtual int getQualityLevel() { return -1; };
+
     // writeRect() is the main interface that encodes the given rectangle
     // with data from the PixelBuffer onto the SConnection given at
     // encoder creation.
index 5d39b62c2f5360ebaf2bb04f712493f4789b8213..bbe4f8fa4de44cbb84a9f68c48e7d475af3f2213 100644 (file)
@@ -101,6 +101,11 @@ void TightJPEGEncoder::setFineQualityLevel(int quality, int subsampling)
   fineSubsampling = subsampling;
 }
 
+int TightJPEGEncoder::getQualityLevel()
+{
+  return qualityLevel;
+}
+
 void TightJPEGEncoder::writeRect(const PixelBuffer* pb, const Palette& palette)
 {
   const rdr::U8* buffer;
index 458c3831a67e8f307a26fe1fc35e99164284ca3d..3d8fa8c16a3c3597522551bf5162faed715d1359 100644 (file)
@@ -35,6 +35,8 @@ namespace rfb {
     virtual void setQualityLevel(int level);
     virtual void setFineQualityLevel(int quality, int subsampling);
 
+    virtual int getQualityLevel();
+
     virtual void writeRect(const PixelBuffer* pb, const Palette& palette);
     virtual void writeSolidRect(int width, int height,
                                 const PixelFormat& pf,