Optimise checking of existing image data.
[dcpomatic.git] / src / lib / audio_decoder.h
index 387b1ad7ff74e396a6e85978ec6731a8c3af60d9..716b37969d87986d5ebf449ea98a4a68900f5849 100644 (file)
 #define DCPOMATIC_AUDIO_DECODER_H
 
 #include "decoder.h"
-#include "content.h"
-#include "audio_content.h"
 #include "content_audio.h"
+#include "audio_stream.h"
 #include <boost/enable_shared_from_this.hpp>
 
 class AudioBuffers;
+class AudioContent;
 class AudioDecoderStream;
 
 /** @class AudioDecoder.
@@ -39,7 +39,7 @@ class AudioDecoderStream;
 class AudioDecoder : public virtual Decoder, public boost::enable_shared_from_this<AudioDecoder>
 {
 public:
-       AudioDecoder (boost::shared_ptr<const AudioContent>);
+       AudioDecoder (boost::shared_ptr<const AudioContent>, bool fast);
 
        boost::shared_ptr<const AudioContent> audio_content () const {
                return _audio_content;
@@ -53,6 +53,12 @@ public:
         */
        ContentAudio get_audio (AudioStreamPtr stream, Frame time, Frame length, bool accurate);
 
+       void set_ignore_audio ();
+
+       bool fast () const {
+               return _fast;
+       }
+
 protected:
        void audio (AudioStreamPtr stream, boost::shared_ptr<const AudioBuffers>, ContentTime);
        void flush ();
@@ -62,6 +68,8 @@ private:
        boost::shared_ptr<const AudioContent> _audio_content;
        /** An AudioDecoderStream object to manage each stream in _audio_content */
        std::map<AudioStreamPtr, boost::shared_ptr<AudioDecoderStream> > _streams;
+       bool _ignore_audio;
+       bool _fast;
 };
 
 #endif