A bit of tidying up; don't build player ever for now; add -c option to makedcp to...
authorCarl Hetherington <cth@carlh.net>
Thu, 2 Aug 2012 23:00:39 +0000 (00:00 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 2 Aug 2012 23:00:39 +0000 (00:00 +0100)
src/lib/config.h
src/lib/util.cc
src/lib/util.h
src/tools/makedcp.cc
src/wx/config_dialog.cc
wscript

index 64bcf4d86d9ca0c7d7155f5c79af60832692c3fb..14b541ee69563cfdf43ec2a2491b3c31914d0cf4 100644 (file)
@@ -54,7 +54,6 @@ public:
        /** @return index of colour LUT to use when converting RGB to XYZ.
         *  0: sRGB
         *  1: Rec 709
-        *  2: DC28
         */
        int colour_lut_index () const {
                return _colour_lut_index;
@@ -185,7 +184,7 @@ private:
         *  (see colour_lut_index ())
         */
        int _colour_lut_index;
-       /** bandwidth for J2K files in Mb/s */
+       /** bandwidth for J2K files in bits per second */
        int _j2k_bandwidth;
 
        /** J2K encoding servers to use */
index 1ab8c1e65b53fd82946a5868d9d5ddc8f84d532f..1478bab2e52dca65bab8631e59f3cd3cae6a1c9b 100644 (file)
@@ -503,3 +503,20 @@ bool operator!= (Crop const & a, Crop const & b)
 {
        return !(a == b);
 }
+
+string
+colour_lut_index_to_name (int index)
+{
+       switch (index) {
+       case 0:
+               return "sRGB";
+       case 1:
+               return "Rec 709";
+       }
+
+       assert (false);
+       return "";
+}
+
+               
+                       
index 16afb7bb6fa92be941963039dd8a12e41e4d234e..568fe05d035ea56589be3e98639323da74df903b 100644 (file)
@@ -133,7 +133,7 @@ struct Position
 };
 
 extern std::string crop_string (Position, Size);
-
 extern int dcp_audio_sample_rate (int);
+extern std::string colour_lut_index_to_name (int index);
 
 #endif
index ec775eb718d348bbfe1fe8a63ad7d91d672a70aa..794fa09ab60f5be5df98314f0b538dec81ff102e 100644 (file)
@@ -33,6 +33,7 @@
 #include "scaler.h"
 #include "version.h"
 #include "cross.h"
+#include "config.h"
 
 using namespace std;
 using namespace boost;
@@ -44,6 +45,7 @@ help (string n)
             << "  -v, --version      show DVD-o-matic version\n"
             << "  -h, --help         show this help\n"
             << "  -d, --deps         list DVD-o-matic dependency details and quit\n"
+            << "  -c, --config       list configuration settings that affect output and quit\n"
             << "  -t, --test         run in test mode (repeatable UUID generation, timestamps etc.)\n"
             << "  -n, --no-progress  do not print progress to stdout\n"
             << "\n"
@@ -63,12 +65,13 @@ main (int argc, char* argv[])
                        { "version", no_argument, 0, 'v'},
                        { "help", no_argument, 0, 'h'},
                        { "deps", no_argument, 0, 'd'},
+                       { "config", no_argument, 0, 'c'},
                        { "test", no_argument, 0, 't'},
                        { "no-progress", no_argument, 0, 'n'},
                        { 0, 0, 0, 0 }
                };
 
-               int c = getopt_long (argc, argv, "vhdtn", long_options, &option_index);
+               int c = getopt_long (argc, argv, "vhdctn", long_options, &option_index);
 
                if (c == -1) {
                        break;
@@ -90,6 +93,15 @@ main (int argc, char* argv[])
                case 'n':
                        progress = false;
                        break;
+               case 'c':
+                       cout << "Colour LUT " << colour_lut_index_to_name (Config::instance()->colour_lut_index()) << "; "
+                            << "J2K bandwidth " << Config::instance()->j2k_bandwidth() << "; ";
+#ifdef DVDOMATIC_DEBUG
+                       cout << "built in debug mode\n";
+#else
+                       cout << "built in optimised mode\n";
+#endif                 
+                       exit (EXIT_SUCCESS);
                }
        }
 
index d48ddcfa462940455b0289f95129be333107f4b2..ebf5be4603e4050b3d17510c917b1d27656f3005 100644 (file)
@@ -70,8 +70,9 @@ ConfigDialog::ConfigDialog (wxWindow* parent)
 
        add_label_to_sizer (table, this, "Colour look-up table");
        _colour_lut = new wxComboBox (this, wxID_ANY);
-       _colour_lut->Append (wxT ("sRGB"));
-       _colour_lut->Append (wxT ("Rec 709"));
+       for (int i = 0; i < 2; ++i) {
+               _colour_lut->Append (std_to_wx (colour_lut_index_to_name (i)));
+       }
        _colour_lut->SetSelection (0);
        table->Add (_colour_lut, 1, wxEXPAND);
        table->AddSpacer (0);
diff --git a/wscript b/wscript
index 28d1f41bfe17bbe6baf8a92c4654c64c7c6f6daf..cd4d882012f3a19b3827c6932f5f4072298f0d82 100644 (file)
--- a/wscript
+++ b/wscript
@@ -24,6 +24,9 @@ def configure(conf):
     conf.env.append_value('CXXFLAGS', ['-D__STDC_CONSTANT_MACROS', '-msse', '-mfpmath=sse', '-ffast-math', '-fno-strict-aliasing', '-Wall', '-Wno-attributes'])
     conf.env.append_value('CXXFLAGS', ['-DDVDOMATIC_VERSION="%s"' % VERSION])
 
+    # Turn off player for now
+    conf.options.disable_player = True
+
     if conf.options.target_windows:
         conf.env.append_value('CXXFLAGS', ['-DDVDOMATIC_WINDOWS', '-DWIN32_LEAN_AND_MEAN'])
         conf.options.disable_player = True
@@ -45,7 +48,7 @@ def configure(conf):
         conf.env.append_value('CXXFLAGS', '-DDVDOMATIC_DISABLE_PLAYER')
 
     if conf.options.enable_debug:
-        conf.env.append_value('CXXFLAGS', '-g')
+        conf.env.append_value('CXXFLAGS', ['-g', '-DDVDOMATIC_DEBUG'])
     else:
         conf.env.append_value('CXXFLAGS', '-O3')