#include "rect.h"
#include "digester.h"
#include "audio_processor.h"
-#include "safe_stringstream.h"
#include "compose.hpp"
+#include <locked_sstream.h>
#include <dcp/util.h>
#include <dcp/picture_asset.h>
#include <dcp/sound_asset.h>
#include <libavcodec/avcodec.h>
}
#include <curl/curl.h>
+#ifdef DCPOMATIC_GRAPHICS_MAGICK
+#include <Magick++.h>
+#endif
#include <glib.h>
#include <pangomm/init.h>
#include <boost/algorithm/string.hpp>
int h = m / 60;
m -= (h * 60);
- SafeStringStream hms;
+ locked_stringstream hms;
hms << h << N_(":");
hms.width (2);
hms << setfill ('0') << m << N_(":");
int h = m / 60;
m -= (h * 60);
- SafeStringStream ap;
+ locked_stringstream ap;
bool const hours = h > 0;
- bool const minutes = h < 10 && m > 0;
- bool const seconds = m < 10 && s > 0;
+ bool const minutes = h < 6 && m > 0;
+ bool const seconds = h == 0 && m < 10 && s > 0;
if (hours) {
if (m > 30 && !minutes) {
ap << h << _("h");
}
- if (minutes | seconds) {
+ if (minutes || seconds) {
ap << N_(" ");
}
}
curl_global_init (CURL_GLOBAL_ALL);
+#ifdef DCPOMATIC_GRAPHICS_MAGICK
+ Magick::InitializeMagick (0);
+#endif
+
ui_thread = boost::this_thread::get_id ();
}
string
video_asset_filename (shared_ptr<dcp::PictureAsset> asset)
{
- return "j2c_" + asset->id() + ".mxf";
+ dcp::NameFormat::Map values;
+ values["type"] = "j2c";
+ values["id"] = asset->id();
+ return Config::instance()->dcp_filename_format().get(values) + ".mxf";
}
string
audio_asset_filename (shared_ptr<dcp::SoundAsset> asset)
{
- return "pcm_" + asset->id() + ".mxf";
+ dcp::NameFormat::Map values;
+ values["type"] = "pcm";
+ values["id"] = asset->id();
+ return Config::instance()->dcp_filename_format().get(values) + ".mxf";
}
float