summaryrefslogtreecommitdiff
path: root/src/lib/content.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-11-22 15:49:54 +0000
committerCarl Hetherington <cth@carlh.net>2013-11-22 15:49:54 +0000
commitaf474db6af17d468b42fbae8bd4c3e80dcfd0588 (patch)
treee7cf2ccb4d14d7121a9a65f5989e4bc66275737d /src/lib/content.h
parent68808da4a0f8c60ac93cd0bbc3ea776d16503a6a (diff)
Make MovingImageContent use Content::_paths rather than its own _files list.
Diffstat (limited to 'src/lib/content.h')
-rw-r--r--src/lib/content.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/content.h b/src/lib/content.h
index ad3e8ff45..5d8100e5d 100644
--- a/src/lib/content.h
+++ b/src/lib/content.h
@@ -48,6 +48,7 @@ public:
class Content : public boost::enable_shared_from_this<Content>, public boost::noncopyable
{
public:
+ Content (boost::shared_ptr<const Film>);
Content (boost::shared_ptr<const Film>, Time);
Content (boost::shared_ptr<const Film>, boost::filesystem::path);
Content (boost::shared_ptr<const Film>, boost::shared_ptr<const cxml::Node>);
@@ -70,6 +71,16 @@ public:
return _paths.front ();
}
+ size_t number_of_paths () const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _paths.size ();
+ }
+
+ boost::filesystem::path path (size_t i) const {
+ boost::mutex::scoped_lock lm (_mutex);
+ return _paths[i];
+ }
+
bool path_valid () const;
/** @return MD5 digest of the content's file(s) */
@@ -126,9 +137,10 @@ protected:
*/
mutable boost::mutex _mutex;
-private:
/** Paths of our data files */
std::vector<boost::filesystem::path> _paths;
+
+private:
std::string _digest;
Time _position;
Time _trim_start;