#include "dcp_content_type.h"
#include "ratio.h"
#include "cross.h"
-#include "safe_stringstream.h"
#include "environment_info.h"
#include "raw_convert.h"
#include "audio_processor.h"
#include "dcp_content.h"
#include "screen_kdm.h"
#include "cinema.h"
+#include <locked_sstream.h>
#include <libcxml/cxml.h>
#include <dcp/cpl.h>
#include <dcp/certificate_chain.h>
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/foreach.hpp>
-#include <boost/make_shared.hpp>
#include <boost/regex.hpp>
#include <unistd.h>
#include <stdexcept>
using boost::dynamic_pointer_cast;
using boost::optional;
using boost::is_any_of;
-using boost::make_shared;
#define LOG_GENERAL(...) log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL);
#define LOG_GENERAL_NC(...) log()->log (__VA_ARGS__, LogEntry::TYPE_GENERAL);
* are present.
* 34 -> 35
* VideoFrameType in VideoContent is a string rather than an integer.
+ * 35 -> 36
+ * EffectColour rather than OutlineColour in Subtitle.
*/
-int const Film::current_state_version = 35;
+int const Film::current_state_version = 36;
/** Construct a Film object in a given directory.
*
{
DCPOMATIC_ASSERT (container ());
- SafeStringStream s;
+ locked_stringstream s;
s.imbue (std::locale::classic ());
s << container()->id()
throw MissingSettingError (_("name"));
}
- JobManager::instance()->add (make_shared<TranscodeJob> (shared_from_this()));
+ JobManager::instance()->add (shared_ptr<Job> (new TranscodeJob (shared_from_this())));
}
/** Start a job to send our DCP to the configured TMS */
void
Film::send_dcp_to_tms ()
{
- shared_ptr<Job> j = make_shared<UploadJob> (shared_from_this());
+ shared_ptr<Job> j (new UploadJob (shared_from_this()));
JobManager::instance()->add (j);
}
shared_ptr<xmlpp::Document>
Film::metadata () const
{
- shared_ptr<xmlpp::Document> doc = make_shared<xmlpp::Document> ();
+ shared_ptr<xmlpp::Document> doc (new xmlpp::Document);
xmlpp::Element* root = doc->create_root_node ("Metadata");
root->add_child("Version")->add_child_text (raw_convert<string> (current_state_version));
string
Film::isdcf_name (bool if_created_now) const
{
- SafeStringStream d;
+ locked_stringstream d;
string raw_name = name ();
p /= "j2c";
p /= video_identifier ();
- SafeStringStream s;
+ locked_stringstream s;
s.width (8);
s << setfill('0') << reel << "_" << frame;
void
Film::examine_content (shared_ptr<Content> c)
{
- shared_ptr<Job> j = make_shared<ExamineContentJob> (shared_from_this(), c);
+ shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
JobManager::instance()->add (j);
}
run_ffprobe (c->path(0), file ("ffprobe.log"), _log);
}
- shared_ptr<Job> j = make_shared<ExamineContentJob> (shared_from_this(), c);
+ shared_ptr<Job> j (new ExamineContentJob (shared_from_this(), c));
_job_connections.push_back (
j->Finished.connect (bind (&Film::maybe_add_content, this, weak_ptr<Job> (j), weak_ptr<Content> (c)))
add_content (content);
if (Config::instance()->automatic_audio_analysis() && content->audio) {
- shared_ptr<Playlist> playlist = make_shared<Playlist> ();
+ shared_ptr<Playlist> playlist (new Playlist);
playlist->add (content);
boost::signals2::connection c;
JobManager::instance()->analyse_audio (
dcp::Formulation formulation
) const
{
- shared_ptr<const dcp::CPL> cpl = make_shared<dcp::CPL> (cpl_file);
+ shared_ptr<const dcp::CPL> cpl (new dcp::CPL (cpl_file));
shared_ptr<const dcp::CertificateChain> signer = Config::instance()->signer_chain ();
if (!signer->valid ()) {
throw InvalidSignerError ();
{
optional<DCPTime> last_split;
shared_ptr<Content> last_video;
- ContentList cl = content ();
BOOST_FOREACH (shared_ptr<Content> c, content ()) {
if (c->video) {
BOOST_FOREACH (DCPTime t, c->reel_split_points()) {