*/
-/** A class which can be fed a stream of bytes and which can
- * delay them by a positive or negative amount.
- */
-class DelayLine
+#include <boost/shared_ptr.hpp>
+#include "processor.h"
+
+/** A delay line */
+class DelayLine : public TimedAudioVideoProcessor
{
public:
- DelayLine (int);
- ~DelayLine ();
+ DelayLine (boost::shared_ptr<Log> log, double);
- int feed (uint8_t *, int);
- void get_remaining (uint8_t *);
+ void process_video (boost::shared_ptr<const Image>, bool, boost::shared_ptr<Subtitle>, double);
+ void process_audio (boost::shared_ptr<const AudioBuffers>, double);
private:
- int _delay; ///< delay in bytes, +ve to move data later
- uint8_t* _buffer; ///< buffer for +ve delays, or 0
- int _negative_delay_remaining; ///< number of bytes of negative delay that remain to emit
+ double _seconds;
};