summaryrefslogtreecommitdiff
path: root/src/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/resource.h')
-rw-r--r--src/resource.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/resource.h b/src/resource.h
index f75d03fc..d762fac3 100644
--- a/src/resource.h
+++ b/src/resource.h
@@ -18,6 +18,7 @@
*/
#include "object.h"
+#include "ref.h"
#include <libcxml/cxml.h>
namespace dcp {
@@ -27,7 +28,23 @@ class Resource : public Object
public:
Resource (cxml::ConstNodePtr node);
+ /** @return a Ref to our actual asset */
+ Ref const & asset_ref () const {
+ return _asset_ref;
+ }
+
+ /** @return a Ref to our actual asset */
+ Ref & asset_ref () {
+ return _asset_ref;
+ }
+
+ template <class T>
+ boost::shared_ptr<T> asset () {
+ return boost::dynamic_pointer_cast<T> (_asset_ref.asset ());
+ }
+
private:
+ Ref _asset_ref;
int64_t _intrinsic_duration;
int64_t _entry_point;
};