summaryrefslogtreecommitdiff
path: root/src/wx/film_viewer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-06-15 20:09:24 +0200
committerCarl Hetherington <cth@carlh.net>2024-06-23 19:51:28 +0200
commitd04355507baefd5fa42629341ed422f7402772f4 (patch)
tree078ee4094c7a8e4165329aa672279f7f6988c872 /src/wx/film_viewer.cc
parent6b1ebeac38cf60142c542bbad30cea5597d7e1e7 (diff)
Move some stuff into FilmViewer::dcp().
Diffstat (limited to 'src/wx/film_viewer.cc')
-rw-r--r--src/wx/film_viewer.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/wx/film_viewer.cc b/src/wx/film_viewer.cc
index ad240b957..50c3010d0 100644
--- a/src/wx/film_viewer.cc
+++ b/src/wx/film_viewer.cc
@@ -35,6 +35,7 @@
#include "lib/butler.h"
#include "lib/compose.hpp"
#include "lib/config.h"
+#include "lib/dcp_content.h"
#include "lib/dcpomatic_log.h"
#include "lib/examine_content_job.h"
#include "lib/exceptions.h"
@@ -900,6 +901,20 @@ FilmViewer::unset_crop_guess ()
}
+shared_ptr<DCPContent>
+FilmViewer::dcp() const
+{
+ if (_film) {
+ auto content = _film->content();
+ if (content.size() == 1) {
+ return dynamic_pointer_cast<DCPContent>(content.front());
+ }
+ }
+
+ return {};
+}
+
+
#if (RTAUDIO_VERSION_MAJOR >= 6)
void
FilmViewer::rtaudio_error_callback(string const& error)