X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.cc;h=c05897c23b02adfc64d233c88d900ff14264a749;hb=50cb31af16240b248700dab1484d7f07656c66df;hp=60686e78178e00276513e248a51a97623c861764;hpb=edfd92e5554e3389e6456f497f44ca6e866800bf;p=dcpomatic.git diff --git a/src/lib/player.cc b/src/lib/player.cc index 60686e781..c05897c23 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -95,11 +95,6 @@ Player::pass () shared_ptr earliest; for (list >::iterator i = _pieces.begin(); i != _pieces.end(); ++i) { - cout << "check " << (*i)->content->file() - << " start=" << (*i)->content->start() - << ", position=" << (*i)->decoder->position() - << ", end=" << (*i)->content->end() << "\n"; - if ((*i)->decoder->done ()) { continue; } @@ -110,7 +105,6 @@ Player::pass () Time const t = (*i)->content->start() + (*i)->decoder->position(); if (t < earliest_t) { - cout << "\t candidate; " << t << " " << (t / TIME_HZ) << ".\n"; earliest_t = t; earliest = *i; } @@ -121,23 +115,8 @@ Player::pass () return true; } - cout << "PASS:\n"; - cout << "\tpass " << earliest->content->file() << " "; - if (dynamic_pointer_cast (earliest->content)) { - cout << " FFmpeg.\n"; - } else if (dynamic_pointer_cast (earliest->content)) { - cout << " ImageMagickContent.\n"; - } else if (dynamic_pointer_cast (earliest->content)) { - cout << " SndfileContent.\n"; - } else if (dynamic_pointer_cast (earliest->decoder)) { - cout << " Black.\n"; - } else if (dynamic_pointer_cast (earliest->decoder)) { - cout << " Silence.\n"; - } - earliest->decoder->pass (); _position = earliest->content->start() + earliest->decoder->position (); - cout << "\tpassed to " << _position << " " << (_position / TIME_HZ) << "\n"; return false; } @@ -169,6 +148,8 @@ Player::process_audio (weak_ptr weak_content, shared_ptrstart (); + cout << "Player gets " << audio->frames() << " @ " << time << " cf " << _next_audio << "\n"; + if (time > _next_audio) { /* We can emit some audio from our buffers */ OutputAudioFrame const N = _film->time_to_audio_frames (time - _next_audio); @@ -216,13 +197,10 @@ Player::seek (Time t) return; } -// cout << "seek to " << t << " " << (t / TIME_HZ) << "\n"; - for (list >::iterator i = _pieces.begin(); i != _pieces.end(); ++i) { Time s = t - (*i)->content->start (); s = max (static_cast