-void
-ABTranscoder::process_video (shared_ptr<Image> yuv, SourceFrame frame, shared_ptr<Subtitle> sub, int index)
-{
- if (index == 0) {
- /* Keep this image around until we get the other half */
- _image = yuv;
- } else {
- /* Copy the right half of yuv into _image */
- for (int i = 0; i < yuv->components(); ++i) {
- int const line_size = yuv->line_size()[i];
- int const half_line_size = line_size / 2;
- int const stride = yuv->stride()[i];
-
- uint8_t* p = _image->data()[i];
- uint8_t* q = yuv->data()[i];
-
- for (int j = 0; j < yuv->lines (i); ++j) {
- memcpy (p + half_line_size, q + half_line_size, half_line_size);
- p += stride;
- q += stride;
- }
- }
-
- /* And pass it to the encoder */
- _encoder->process_video (_image, frame, sub);
- _image.reset ();
- }
+ _combiner->connect_video (_delay_line);
+ _delay_line->connect_video (_matcher);
+ _matcher->connect_video (_encoder);