X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplaylist.h;h=7dbf416041d8bf4bfa555bf45341ee01e04af812;hb=264a268f7c1244b47d9fa54ad342d80b0f98e16d;hp=2d243fe8f0e84060b0ffa20b93a96d08fbf7af31;hpb=09a9ac376db005a40a351736bcff4077f098825d;p=dcpomatic.git diff --git a/src/lib/playlist.h b/src/lib/playlist.h index 2d243fe8f..7dbf41604 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -29,8 +29,8 @@ class Content; class FFmpegContent; class FFmpegDecoder; -class ImageMagickContent; -class ImageMagickDecoder; +class StillImageMagickContent; +class StillImageMagickDecoder; class SndfileContent; class SndfileDecoder; class Job; @@ -41,10 +41,7 @@ class Region; * @brief A set of content files (video and audio), with knowledge of how they should be arranged into * a DCP. * - * This class holds Content objects, and it knows how they should be arranged. At the moment - * the ordering is implicit; video content is placed sequentially, and audio content is taken - * from the video unless any sound-only files are present. If sound-only files exist, they - * are played simultaneously (i.e. they can be split up into multiple files for different channels) + * This class holds Content objects, and it knows how they should be arranged. */ struct ContentSorter @@ -52,11 +49,10 @@ struct ContentSorter bool operator() (boost::shared_ptr a, boost::shared_ptr b); }; -class Playlist +class Playlist : public boost::noncopyable { public: Playlist (); - Playlist (boost::shared_ptr); ~Playlist (); void as_xml (xmlpp::Node *); @@ -64,38 +60,33 @@ public: void add (boost::shared_ptr); void remove (boost::shared_ptr); + void remove (ContentList); bool has_subtitles () const; - typedef std::vector > ContentList; - - ContentList content () const { - return _content; - } - - std::string video_digest () const; + ContentList content () const; - int loop () const { - return _loop; - } - - void set_loop (int l); + std::string video_identifier () const; Time length () const; + int best_dcp_frame_rate () const; Time video_end () const; void set_sequence_video (bool); + void maybe_sequence_video (); + + void repeat (ContentList, int); mutable boost::signals2::signal Changed; - mutable boost::signals2::signal, int)> ContentChanged; + /** Third parameter is true if signals are currently being emitted frequently */ + mutable boost::signals2::signal, int, bool)> ContentChanged; private: - void content_changed (boost::weak_ptr, int); + void content_changed (boost::weak_ptr, int, bool); void reconnect (); ContentList _content; - int _loop; bool _sequence_video; bool _sequencing_video; std::list _content_connections;