Add accessor for _playlist.
[dcpomatic.git] / src / lib / atmos_mxf_content.cc
index 8300c2cd6e4e9026fefe9efa731e56682aeb0d87..581b1b2f06c0efe0c13b19da9220356d399fe466 100644 (file)
@@ -32,6 +32,7 @@
 using std::list;
 using std::string;
 using boost::shared_ptr;
+using namespace dcpomatic;
 
 AtmosMXFContent::AtmosMXFContent (boost::filesystem::path path)
        : Content (path)
@@ -55,7 +56,7 @@ AtmosMXFContent::valid_mxf (boost::filesystem::path path)
                return true;
        } catch (dcp::MXFFileError& e) {
 
-       } catch (dcp::DCPReadError& e) {
+       } catch (dcp::ReadError& e) {
 
        }
 
@@ -93,6 +94,12 @@ AtmosMXFContent::as_xml (xmlpp::Node* node, bool with_paths) const
 DCPTime
 AtmosMXFContent::full_length (shared_ptr<const Film> film) const
 {
-       FrameRateChange const frc (active_video_frame_rate(film), film->video_frame_rate());
+       FrameRateChange const frc (film, shared_from_this());
        return DCPTime::from_frames (llrint (_length * frc.factor()), film->video_frame_rate());
 }
+
+DCPTime
+AtmosMXFContent::approximate_length () const
+{
+       return DCPTime::from_frames (_length, 24);
+}