From 5ee3348142f4cfafdbcf2c9c833843d717affc11 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 5 Jan 2016 01:24:19 +0000 Subject: Various IMF hacks. --- src/resource.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/resource.h') 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 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 + boost::shared_ptr asset () { + return boost::dynamic_pointer_cast (_asset_ref.asset ()); + } + private: + Ref _asset_ref; int64_t _intrinsic_duration; int64_t _entry_point; }; -- cgit v1.2.3