projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.
[dcpomatic.git]
/
src
/
lib
/
kdm.cc
diff --git
a/src/lib/kdm.cc
b/src/lib/kdm.cc
index 00d2f053781246e9631d7785ba3739e56de46a9c..c08750961e2c7c77245191e8e99f2b97daf5d875 100644
(file)
--- a/
src/lib/kdm.cc
+++ b/
src/lib/kdm.cc
@@
-21,7
+21,7
@@
#include <boost/shared_ptr.hpp>
#include <quickmail.h>
#include <zip.h>
#include <boost/shared_ptr.hpp>
#include <quickmail.h>
#include <zip.h>
-#include <dcp/kdm.h>
+#include <dcp/
encrypted_
kdm.h>
#include "kdm.h"
#include "cinema.h"
#include "exceptions.h"
#include "kdm.h"
#include "cinema.h"
#include "exceptions.h"
@@
-36,13
+36,13
@@
using boost::shared_ptr;
struct ScreenKDM
{
struct ScreenKDM
{
- ScreenKDM (shared_ptr<Screen> s, dcp::KDM k)
+ ScreenKDM (shared_ptr<Screen> s, dcp::
Encrypted
KDM k)
: screen (s)
, kdm (k)
{}
shared_ptr<Screen> screen;
: screen (s)
, kdm (k)
{}
shared_ptr<Screen> screen;
- dcp::KDM kdm;
+ dcp::
Encrypted
KDM kdm;
};
static string
};
static string
@@
-102,17
+102,17
@@
static list<ScreenKDM>
make_screen_kdms (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
make_screen_kdms (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
- boost::filesystem::path
dcp
,
-
boost::posix_time::pt
ime from,
-
boost::posix_time::pt
ime to
+ boost::filesystem::path
cpl
,
+
dcp::LocalT
ime from,
+
dcp::LocalT
ime to
)
{
)
{
- list<dcp::
KDM> kdms = film->make_kdms (screens, dcp
, from, to);
+ list<dcp::
EncryptedKDM> kdms = film->make_kdms (screens, cpl
, from, to);
list<ScreenKDM> screen_kdms;
list<shared_ptr<Screen> >::iterator i = screens.begin ();
list<ScreenKDM> screen_kdms;
list<shared_ptr<Screen> >::iterator i = screens.begin ();
- list<dcp::KDM>::iterator j = kdms.begin ();
+ list<dcp::
Encrypted
KDM>::iterator j = kdms.begin ();
while (i != screens.end() && j != kdms.end ()) {
screen_kdms.push_back (ScreenKDM (*i, *j));
++i;
while (i != screens.end() && j != kdms.end ()) {
screen_kdms.push_back (ScreenKDM (*i, *j));
++i;
@@
-126,12
+126,12
@@
static list<CinemaKDMs>
make_cinema_kdms (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
make_cinema_kdms (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
- boost::filesystem::path
dcp
,
-
boost::posix_time::pt
ime from,
-
boost::posix_time::pt
ime to
+ boost::filesystem::path
cpl
,
+
dcp::LocalT
ime from,
+
dcp::LocalT
ime to
)
{
)
{
- list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens,
dcp
, from, to);
+ list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens,
cpl
, from, to);
list<CinemaKDMs> cinema_kdms;
while (!screen_kdms.empty ()) {
list<CinemaKDMs> cinema_kdms;
while (!screen_kdms.empty ()) {
@@
-164,17
+164,20
@@
make_cinema_kdms (
return cinema_kdms;
}
return cinema_kdms;
}
+/** @param from KDM from time in local time.
+ * @param to KDM to time in local time.
+ */
void
write_kdm_files (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
void
write_kdm_files (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
- boost::filesystem::path
dcp
,
-
boost::posix_time::pt
ime from,
-
boost::posix_time::pt
ime to,
+ boost::filesystem::path
cpl
,
+
dcp::LocalT
ime from,
+
dcp::LocalT
ime to,
boost::filesystem::path directory
)
{
boost::filesystem::path directory
)
{
- list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens,
dcp
, from, to);
+ list<ScreenKDM> screen_kdms = make_screen_kdms (film, screens,
cpl
, from, to);
/* Write KDMs to the specified directory */
for (list<ScreenKDM>::iterator i = screen_kdms.begin(); i != screen_kdms.end(); ++i) {
/* Write KDMs to the specified directory */
for (list<ScreenKDM>::iterator i = screen_kdms.begin(); i != screen_kdms.end(); ++i) {
@@
-188,13
+191,13
@@
void
write_kdm_zip_files (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
write_kdm_zip_files (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
- boost::filesystem::path
dcp
,
-
boost::posix_time::pt
ime from,
-
boost::posix_time::pt
ime to,
+ boost::filesystem::path
cpl
,
+
dcp::LocalT
ime from,
+
dcp::LocalT
ime to,
boost::filesystem::path directory
)
{
boost::filesystem::path directory
)
{
- list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens,
dcp
, from, to);
+ list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens,
cpl
, from, to);
for (list<CinemaKDMs>::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) {
boost::filesystem::path path = directory;
for (list<CinemaKDMs>::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) {
boost::filesystem::path path = directory;
@@
-207,12
+210,12
@@
void
email_kdms (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
email_kdms (
shared_ptr<const Film> film,
list<shared_ptr<Screen> > screens,
- boost::filesystem::path
dcp
,
-
boost::posix_time::pt
ime from,
-
boost::posix_time::pt
ime to
+ boost::filesystem::path
cpl
,
+
dcp::LocalT
ime from,
+
dcp::LocalT
ime to
)
{
)
{
- list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens,
dcp
, from, to);
+ list<CinemaKDMs> cinema_kdms = make_cinema_kdms (film, screens,
cpl
, from, to);
for (list<CinemaKDMs>::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) {
for (list<CinemaKDMs>::const_iterator i = cinema_kdms.begin(); i != cinema_kdms.end(); ++i) {