summaryrefslogtreecommitdiff
path: root/src/lib/dcp_video.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-25 11:58:12 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-25 13:36:17 +0100
commit89ee4cc6019036fa4fc0a6e07e052ffdc3b136ac (patch)
tree5a1d1b3e1e6fc4d280f1ff0f1598a37e0fea3257 /src/lib/dcp_video.cc
parente08c1d30bb5e2d77339541eb7dbe7d1ca95485ab (diff)
Make player decide whether subtitles should be burnt based on
content settings rather than using the film's settings. Remove film property of burn-subtitles.
Diffstat (limited to 'src/lib/dcp_video.cc')
-rw-r--r--src/lib/dcp_video.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/lib/dcp_video.cc b/src/lib/dcp_video.cc
index b72353d9e..3879947eb 100644
--- a/src/lib/dcp_video.cc
+++ b/src/lib/dcp_video.cc
@@ -77,14 +77,13 @@ using dcp::Size;
* @param l Log to write to.
*/
DCPVideo::DCPVideo (
- shared_ptr<const PlayerVideo> frame, int index, int dcp_fps, int bw, Resolution r, bool b, shared_ptr<Log> l
+ shared_ptr<const PlayerVideo> frame, int index, int dcp_fps, int bw, Resolution r, shared_ptr<Log> l
)
: _frame (frame)
, _index (index)
, _frames_per_second (dcp_fps)
, _j2k_bandwidth (bw)
, _resolution (r)
- , _burn_subtitles (b)
, _log (l)
{
@@ -98,7 +97,6 @@ DCPVideo::DCPVideo (shared_ptr<const PlayerVideo> frame, shared_ptr<const cxml::
_frames_per_second = node->number_child<int> ("FramesPerSecond");
_j2k_bandwidth = node->number_child<int> ("J2KBandwidth");
_resolution = Resolution (node->optional_number_child<int>("Resolution").get_value_or (RESOLUTION_2K));
- _burn_subtitles = node->bool_child ("BurnSubtitles");
}
/** J2K-encode this frame on the local host.
@@ -109,7 +107,7 @@ DCPVideo::encode_locally (dcp::NoteHandler note)
{
shared_ptr<dcp::OpenJPEGImage> xyz;
- shared_ptr<Image> image = _frame->image (AV_PIX_FMT_RGB48LE, _burn_subtitles, note);
+ shared_ptr<Image> image = _frame->image (AV_PIX_FMT_RGB48LE, note);
if (_frame->colour_conversion()) {
xyz = dcp::rgb_to_xyz (
image->data()[0],
@@ -276,7 +274,7 @@ DCPVideo::encode_remotely (ServerDescription serv)
socket->write ((uint8_t *) xml.c_str(), xml.length() + 1);
/* Send binary data */
- _frame->send_binary (socket, _burn_subtitles);
+ _frame->send_binary (socket);
/* Read the response (JPEG2000-encoded data); this blocks until the data
is ready and sent back.
@@ -296,8 +294,7 @@ DCPVideo::add_metadata (xmlpp::Element* el) const
el->add_child("FramesPerSecond")->add_child_text (raw_convert<string> (_frames_per_second));
el->add_child("J2KBandwidth")->add_child_text (raw_convert<string> (_j2k_bandwidth));
el->add_child("Resolution")->add_child_text (raw_convert<string> (int (_resolution)));
- el->add_child("BurnSubtitles")->add_child_text (_burn_subtitles ? "1" : "0");
- _frame->add_metadata (el, _burn_subtitles);
+ _frame->add_metadata (el);
}
Eyes
@@ -314,8 +311,7 @@ DCPVideo::same (shared_ptr<const DCPVideo> other) const
{
if (_frames_per_second != other->_frames_per_second ||
_j2k_bandwidth != other->_j2k_bandwidth ||
- _resolution != other->_resolution ||
- _burn_subtitles != other->_burn_subtitles) {
+ _resolution != other->_resolution) {
return false;
}