return digester.get ();
}
-/** @param node <Playlist> node */
+/** @param film Film that this Playlist is for.
+ * @param node <Playlist> node.
+ * @param version Metadata version number.
+ * @param notes Output notes about that happened.
+ */
void
Playlist::set_from_xml (shared_ptr<const Film> film, cxml::ConstNodePtr node, int version, list<string>& notes)
{
reconnect ();
}
-/** @param node <Playlist> node */
+/** @param node <Playlist> node.
+ * @param with_content_paths true to include <Path> nodes in <Content> nodes, false to omit them.
+ */
void
Playlist::as_xml (xmlpp::Node* node, bool with_content_paths)
{
return best_summary;
}
+
+bool
+Playlist::video_content_at (DCPTime time) const
+{
+ BOOST_FOREACH (shared_ptr<Content> i, _content) {
+ if (i->video && i->position() <= time && time < i->end()) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool
+Playlist::audio_content_at (DCPTime time) const
+{
+ BOOST_FOREACH (shared_ptr<Content> i, _content) {
+ if (i->audio && i->position() <= time && time < i->end()) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+pair<double, double>
+Playlist::speed_up_range (int dcp_video_frame_rate) const
+{
+ pair<double, double> range (DBL_MAX, -DBL_MAX);
+
+ BOOST_FOREACH (shared_ptr<Content> i, _content) {
+ if (!i->video) {
+ continue;
+ }
+ if (i->video_frame_rate()) {
+ FrameRateChange const frc (i->video_frame_rate().get(), dcp_video_frame_rate);
+ range.first = min (range.first, frc.speed_up);
+ range.second = max (range.second, frc.speed_up);
+ } else {
+ FrameRateChange const frc (dcp_video_frame_rate, dcp_video_frame_rate);
+ range.first = min (range.first, frc.speed_up);
+ range.second = max (range.second, frc.speed_up);
+ }
+ }
+
+ return range;
+}