{
shared_ptr<Player> player (new Player (_film, _playlist));
player->set_ignore_video ();
+ player->set_ignore_subtitle ();
player->set_fast ();
player->set_play_referenced ();
player->Audio.connect (bind (&AnalyseAudioJob::analyse, this, _1, _2));
{
optional<ContentTime> pos;
- if (video && (!pos || video->position() < *pos)) {
+ if (video && !video->ignore() && (!pos || video->position() < *pos)) {
pos = video->position();
}
- if (audio && (!pos || audio->position() < *pos)) {
+ if (audio && !audio->ignore() && (!pos || audio->position() < *pos)) {
pos = audio->position();
}
- if (subtitle && (!pos || subtitle->position() < *pos)) {
+ if (subtitle && !subtitle->ignore() && (!pos || subtitle->position() < *pos)) {
pos = subtitle->position();
}
if (_video_stream && si == _video_stream.get() && !video->ignore()) {
decode_video_packet ();
- } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index (_format_context, si)) {
+ } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index(_format_context, si) && !subtitle->ignore()) {
decode_subtitle_packet ();
} else {
decode_audio_packet ();
, _playlist (playlist)
, _have_valid_pieces (false)
, _ignore_video (false)
- , _ignore_audio (false)
+ , _ignore_subtitle (false)
, _always_burn_subtitles (false)
, _fast (false)
, _play_referenced (false)
decoder->video->set_ignore ();
}
- if (decoder->audio && _ignore_audio) {
- decoder->audio->set_ignore ();
+ if (decoder->subtitle && _ignore_subtitle) {
+ decoder->subtitle->set_ignore ();
}
shared_ptr<DCPDecoder> dcp = dynamic_pointer_cast<DCPDecoder> (decoder);
_ignore_video = true;
}
+void
+Player::set_ignore_subtitle ()
+{
+ _ignore_subtitle = 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.
void set_video_container_size (dcp::Size);
void set_ignore_video ();
+ void set_ignore_subtitle ();
void set_always_burn_subtitles (bool burn);
void set_fast ();
void set_play_referenced ();
/** true if the player should ignore all video; i.e. never produce any */
bool _ignore_video;
/** true if the player should ignore all audio; i.e. never produce any */
- bool _ignore_audio;
+ bool _ignore_subtitle;
/** true if the player should always burn subtitles into the video regardless
of content settings
*/