+
+
+string
+DCPDecoder::calculate_lazy_digest (shared_ptr<const DCPContent> c) const
+{
+ Digester d;
+ for (auto i: c->paths()) {
+ d.add (i.string());
+ }
+ if (_dcp_content->kdm()) {
+ d.add(_dcp_content->kdm()->id());
+ }
+ d.add (static_cast<bool>(c->cpl()));
+ if (c->cpl()) {
+ d.add (c->cpl().get());
+ }
+ return d.get ();
+}
+
+
+ContentTime
+DCPDecoder::position () const
+{
+ return ContentTime::from_frames(_offset, _dcp_content->active_video_frame_rate(film())) + _next;
+}
+
+
+vector<FontData>
+DCPDecoder::fonts () const
+{
+ vector<FontData> data;
+ for (auto i: _reels) {
+ if (i->main_subtitle() && i->main_subtitle()->asset()) {
+ for (auto const& j: i->main_subtitle()->asset()->font_data()) {
+ data.push_back (FontData(j.first, j.second));
+ }
+ }
+ }
+ return data;
+}
+