Added PlayerOptions::setPF(). This function calculates all PixelFormat
struct properties by rgb order, rm, gm, bm.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@248 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/rfbplayer/PlayerOptions.h b/rfbplayer/PlayerOptions.h
index 79930c2..2a56b3f 100644
--- a/rfbplayer/PlayerOptions.h
+++ b/rfbplayer/PlayerOptions.h
@@ -23,6 +23,8 @@
 
 #include <windows.h>
 
+#include <rfb/PixelFormat.h>
+
 #include <rfb_win32/registry.h>
 
 // Supported pixel formats
@@ -32,6 +34,14 @@
 #define PF_D24_RGB888 3
 #define PF_MODES 3
 
+// The R, G and B values order in the pixel
+#define RGB_ORDER 0
+#define RBG_ORDER 1
+#define GRB_ORDER 2
+#define GBR_ORDER 3
+#define BGR_ORDER 4
+#define BRG_ORDER 5
+
 // Default options values
 #define DEFAULT_PF PF_AUTO
 #define DEFAULT_INIT_TIME -1
@@ -45,17 +55,22 @@
 #define DEFAULT_FULL_SCREEN FALSE
 #define DEFAULT_STORE_SETTINGS FALSE
 
+using namespace rfb;
+
 class PlayerOptions {
 public:
   PlayerOptions();
   void readFromRegistry();
   void writeToRegistry();
   void writeDefaults();
+  void setPF(PixelFormat *pf);
+  bool setPF(int rgb_order, int rm, int gm, int bm, bool big_endian=false);
   long initTime;
   double playbackSpeed;
   bool autoPlay;
   bool fullScreen;
   long pixelFormat;
+  PixelFormat PF;
   bool acceptBell;
   bool acceptCutText;
   bool loopPlayback;