summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-04-24 00:29:40 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-07 09:29:58 +0200
commit48ce861574440af5baa15198af543de52f0467bb (patch)
treef8250b2298637d89fd5d985cc0278847988180df
parent8aa7473b9e2ed012e5812f2511a624a6fea79d14 (diff)
Add Piece::video_frame_type().
-rw-r--r--src/lib/piece.cc8
-rw-r--r--src/lib/piece.h1
-rw-r--r--src/lib/player.cc2
3 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/piece.cc b/src/lib/piece.cc
index 86fdb5ad4..732ab75ee 100644
--- a/src/lib/piece.cc
+++ b/src/lib/piece.cc
@@ -115,6 +115,14 @@ Piece::use_video () const
}
+VideoFrameType
+Piece::video_frame_type () const
+{
+ DCPOMATIC_ASSERT (content->video);
+ return content->video->frame_type ();
+}
+
+
dcpomatic::DCPTime
Piece::position () const
{
diff --git a/src/lib/piece.h b/src/lib/piece.h
index 3df451182..bc58c3f16 100644
--- a/src/lib/piece.h
+++ b/src/lib/piece.h
@@ -50,6 +50,7 @@ public:
dcpomatic::DCPTime content_time_to_dcp (dcpomatic::ContentTime t) const;
bool use_video () const;
+ VideoFrameType video_frame_type () const;
FrameRateChange frame_rate_change () const {
return frc;
diff --git a/src/lib/player.cc b/src/lib/player.cc
index dfd005c9c..bf8a1d222 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -259,7 +259,7 @@ Player::setup_pieces_unlocked ()
}
for (auto i = _pieces.begin(); i != _pieces.end(); ++i) {
- if ((*i)->use_video() && (*i)->content->video->frame_type() != VideoFrameType::THREE_D_LEFT && (*i)->content->video->frame_type() != VideoFrameType::THREE_D_RIGHT) {
+ if ((*i)->use_video() && (*i)->video_frame_type() != VideoFrameType::THREE_D_LEFT && (*i)->video_frame_type() != VideoFrameType::THREE_D_RIGHT) {
/* Look for content later in the content list with in-use video that overlaps this */
auto period = DCPTimePeriod((*i)->position(), (*i)->end(_film));
auto j = i;