Move position variables into the video/audio/subtitle decoder classes.
[dcpomatic.git] / src / lib / audio_decoder.cc
index bc37960583eb52b15edd89435aff901e4c85c1a9..9801a68da90a0c1cb8d9505451742940adf205e6 100644 (file)
@@ -32,10 +32,10 @@ using std::map;
 using boost::shared_ptr;
 
 AudioDecoder::AudioDecoder (Decoder* parent, shared_ptr<const AudioContent> content, shared_ptr<Log> log)
-       : _ignore (false)
+       : DecoderPart (parent)
 {
        BOOST_FOREACH (AudioStreamPtr i, content->streams ()) {
-               _streams[i] = shared_ptr<AudioDecoderStream> (new AudioDecoderStream (content, i, parent, log));
+               _streams[i] = shared_ptr<AudioDecoderStream> (new AudioDecoderStream (content, i, parent, this, log));
        }
 }
 
@@ -48,7 +48,7 @@ AudioDecoder::get (AudioStreamPtr stream, Frame frame, Frame length, bool accura
 void
 AudioDecoder::give (AudioStreamPtr stream, shared_ptr<const AudioBuffers> data, ContentTime time)
 {
-       if (_ignore) {
+       if (ignore ()) {
                return;
        }
 
@@ -94,13 +94,6 @@ AudioDecoder::seek (ContentTime t, bool accurate)
        }
 }
 
-/** Set this decoder never to produce any data */
-void
-AudioDecoder::set_ignore ()
-{
-       _ignore = true;
-}
-
 void
 AudioDecoder::set_fast ()
 {