Basic detach of FFmpegContent, ImageContent, DCPContent
[dcpomatic.git] / src / lib / dcp_content.h
index be12ba5346eb7f81fa85dd75eec0df625818f8d3..f4445ad53045cb5d733017b7e5ae3519cf6f2ad2 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -24,7 +24,6 @@
  *  @brief DCPContent class.
  */
 
-#include "video_content.h"
 #include "single_stream_audio_content.h"
 #include "subtitle_content.h"
 #include <libcxml/cxml.h>
@@ -42,7 +41,7 @@ public:
 /** @class DCPContent
  *  @brief An existing DCP used as input.
  */
-class DCPContent : public VideoContent, public SingleStreamAudioContent, public SubtitleContent
+class DCPContent : public SingleStreamAudioContent, public SubtitleContent
 {
 public:
        DCPContent (boost::shared_ptr<const Film>, boost::filesystem::path p);
@@ -104,6 +103,8 @@ public:
                return _reference_video;
        }
 
+       bool can_reference_video (std::list<std::string> &) const;
+
        void set_reference_audio (bool r);
 
        bool reference_audio () const {
@@ -111,6 +112,8 @@ public:
                return _reference_audio;
        }
 
+       bool can_reference_audio (std::list<std::string> &) const;
+
        void set_reference_subtitle (bool r);
 
        bool reference_subtitle () const {
@@ -118,11 +121,15 @@ public:
                return _reference_subtitle;
        }
 
+       bool can_reference_subtitle (std::list<std::string> &) const;
+
 protected:
-       void add_properties (std::list<std::pair<std::string, std::string> >& p) const;
+       void add_properties (std::list<UserProperty>& p) const;
 
 private:
        void read_directory (boost::filesystem::path);
+       std::list<DCPTimePeriod> reels () const;
+       template <class T> bool can_reference (std::string overlapping, std::list<std::string>& why_not) const;
 
        std::string _name;
        bool _has_subtitles;