diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-23 17:18:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-23 17:18:49 +0100 |
| commit | 64a2f1bb6a7b972607fa363631ef7a47444e8217 (patch) | |
| tree | 020c028a93f113e372e70f485857ce04dea5db3d /src/lib/null_content.cc | |
| parent | 8c6fe8e1e8c8f6d5932606f2a5b6e1b87681ae38 (diff) | |
Various bits and pieces.
Diffstat (limited to 'src/lib/null_content.cc')
| -rw-r--r-- | src/lib/null_content.cc | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/src/lib/null_content.cc b/src/lib/null_content.cc index 0e275a393..0084972c2 100644 --- a/src/lib/null_content.cc +++ b/src/lib/null_content.cc @@ -17,12 +17,32 @@ */ -NullContent::NullContent (Time s, Time len, shared_ptr<const Film> f) - : Content (s) - , VideoContent (s, f->time_to_video_frames (len)) - , AudioContent (s) +#include "null_content.h" +#include "film.h" + +using boost::shared_ptr; + +NullContent::NullContent (shared_ptr<const Film> f, Time s, Time len) + : Content (f, s) + , VideoContent (f, s, f->time_to_video_frames (len)) + , AudioContent (f, s) , _audio_length (f->time_to_audio_frames (len)) - , _content_audio_frame_rate (f->dcp_audio_frame_rate ()) + , _length (len) +{ + +} + +int +NullContent::content_audio_frame_rate () const { + return output_audio_frame_rate (); +} + +int +NullContent::output_audio_frame_rate () const +{ + shared_ptr<const Film> film = _film.lock (); + assert (film); + return film->dcp_audio_frame_rate (); } |
