diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-04-24 00:29:40 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-05-07 09:29:58 +0200 |
| commit | 48ce861574440af5baa15198af543de52f0467bb (patch) | |
| tree | f8250b2298637d89fd5d985cc0278847988180df | |
| parent | 8aa7473b9e2ed012e5812f2511a624a6fea79d14 (diff) | |
Add Piece::video_frame_type().
| -rw-r--r-- | src/lib/piece.cc | 8 | ||||
| -rw-r--r-- | src/lib/piece.h | 1 | ||||
| -rw-r--r-- | src/lib/player.cc | 2 |
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; |
