summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-08-03 00:00:39 +0100
committerCarl Hetherington <cth@carlh.net>2012-08-03 00:00:39 +0100
commit894f567beaabb43cf96651e61c29d04f3e02ae50 (patch)
treedb7fa032270d88fabfe0e4819e48ab2e68a93150 /src
parentbd540e569b65e4949aac80b988bfa421a0be90e6 (diff)
A bit of tidying up; don't build player ever for now; add -c option to makedcp to output configuration information.
Diffstat (limited to 'src')
-rw-r--r--src/lib/config.h3
-rw-r--r--src/lib/util.cc17
-rw-r--r--src/lib/util.h2
-rw-r--r--src/tools/makedcp.cc14
-rw-r--r--src/wx/config_dialog.cc5
5 files changed, 35 insertions, 6 deletions
diff --git a/src/lib/config.h b/src/lib/config.h
index 64bcf4d86..14b541ee6 100644
--- a/src/lib/config.h
+++ b/src/lib/config.h
@@ -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 */
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 1ab8c1e65..1478bab2e 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -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 "";
+}
+
+
+
diff --git a/src/lib/util.h b/src/lib/util.h
index 16afb7bb6..568fe05d0 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -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
diff --git a/src/tools/makedcp.cc b/src/tools/makedcp.cc
index ec775eb71..794fa09ab 100644
--- a/src/tools/makedcp.cc
+++ b/src/tools/makedcp.cc
@@ -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);
}
}
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index d48ddcfa4..ebf5be460 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -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);