summaryrefslogtreecommitdiff
path: root/src/lib/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/player.cc')
-rw-r--r--src/lib/player.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc
index caa2791b8..5e1fbcc63 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -74,6 +74,7 @@ Player::Player (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist
, _playlist (playlist)
, _have_valid_pieces (false)
, _ignore_video (false)
+ , _ignore_audio (false)
, _always_burn_subtitles (false)
{
_film_changed_connection = _film->Changed.connect (bind (&Player::film_changed, this, _1));
@@ -180,6 +181,11 @@ Player::setup_pieces ()
vd->set_ignore_video ();
}
+ shared_ptr<AudioDecoder> ad = dynamic_pointer_cast<AudioDecoder> (decoder);
+ if (ad && _ignore_audio) {
+ ad->set_ignore_audio ();
+ }
+
_pieces.push_back (shared_ptr<Piece> (new Piece (i, decoder, frc.get ())));
}
@@ -652,6 +658,13 @@ Player::set_ignore_video ()
_ignore_video = true;
}
+/** Set this player never to produce any audio data */
+void
+Player::set_ignore_audio ()
+{
+ _ignore_audio = true;
+}
+
/** Set whether or not this player should always burn text subtitles into the image,
* regardless of the content settings.
* @param burn true to always burn subtitles, false to obey content settings.