diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-04-28 01:20:55 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-04-28 01:20:55 +0100 |
| commit | d487ee606113a2b4bbab1810758e9777792f1cac (patch) | |
| tree | 4e9f29b582e9f0ab097419f27a7fb3b49da25667 /src/lib/playlist.h | |
| parent | f85101ff72bf93ab3546ea0c4ec8e3f1242f256f (diff) | |
Add total-playlist loop option; move state of content list into the Playlist.
Diffstat (limited to 'src/lib/playlist.h')
| -rw-r--r-- | src/lib/playlist.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/lib/playlist.h b/src/lib/playlist.h index 85bde64ff..935bbb2bd 100644 --- a/src/lib/playlist.h +++ b/src/lib/playlist.h @@ -51,8 +51,15 @@ class Playlist { public: Playlist (); + Playlist (boost::shared_ptr<const Playlist>); - void setup (ContentList); + void as_xml (xmlpp::Node *); + void set_from_xml (boost::shared_ptr<const cxml::Node>); + + void add (boost::shared_ptr<Content>); + void remove (boost::shared_ptr<Content>); + void move_earlier (boost::shared_ptr<Content>); + void move_later (boost::shared_ptr<Content>); ContentAudioFrame audio_length () const; int audio_channels () const; @@ -75,6 +82,12 @@ public: return _audio_from; } + ContentList content () const { + return _content; + } + + boost::shared_ptr<FFmpegContent> ffmpeg () const; + std::list<boost::shared_ptr<const VideoContent> > video () const { return _video; } @@ -86,15 +99,24 @@ public: std::string audio_digest () const; std::string video_digest () const; + int loop () const { + return _loop; + } + + void set_loop (int l); + mutable boost::signals2::signal<void ()> Changed; mutable boost::signals2::signal<void (boost::weak_ptr<Content>, int)> ContentChanged; private: + void setup (); void content_changed (boost::weak_ptr<Content>, int); /** where we should get our audio from */ AudioFrom _audio_from; + /** all our content */ + ContentList _content; /** all our content which contains video */ std::list<boost::shared_ptr<const VideoContent> > _video; /** all our content which contains audio. This may contain the same objects @@ -102,5 +124,7 @@ private: */ std::list<boost::shared_ptr<const AudioContent> > _audio; + int _loop; + std::list<boost::signals2::connection> _content_connections; }; |
