X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplaylist.h;h=3af17bb6c4794cf3114016eedfba312dcab5576b;hb=6fde557864505b470c438e4161ee494f29b90d63;hp=35709f109d2bf4bb4cbcbd725f61bbce7f7bf3ae;hpb=ad49361b303d1ceff7048fa0e89ba609ca9ce376;p=dcpomatic.git diff --git a/src/lib/playlist.h b/src/lib/playlist.h index 35709f109..3af17bb6c 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -20,36 +20,24 @@ #ifndef DCPOMATIC_PLAYLIST_H #define DCPOMATIC_PLAYLIST_H -#include -#include -#include -#include "ffmpeg_content.h" -#include "audio_mapping.h" #include "util.h" +#include "frame_rate_change.h" +#include +#include +#include +#include -class Content; -class FFmpegContent; -class FFmpegDecoder; -class StillImageMagickContent; -class StillImageMagickDecoder; -class SndfileContent; -class SndfileDecoder; -class Job; class Film; -class Region; - -/** @class Playlist - * @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. - */ struct ContentSorter { bool operator() (boost::shared_ptr a, boost::shared_ptr b); }; +/** @class Playlist + * @brief A set of Content objects with knowledge of how they should be arranged into + * a DCP. + */ class Playlist : public boost::noncopyable { public: @@ -57,7 +45,7 @@ public: ~Playlist (); void as_xml (xmlpp::Node *); - void set_from_xml (boost::shared_ptr, boost::shared_ptr, int); + void set_from_xml (boost::shared_ptr, cxml::ConstNodePtr, int, std::list &); void add (boost::shared_ptr); void remove (boost::shared_ptr); @@ -65,14 +53,14 @@ public: void move_earlier (boost::shared_ptr); void move_later (boost::shared_ptr); - bool has_subtitles () const; - ContentList content () const; std::string video_identifier () const; DCPTime length () const; - + boost::optional start () const; + int64_t required_disk_space (int j2k_bandwidth, int audio_channels, int audio_frame_rate) const; + int best_dcp_frame_rate () const; DCPTime video_end () const; FrameRateChange active_frame_rate_change (DCPTime, int dcp_frame_rate) const; @@ -82,10 +70,15 @@ public: void repeat (ContentList, int); + /** Emitted when content has been added to or removed from the playlist; implies OrderChanged */ mutable boost::signals2::signal Changed; - /** Third parameter is true if signals are currently being emitted frequently */ + mutable boost::signals2::signal OrderChanged; + /** Emitted when something about a piece of our content has changed; + * these emissions include when the position of the content changes. + * 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, bool); void reconnect ();