diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-19 00:26:27 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-19 00:26:27 +0000 |
| commit | 54c0378137091de604b8c0d6d98959b55b0cddb6 (patch) | |
| tree | bc591c0e59c5cc2ba1054c1fcc612bf73e8d6eaf /src/lib/player.cc | |
| parent | 5282bd42dbe7f9c114abc6f648cb65ef52c35cf4 (diff) | |
Fix audio analysis; make sure we don't decode video and let it pile up unwanted.
Diffstat (limited to 'src/lib/player.cc')
| -rw-r--r-- | src/lib/player.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index 4c9042743..9c7c6471d 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -73,6 +73,7 @@ Player::Player (shared_ptr<const Film> f, shared_ptr<const Playlist> p) , _playlist (p) , _have_valid_pieces (false) , _approximate_size (false) + , _ignore_video (false) { _playlist_changed_connection = _playlist->Changed.connect (bind (&Player::playlist_changed, this)); _playlist_content_changed_connection = _playlist->ContentChanged.connect (bind (&Player::content_changed, this, _1, _2, _3)); @@ -173,6 +174,11 @@ Player::setup_pieces () frc = best_overlap_frc; } + shared_ptr<VideoDecoder> vd = dynamic_pointer_cast<VideoDecoder> (decoder); + if (vd && _ignore_video) { + vd->set_ignore_video (); + } + _pieces.push_back (shared_ptr<Piece> (new Piece (*i, decoder, frc.get ()))); } @@ -608,3 +614,10 @@ Player::get_subtitle_fonts () return fonts; } + +/** Set this player never to produce any video data */ +void +Player::set_ignore_video () +{ + _ignore_video = true; +} |
