/*
- Copyright (C) 2012-2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
#ifndef DCPOMATIC_DECODER_PART_H
#define DCPOMATIC_DECODER_PART_H
+
#include "dcpomatic_time.h"
#include <boost/optional.hpp>
+
class Decoder;
+class Log;
+class Film;
+
class DecoderPart
{
public:
DecoderPart (Decoder* parent);
+ virtual ~DecoderPart () {}
+
+ virtual boost::optional<dcpomatic::ContentTime> position (std::shared_ptr<const Film> film) const = 0;
+ virtual void seek () = 0;
- void set_ignore () {
- _ignore = true;
+ void set_ignore (bool i) {
+ _ignore = i;
}
bool ignore () const {
return _ignore;
}
- void set_position (ContentTime position) {
- _position = position;
- }
-
- boost::optional<ContentTime> position () const {
- return _position;
- }
-
- void maybe_seek (ContentTime time, bool accurate);
-
protected:
Decoder* _parent;
private:
bool _ignore;
- boost::optional<ContentTime> _position;
};
+
#endif