Replace calls to Position::end.
[dcpomatic.git] / src / lib / piece.h
index 8309be0848f3e0215410cff6cbe6b9ab99313676..0adc8fb32454894ea2e7758f6a0dccea1d106cdb 100644 (file)
 #ifndef DCPOMATIC_PIECE_H
 #define DCPOMATIC_PIECE_H
 
-#include "types.h"
+#include "audio_stream.h"
+#include "dcpomatic_time.h"
 #include "frame_rate_change.h"
+#include "types.h"
 
 class Content;
 class Decoder;
@@ -32,11 +34,19 @@ class Piece
 public:
        Piece (boost::shared_ptr<Content> c, boost::shared_ptr<Decoder> d, FrameRateChange f);
 
+       void update_pull_to (dcpomatic::DCPTime& pull_to) const;
+       void set_last_push_end (AudioStreamPtr stream, dcpomatic::DCPTime last_push_end);
+
+       dcpomatic::DCPTime position () const;
+       dcpomatic::DCPTime end (boost::shared_ptr<const Film> film) const;
+
 private:
        std::vector<boost::shared_ptr<Content> > _content;
        std::vector<boost::shared_ptr<Decoder> > _decoder;
        FrameRateChange _frc;
        bool _done;
+
+       std::map<AudioStreamPtr, dcpomatic::DCPTime> _stream_last_push_end;
 };
 
 #endif