summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-31 17:21:35 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-31 17:21:35 +0100
commitf45cbb73068321d857249aaa21f770b87493c7c2 (patch)
tree9e98c39274a47c0906a79dbb18f067fc9963fb62 /src/lib/player.cc
parentf385ef03e5ea27519a31c0839447735a7fba0602 (diff)
Test filling of stuff with black.
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index e64e1e011..757f9bbce 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -101,8 +101,12 @@ Player::pass ()
shared_ptr<Piece> earliest;
for (list<shared_ptr<Piece> >::iterator i = _pieces.begin(); i != _pieces.end(); ++i) {
-// cout << "check " << (*i)->content->file() << " start=" << (*i)->content->start() << ", next=" << (*i)->decoder->next() << ", end=" << (*i)->content->end() << "\n";
- if (((*i)->decoder->next() + (*i)->content->start()) >= (*i)->content->end()) {
+ cout << "check " << (*i)->content->file()
+ << " start=" << (*i)->content->start()
+ << ", next=" << (*i)->decoder->next()
+ << ", end=" << (*i)->content->end() << "\n";
+
+ if ((*i)->decoder->done ()) {
continue;
}
@@ -112,7 +116,7 @@ Player::pass ()
Time const t = (*i)->content->start() + (*i)->decoder->next();
if (t < earliest_t) {
-// cout << "\t candidate; " << t << " " << (t / TIME_HZ) << ".\n";
+ cout << "\t candidate; " << t << " " << (t / TIME_HZ) << ".\n";
earliest_t = t;
earliest = *i;
}
@@ -248,6 +252,7 @@ void
Player::add_black_piece (Time s, Time len)
{
shared_ptr<NullContent> nc (new NullContent (_film, s, len));
+ nc->set_ratio (_film->container ());
shared_ptr<BlackDecoder> bd (new BlackDecoder (_film, nc));
bd->Video.connect (bind (&Player::process_video, this, nc, _1, _2, _3));
_pieces.push_back (shared_ptr<Piece> (new Piece (nc, bd)));