summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-22 21:29:40 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-22 21:29:40 +0100
commitdffc146e5387a0b3f7a671d845d6c3051b0e7067 (patch)
treed92d003263699c7039fa685e5c09b5e3b3655f64 /src/lib
parentdea824f6ff41384a5e17e23de5434cf84eccff29 (diff)
On reflection showing CCAPs over the main picture doesn't make much sense.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ffmpeg_encoder.cc2
-rw-r--r--src/lib/player.cc13
-rw-r--r--src/lib/player.h7
3 files changed, 8 insertions, 14 deletions
diff --git a/src/lib/ffmpeg_encoder.cc b/src/lib/ffmpeg_encoder.cc
index 10d439f94..29334e8ed 100644
--- a/src/lib/ffmpeg_encoder.cc
+++ b/src/lib/ffmpeg_encoder.cc
@@ -72,7 +72,7 @@ FFmpegEncoder::FFmpegEncoder (shared_ptr<const Film> film, weak_ptr<Job> job, bo
break;
}
- _player->set_always_burn_captions (CAPTION_OPEN);
+ _player->set_always_burn_open_captions ();
_player->set_play_referenced ();
int const ch = film->audio_channels ();
diff --git a/src/lib/player.cc b/src/lib/player.cc
index 580c3e6d4..dfd309774 100644
--- a/src/lib/player.cc
+++ b/src/lib/player.cc
@@ -444,14 +444,11 @@ Player::set_ignore_caption ()
_ignore_caption = true;
}
-/** Set a type of caption that this player should always burn into the image,
- * regardless of the content settings.
- * @param type type of captions to burn.
- */
+/** Set the player to always burn open captions into the image regardless of the content settings */
void
-Player::set_always_burn_captions (CaptionType type)
+Player::set_always_burn_open_captions ()
{
- _always_burn_captions = type;
+ _always_burn_open_captions = true;
}
/** Sets up the player to be faster, possibly at the expense of quality */
@@ -687,7 +684,7 @@ Player::captions_for_frame (DCPTime time) const
int const vfr = _film->video_frame_rate();
for (int i = 0; i < CAPTION_COUNT; ++i) {
- bool const always = _always_burn_captions && *_always_burn_captions == i;
+ bool const always = i == CAPTION_OPEN && _always_burn_open_captions;
BOOST_FOREACH (
PlayerCaption j,
_active_captions[i].get_burnt(DCPTimePeriod(time, time + DCPTime::from_frames(1, vfr)), always)
@@ -960,7 +957,7 @@ Player::subtitle_stop (weak_ptr<Piece> wp, weak_ptr<const CaptionContent> wc, Co
pair<PlayerCaption, DCPTime> from = _active_captions[type].add_to (wc, dcp_to);
- bool const always = _always_burn_captions && *_always_burn_captions == type;
+ bool const always = type == CAPTION_OPEN && _always_burn_open_captions;
if (caption->use() && !always && !caption->burn()) {
Caption (from.first, type, DCPTimePeriod (from.second, dcp_to));
}
diff --git a/src/lib/player.h b/src/lib/player.h
index eda2d7eb0..d54d927cd 100644
--- a/src/lib/player.h
+++ b/src/lib/player.h
@@ -79,7 +79,7 @@ public:
void set_video_container_size (dcp::Size);
void set_ignore_video ();
void set_ignore_caption ();
- void set_always_burn_captions (CaptionType type);
+ void set_always_burn_open_captions ();
void set_fast ();
void set_play_referenced ();
void set_dcp_decode_reduction (boost::optional<int> reduction);
@@ -154,10 +154,7 @@ private:
bool _ignore_video;
/** true if the player should ignore all captions; i.e. never produce any */
bool _ignore_caption;
- /** Type of captions that the player should always burn into the video regardless
- of content settings.
- */
- boost::optional<CaptionType> _always_burn_captions;
+ bool _always_burn_open_captions;
/** true if we should try to be fast rather than high quality */
bool _fast;
/** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */