+2014-03-05 Carl Hetherington <cth@carlh.net>
+
+ * Bump maximum audio channels to 12 so that we can
+ (crudely at least) get BsL/BsR.
+
2014-03-04 Carl Hetherington <cth@carlh.net>
* Version 1.64.18 released.
f.read_file (file ("metadata.xml"));
_state_version = f.number_child<int> ("Version");
+ if (_state_version > current_state_version) {
+ throw StringError (_("This film was created with a newer version of DCP-o-matic, and it cannot be loaded into this version. Sorry!"));
+ }
_name = f.string_child ("Name");
_use_dci_name = f.bool_child ("UseDCIName");
void
Job::set_state (State s)
{
- bool finished = false;
+ bool const finished = (s == FINISHED_OK || s == FINISHED_ERROR || s == FINISHED_CANCELLED);
+ /* Do this first, so that we handle things that should happen on finish before the
+ * job is actually marked as such. This is important for callers that do:
+ *
+ * while (JobManager::work_to_do ()) {
+ * ui_signaller->ui_idle ();
+ * }
+ *
+ * as otherwise this loop can finish before the Finished handler has been executed
+ * (job finishes, calls set_state(), this sets the state and sets a pending signal
+ * for Finished, but this is never called as a ui_idle() never happens as work_to_do()
+ * is now false).
+ */
+ if (finished && ui_signaller) {
+ ui_signaller->emit (boost::bind (boost::ref (Finished)));
+ }
+
{
boost::mutex::scoped_lock lm (_state_mutex);
_state = s;
- if (_state == FINISHED_OK || _state == FINISHED_ERROR || _state == FINISHED_CANCELLED) {
+ if (finished) {
_ran_for = elapsed_time ();
- finished = true;
_sub_name.clear ();
}
}
-
- if (finished && ui_signaller) {
- ui_signaller->emit (boost::bind (boost::ref (Finished)));
- }
}
/** @return DCPTime (in seconds) that this sub-job has been running */
string
audio_channel_name (int c)
{
- assert (MAX_AUDIO_CHANNELS == 8);
+ assert (MAX_AUDIO_CHANNELS == 12);
/* TRANSLATORS: these are the names of audio channels; Lfe (sub) is the low-frequency
enhancement channel (sub-woofer). HI is the hearing-impaired audio track and
_("Lfe (sub)"),
_("Left surround"),
_("Right surround"),
- _("HI"),
- _("VI")
+ _("Hearing impaired"),
+ _("Visually impaired"),
+ _("Left centre"),
+ _("Right centre"),
+ _("Left rear surround"),
+ _("Right rear surround"),
};
return channels[c];
#undef check
/** The maximum number of audio channels that we can cope with */
-#define MAX_AUDIO_CHANNELS 8
+#define MAX_AUDIO_CHANNELS 12
#define DCPOMATIC_HELLO "Boys, you gotta learn not to talk to nuns that way"
CURL ZIP QUICKMAIL PANGOMM CAIROMM
"""
+ if bld.env.TARGET_OSX:
+ obj.framework = ['IOKit', 'Foundation']
+
obj.source = sources + ' version.cc'
if bld.env.TARGET_WINDOWS:
#include "lib/job.h"
#include "lib/dcp_content_type.h"
#include "lib/ratio.h"
+#include "lib/image_content.h"
using std::string;
using std::cout;
<< " -h, --help show this help\n"
<< " -n, --name <name> film name\n"
<< " -c, --dcp-content-type <type> FTR, SHR, TLR, TST, XSN, RTG, TSR, POL, PSA or ADV\n"
- << " --container-ratio 119, 133, 137, 138, 166, 178, 185 or 239\n"
- << " --content-ratio 119, 133, 137, 138, 166, 178, 185 or 239\n"
+ << " --container-ratio <ratio> 119, 133, 137, 138, 166, 178, 185 or 239\n"
+ << " --content-ratio <ratio> 119, 133, 137, 138, 166, 178, 185 or 239\n"
+ << " -s, --still-length <n> number of seconds that still content should last\n"
<< " -o, --output <dir> output directory\n";
}
+class SimpleUISignaller : public UISignaller
+{
+public:
+ /* Do nothing in this method so that UI events happen in our thread
+ when we call UISignaller::ui_idle().
+ */
+ void wake_ui () {}
+};
+
int
main (int argc, char* argv[])
{
DCPContentType const * dcp_content_type = DCPContentType::from_dci_name ("TST");
Ratio const * container_ratio = 0;
Ratio const * content_ratio = 0;
+ int still_length = 10;
boost::filesystem::path output;
int option_index = 0;
{ "dcp-content-type", required_argument, 0, 'c'},
{ "container-ratio", required_argument, 0, 'A'},
{ "content-ratio", required_argument, 0, 'B'},
+ { "still-length", required_argument, 0, 's'},
{ "output", required_argument, 0, 'o'},
{ 0, 0, 0, 0}
};
- int c = getopt_long (argc, argv, "vhn:c:A:B:o:", long_options, &option_index);
+ int c = getopt_long (argc, argv, "vhn:c:A:B:s:o:", long_options, &option_index);
if (c == -1) {
break;
}
exit (EXIT_FAILURE);
}
break;
+ case 's':
+ still_length = atoi (optarg);
+ break;
case 'o':
output = optarg;
break;
}
if (!content_ratio) {
- cerr << "Missing required option --content-ratio.\n";
- help (argv[0]);
+ cerr << argv[0] << ": missing required option --content-ratio.\n";
exit (EXIT_FAILURE);
}
container_ratio = content_ratio;
}
- ui_signaller = new UISignaller ();
+ if (optind == argc) {
+ cerr << argv[0] << ": no content specified.\n";
+ exit (EXIT_FAILURE);
+ }
+
+ ui_signaller = new SimpleUISignaller ();
try {
shared_ptr<Film> film (new Film (output, false));
}
film->set_container (container_ratio);
+ film->set_dcp_content_type (dcp_content_type);
for (int i = optind; i < argc; ++i) {
shared_ptr<Content> c = content_factory (film, argv[i]);
while (jm->work_to_do ()) {
ui_signaller->ui_idle ();
}
-
+
+ ContentList content = film->content ();
+ for (ContentList::iterator i = content.begin(); i != content.end(); ++i) {
+ shared_ptr<ImageContent> ic = dynamic_pointer_cast<ImageContent> (*i);
+ if (ic) {
+ ic->set_video_length (still_length * 24);
+ }
+ }
+
if (jm->errors ()) {
list<shared_ptr<Job> > jobs = jm->get ();
for (list<shared_ptr<Job> >::iterator i = jobs.begin(); i != jobs.end(); ++i) {
using boost::shared_ptr;
using boost::lexical_cast;
-#define INDICATOR_SIZE 20
+#define INDICATOR_SIZE 16
enum {
ID_off = 1,
{
int const c = _grid->GetNumberCols ();
- _grid->SetColLabelValue (0, _("Content channel"));
+ _grid->SetColLabelValue (0, _("Content"));
-#if MAX_AUDIO_CHANNELS != 8
+#if MAX_AUDIO_CHANNELS != 12
#warning AudioMappingView::set_column_labels() is expecting the wrong MAX_AUDIO_CHANNELS
#endif
if (c > 7) {
_grid->SetColLabelValue (8, _("VI"));
}
-
+
+ if (c > 8) {
+ _grid->SetColLabelValue (9, _("Lc"));
+ }
+
+ if (c > 9) {
+ _grid->SetColLabelValue (10, _("Rc"));
+ }
+
+ if (c > 10) {
+ _grid->SetColLabelValue (11, _("BsL"));
+ }
+
+ if (c > 11) {
+ _grid->SetColLabelValue (12, _("BsR"));
+ }
+
_grid->AutoSize ();
}
_colours.push_back (wxColour ( 0, 139, 0));
_colours.push_back (wxColour ( 0, 0, 139));
_colours.push_back (wxColour (255, 255, 0));
+ _colours.push_back (wxColour ( 0, 255, 255));
+ _colours.push_back (wxColour (255, 0, 255));
+ _colours.push_back (wxColour (255, 0, 139));
+ _colours.push_back (wxColour (139, 0, 255));
-#if MAX_AUDIO_CHANNELS != 8
+#if MAX_AUDIO_CHANNELS != 12
#warning AudioPlot::AudioPlot is expecting the wrong MAX_AUDIO_CHANNELS
#endif
#include "lib/util.h"
#include "lib/audio_analysis.h"
-class Metrics;
+struct Metrics;
class AudioPlot : public wxPanel
{
conf.env.INSTALL_PREFIX = conf.options.install_prefix
# Common CXXFLAGS
- conf.env.append_value('CXXFLAGS', ['-D__STDC_CONSTANT_MACROS', '-D__STDC_LIMIT_MACROS', '-msse', '-mfpmath=sse', '-ffast-math', '-fno-strict-aliasing',
+ conf.env.append_value('CXXFLAGS', ['-D__STDC_CONSTANT_MACROS', '-D__STDC_LIMIT_MACROS', '-msse', '-ffast-math', '-fno-strict-aliasing',
'-Wall', '-Wno-attributes', '-Wextra', '-D_FILE_OFFSET_BITS=64'])
if conf.options.enable_debug:
# Windows
if conf.env.TARGET_WINDOWS:
- conf.env.append_value('CXXFLAGS', ['-DDCPOMATIC_WINDOWS', '-DWIN32_LEAN_AND_MEAN', '-DBOOST_USE_WINDOWS_H', '-DUNICODE', '-DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN'])
+ conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_WINDOWS')
+ conf.env.append_value('CXXFLAGS', '-DWIN32_LEAN_AND_MEAN')
+ conf.env.append_value('CXXFLAGS', '-DBOOST_USE_WINDOWS_H')
+ conf.env.append_value('CXXFLAGS', '-DUNICODE')
+ conf.env.append_value('CXXFLAGS', '-DBOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN')
+ conf.env.append_value('CXXFLAGS', '-mfpmath=sse')
wxrc = os.popen('wx-config --rescomp').read().split()[1:]
conf.env.append_value('WINRCFLAGS', wxrc)
if conf.options.enable_debug:
# Linux
if conf.env.TARGET_LINUX:
+ conf.env.append_value('CXXFLAGS', '-mfpmath=sse')
conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_LINUX')
if conf.env.TARGET_DEBIAN:
# OSX
if conf.env.TARGET_OSX:
- conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_OSX')
+ conf.env.append_value('CXXFLAGS', ['-DDCPOMATIC_OSX', '-Wno-unused-function', '-Wno-unused-parameter'])
conf.env.append_value('LINKFLAGS', '-headerpad_max_install_names')
#