summaryrefslogtreecommitdiff
path: root/src/lib/playlist.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-21 17:32:28 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-21 17:32:28 +0100
commit2255aedd15f985796d2e6f7fcc7fb412a5d98812 (patch)
tree744d52adfdd226ce5b0220d62612710873fa77f4 /src/lib/playlist.h
parent2de990b0155fcb5c3dac821ef8c2659e903d2f6e (diff)
Various more hacks; basically trying to remove Regions as an unnecessary complexity.
Diffstat (limited to 'src/lib/playlist.h')
-rw-r--r--src/lib/playlist.h32
1 files changed, 8 insertions, 24 deletions
diff --git a/src/lib/playlist.h b/src/lib/playlist.h
index f677f0ad7..e8cac0247 100644
--- a/src/lib/playlist.h
+++ b/src/lib/playlist.h
@@ -41,6 +41,7 @@ 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
@@ -57,6 +58,7 @@ class Playlist
public:
Playlist ();
Playlist (boost::shared_ptr<const Playlist>);
+ ~Playlist ();
void as_xml (xmlpp::Node *);
void set_from_xml (boost::shared_ptr<const cxml::Node>);
@@ -66,30 +68,10 @@ public:
bool has_subtitles () const;
- struct Region
- {
- Region ()
- : time (0)
- {}
-
- Region (boost::shared_ptr<Content> c, Time t, Playlist* p);
- Region (boost::shared_ptr<const cxml::Node>, Playlist* p);
-
- void as_xml (xmlpp::Node *) const;
-
- boost::shared_ptr<Content> content;
- Time time;
- /* XXX: obviously not used for video-only; there should
- really by AudioRegion / VideoRegion etc.
- */
- AudioMapping audio_mapping;
- boost::signals2::connection connection;
- };
-
- typedef std::vector<boost::shared_ptr<Region> > RegionList;
+ typedef std::vector<boost::shared_ptr<Content> > ContentList;
- RegionList regions () const {
- return _regions;
+ ContentList content () const {
+ return _content;
}
std::string audio_digest () const;
@@ -109,9 +91,11 @@ public:
private:
void content_changed (boost::weak_ptr<Content>, int);
+ void reconnect ();
- RegionList _regions;
+ ContentList _content;
int _loop;
+ std::list<boost::signals2::connection> _content_connections;
};
#endif