Cleanup: use std::vector and extract utf8_to_utf16().
[dcpomatic.git] / src / lib / playlist.cc
index e8714e9d6d4ffedac4ab9dd6fc6ae83ee1efe66b..5f26b94f3dd7ee41ce3eaf7786916d3b4fa734c1 100644 (file)
 */
 
 
-#include "playlist.h"
-#include "video_content.h"
-#include "text_content.h"
-#include "ffmpeg_decoder.h"
-#include "ffmpeg_content.h"
-#include "image_decoder.h"
 #include "audio_content.h"
+#include "compose.hpp"
+#include "config.h"
 #include "content_factory.h"
 #include "dcp_content.h"
+#include "digester.h"
+#include "ffmpeg_content.h"
+#include "ffmpeg_decoder.h"
+#include "image_decoder.h"
 #include "job.h"
-#include "config.h"
+#include "playlist.h"
+#include "text_content.h"
 #include "util.h"
-#include "digester.h"
-#include "compose.hpp"
+#include "video_content.h"
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
 #include <boost/bind/placeholders.hpp>
 #include "i18n.h"
 
 
-using std::list;
 using std::cout;
-using std::vector;
-using std::min;
+using std::dynamic_pointer_cast;
+using std::list;
 using std::max;
-using std::string;
+using std::min;
 using std::pair;
-using boost::optional;
 using std::shared_ptr;
+using std::string;
+using std::vector;
 using std::weak_ptr;
-using std::dynamic_pointer_cast;
+using boost::optional;
 using namespace dcpomatic;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
@@ -234,7 +234,7 @@ Playlist::set_from_xml (shared_ptr<const Film> film, cxml::ConstNodePtr node, in
 
                /* ...or have a start trim which is an integer number of frames */
                auto const old_trim = content->trim_start();
-               content->set_trim_start(old_trim);
+               content->set_trim_start(film, old_trim);
                if (old_trim != content->trim_start()) {
                        string note = _("Your project contains video content whose trim was not aligned to a frame boundary.");
                        note += "  ";