Be more careful about allowing possibly-trouble-causing characters in DCP filenames.
[dcpomatic.git] / src / lib / audio_decoder.h
index 315cd94e49a34531023961a421784653d6c88802..cdb643ceeabef373aa5ada3f705168beed574766 100644 (file)
@@ -28,6 +28,7 @@
 #include "decoder.h"
 #include "content_audio.h"
 #include "audio_stream.h"
+#include "decoder_part.h"
 #include <boost/enable_shared_from_this.hpp>
 
 class AudioBuffers;
@@ -38,7 +39,7 @@ class Log;
 /** @class AudioDecoder.
  *  @brief Parent class for audio decoders.
  */
-class AudioDecoder : public boost::enable_shared_from_this<AudioDecoder>
+class AudioDecoder : public boost::enable_shared_from_this<AudioDecoder>, public DecoderPart
 {
 public:
        AudioDecoder (Decoder* parent, boost::shared_ptr<const AudioContent>, boost::shared_ptr<Log> log);
@@ -51,18 +52,18 @@ public:
         */
        ContentAudio get (AudioStreamPtr stream, Frame time, Frame length, bool accurate);
 
-       void set_ignore ();
        void set_fast ();
 
        void give (AudioStreamPtr stream, boost::shared_ptr<const AudioBuffers>, ContentTime);
        void flush ();
        void seek (ContentTime t, bool accurate);
 
+       boost::optional<ContentTime> position () const;
+
 private:
        /** An AudioDecoderStream object to manage each stream in _audio_content */
-       std::map<AudioStreamPtr, boost::shared_ptr<AudioDecoderStream> > _streams;
-       bool _ignore;
-       bool _fast;
+       typedef std::map<AudioStreamPtr, boost::shared_ptr<AudioDecoderStream> > StreamMap;
+       StreamMap _streams;
 };
 
 #endif