summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-03-01 22:41:56 +0100
committerCarl Hetherington <cth@carlh.net>2022-03-09 17:04:02 +0100
commit47d83b296248119d04b9226fd51a67e2fd3faac5 (patch)
treed9516f352dc28f1c42cc6e16247295611637ad42 /src/lib
parent161f7c27bd1aff63938a9512ab991de886691f97 (diff)
Improve ratings dialog to allow only valid values (#2199).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cross.h3
-rw-r--r--src/lib/cross_linux.cc16
-rw-r--r--src/lib/cross_osx.cc11
-rw-r--r--src/lib/cross_windows.cc11
-rw-r--r--src/lib/dcp_content.h9
-rw-r--r--src/lib/dcp_examiner.h7
-rw-r--r--src/lib/film.h1
-rw-r--r--src/lib/util.cc2
-rw-r--r--src/lib/verify_dcp_job.cc2
9 files changed, 24 insertions, 38 deletions
diff --git a/src/lib/cross.h b/src/lib/cross.h
index aad223d60..99c6bc299 100644
--- a/src/lib/cross.h
+++ b/src/lib/cross.h
@@ -53,8 +53,7 @@ extern boost::filesystem::path disk_writer_path ();
extern void maybe_open_console ();
#endif
extern boost::filesystem::path resources_path ();
-extern boost::filesystem::path xsd_path ();
-extern boost::filesystem::path tags_path ();
+extern boost::filesystem::path libdcp_resources_path ();
extern FILE * fopen_boost (boost::filesystem::path, std::string);
extern int dcpomatic_fseek (FILE *, int64_t, int);
extern void start_batch_converter ();
diff --git a/src/lib/cross_linux.cc b/src/lib/cross_linux.cc
index 07a70cc0b..14b8c71ba 100644
--- a/src/lib/cross_linux.cc
+++ b/src/lib/cross_linux.cc
@@ -109,22 +109,12 @@ resources_path ()
boost::filesystem::path
-xsd_path ()
+libdcp_resources_path ()
{
if (auto appdir = getenv("APPDIR")) {
- return boost::filesystem::path(appdir) / "usr" / "share" / "libdcp" / "xsd";
+ return boost::filesystem::path(appdir) / "usr" / "share" / "libdcp";
}
- return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "xsd";
-}
-
-
-boost::filesystem::path
-tags_path ()
-{
- if (auto appdir = getenv("APPDIR")) {
- return boost::filesystem::path(appdir) / "usr" / "share" / "libdcp" / "tags";
- }
- return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp" / "tags";
+ return boost::filesystem::canonical(LINUX_SHARE_PREFIX) / "libdcp";
}
diff --git a/src/lib/cross_osx.cc b/src/lib/cross_osx.cc
index b06f45a77..b11ac90ef 100644
--- a/src/lib/cross_osx.cc
+++ b/src/lib/cross_osx.cc
@@ -115,16 +115,9 @@ resources_path ()
boost::filesystem::path
-xsd_path ()
+libdcp_resources_path ()
{
- return resources_path() / "xsd";
-}
-
-
-boost::filesystem::path
-tags_path ()
-{
- return resources_path() / "tags";
+ return resources_path();
}
diff --git a/src/lib/cross_windows.cc b/src/lib/cross_windows.cc
index 4990f53ee..324b8cd8b 100644
--- a/src/lib/cross_windows.cc
+++ b/src/lib/cross_windows.cc
@@ -210,16 +210,9 @@ resources_path ()
boost::filesystem::path
-xsd_path ()
+libdcp_resources_path ()
{
- return directory_containing_executable().parent_path() / "xsd";
-}
-
-
-boost::filesystem::path
-tags_path ()
-{
- return directory_containing_executable().parent_path() / "tags";
+ return resources_path ();
}
diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h
index 69520fbd6..40ed181fe 100644
--- a/src/lib/dcp_content.h
+++ b/src/lib/dcp_content.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2022 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -18,16 +18,21 @@
*/
+
#ifndef DCPOMATIC_DCP_CONTENT_H
#define DCPOMATIC_DCP_CONTENT_H
+
/** @file src/lib/dcp_content.h
* @brief DCPContent class.
*/
+
#include "content.h"
#include <libcxml/cxml.h>
#include <dcp/encrypted_kdm.h>
+#include <dcp/rating.h>
+
class DCPContentProperty
{
@@ -42,7 +47,6 @@ public:
static int const CPL;
};
-class ContentPart;
/** @class DCPContent
* @brief An existing DCP used as input.
@@ -217,4 +221,5 @@ private:
std::vector<std::string> _content_versions;
};
+
#endif
diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h
index fd643a754..757e3ff03 100644
--- a/src/lib/dcp_examiner.h
+++ b/src/lib/dcp_examiner.h
@@ -18,19 +18,24 @@
*/
+
/** @file src/lib/dcp_examiner.h
* @brief DCPExaminer class.
*/
-#include "video_examiner.h"
+
#include "audio_examiner.h"
#include "dcp.h"
#include "dcp_text_track.h"
#include "dcpomatic_assert.h"
+#include "video_examiner.h"
#include <dcp/dcp_time.h>
+#include <dcp/rating.h>
+
class DCPContent;
+
class DCPExaminer : public DCP, public VideoExaminer, public AudioExaminer
{
public:
diff --git a/src/lib/film.h b/src/lib/film.h
index 78a66e17f..a1bec3d53 100644
--- a/src/lib/film.h
+++ b/src/lib/film.h
@@ -36,6 +36,7 @@
#include <dcp/encrypted_kdm.h>
#include <dcp/key.h>
#include <dcp/language_tag.h>
+#include <dcp/rating.h>
#include <boost/filesystem.hpp>
#include <boost/signals2.hpp>
#include <boost/thread.hpp>
diff --git a/src/lib/util.cc b/src/lib/util.cc
index c165a5129..ccd505e57 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -399,7 +399,7 @@ DCPOMATIC_ENABLE_WARNINGS
#endif
Pango::init ();
- dcp::init (tags_path());
+ dcp::init (libdcp_resources_path());
#if defined(DCPOMATIC_WINDOWS) || defined(DCPOMATIC_OSX)
/* Render something to fontconfig to create its cache */
diff --git a/src/lib/verify_dcp_job.cc b/src/lib/verify_dcp_job.cc
index 1b30b2112..b59f5bfab 100644
--- a/src/lib/verify_dcp_job.cc
+++ b/src/lib/verify_dcp_job.cc
@@ -76,7 +76,7 @@ VerifyDCPJob::update_stage (string s, optional<boost::filesystem::path> path)
void
VerifyDCPJob::run ()
{
- _notes = dcp::verify (_directories, bind (&VerifyDCPJob::update_stage, this, _1, _2), bind (&VerifyDCPJob::set_progress, this, _1, false), xsd_path());
+ _notes = dcp::verify (_directories, bind (&VerifyDCPJob::update_stage, this, _1, _2), bind (&VerifyDCPJob::set_progress, this, _1, false), libdcp_resources_path() / "xsd");
bool failed = false;
for (auto i: _notes) {