diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-11-12 21:04:06 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-11-12 21:04:06 +0000 |
| commit | 17cea71c34ed6bdba67aac8614572c7511844c2a (patch) | |
| tree | 41464576c5e2e6ab360789faf4b5fcc4358ee556 /src/lib/transcoder.cc | |
| parent | 13b935067e892875ea9e76c3d63fcc11d2c429b0 (diff) | |
Untested; more movement of stuff out of decoder.
Diffstat (limited to 'src/lib/transcoder.cc')
| -rw-r--r-- | src/lib/transcoder.cc | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/lib/transcoder.cc b/src/lib/transcoder.cc index ac908768e..f53fc4001 100644 --- a/src/lib/transcoder.cc +++ b/src/lib/transcoder.cc @@ -30,6 +30,8 @@ #include "encoder.h" #include "decoder_factory.h" #include "film.h" +#include "matcher.h" +#include "delay_line.h" using std::string; using boost::shared_ptr; @@ -47,12 +49,21 @@ Transcoder::Transcoder (shared_ptr<Film> f, shared_ptr<const Options> o, Job* j, { assert (_encoder); + AudioStream st = f->audio_stream().get(); + + _matcher.reset (new Matcher (f->log(), st.sample_rate(), f->frames_per_second())); + _delay_line.reset (new DelayLine (f->log(), st.channels(), f->audio_delay() * st.sample_rate() / 1000)); + /* Set up the decoder to use the film's set streams */ _decoder->set_audio_stream (f->audio_stream ()); _decoder->set_subtitle_stream (f->subtitle_stream ()); - - _decoder->Video.connect (bind (&Encoder::process_video, e, _1, _2, _3)); - _decoder->Audio.connect (bind (&Encoder::process_audio, e, _1, _2)); + + _decoder->connect_video (_matcher); + _matcher->connect_video (_encoder); + + _decoder->connect_audio (_delay_line); + _delay_line->connect_audio (_matcher); + _matcher->connect_audio (_delay_line); } /** Run the decoder, passing its output to the encoder, until the decoder |
