diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-01-05 01:24:19 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-01-05 01:24:19 +0000 |
| commit | 5ee3348142f4cfafdbcf2c9c833843d717affc11 (patch) | |
| tree | 1c97c80eeccc6b5f515a611e35dee35b21d3b09b /src/resource.h | |
| parent | 740938890d95e853cf13d4780a5d674c3d6c7f6f (diff) | |
Various IMF hacks.imf
Diffstat (limited to 'src/resource.h')
| -rw-r--r-- | src/resource.h | 17 |
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; }; |
