diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/content.h | 4 | ||||
| -rw-r--r-- | src/lib/dcp_content.h | 2 | ||||
| -rw-r--r-- | src/lib/player.cc | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/content.h b/src/lib/content.h index 7fad2ff79..7c02ee0e3 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -192,6 +192,10 @@ public: std::string calculate_digest () const; + virtual bool can_be_played () const { + return true; + } + /* ChangeType::PENDING and ChangeType::CANCELLED may be emitted from any thread; ChangeType::DONE always from GUI thread */ boost::signals2::signal<void (ChangeType, std::weak_ptr<Content>, int, bool)> Change; diff --git a/src/lib/dcp_content.h b/src/lib/dcp_content.h index d57c0059c..55773b944 100644 --- a/src/lib/dcp_content.h +++ b/src/lib/dcp_content.h @@ -92,7 +92,7 @@ public: return _kdm; } - bool can_be_played () const; + bool can_be_played () const override; bool needs_kdm () const; bool needs_assets () const; diff --git a/src/lib/player.cc b/src/lib/player.cc index 12a53bc63..58ea4f2de 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -147,7 +147,7 @@ Player::setup_pieces () bool have_video (shared_ptr<const Content> content) { - return static_cast<bool>(content->video) && content->video->use(); + return static_cast<bool>(content->video) && content->video->use() && content->can_be_played(); } |
