diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-26 20:59:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-26 20:59:04 +0100 |
| commit | 3009a585f5222a83213c786e3c564c740f450d18 (patch) | |
| tree | ba65c1dc9ca643656160a6b7045f14c185fdd8f8 /src/lib/butler.cc | |
| parent | 8484d278ec6905502bd1178cc58d8cb7b3c12df0 (diff) | |
Protect the public API of Player with a mutex, since
seek() and pass() may be called from the Butler thread
ad the same time as other Player methods are called from
the GUI thread (by FilmViewer and ClosedCaptionViewDialog).
Diffstat (limited to 'src/lib/butler.cc')
| -rw-r--r-- | src/lib/butler.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/butler.cc b/src/lib/butler.cc index 112778e25..138ee0fbd 100644 --- a/src/lib/butler.cc +++ b/src/lib/butler.cc @@ -198,6 +198,7 @@ Butler::get_video () } pair<shared_ptr<PlayerVideo>, DCPTime> const r = _video.get (); + cout << "BGV " << to_string(r.second) << " " << _video.size() << "\n"; _summon.notify_all (); return r; } @@ -233,6 +234,7 @@ Butler::prepare (weak_ptr<PlayerVideo> weak_video) const void Butler::video (shared_ptr<PlayerVideo> video, DCPTime time) { + cout << "BV: " << to_string(time) << " " << _video.size() << " " << (float(_video.size()) / 24) << "\n"; boost::mutex::scoped_lock lm (_mutex); if (_pending_seek_position) { /* Don't store any video while a seek is pending */ @@ -246,6 +248,7 @@ Butler::video (shared_ptr<PlayerVideo> video, DCPTime time) void Butler::audio (shared_ptr<AudioBuffers> audio) { + cout << "BA: " << audio->frames() << " " << _audio.size() << " " << (float(_audio.size()) / 48000) << "\n"; { boost::mutex::scoped_lock lm (_mutex); if (_pending_seek_position || _disable_audio) { @@ -265,6 +268,7 @@ bool Butler::get_audio (float* out, Frame frames) { bool const underrun = _audio.get (out, _audio_channels, frames); + cout << "BGA: " << frames << " " << _audio.size() << " " << (float(_audio.size()) / 48000) << "\n"; _summon.notify_all (); return underrun; } |
