diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-01-16 21:45:41 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-01-16 21:45:41 +0000 |
| commit | c7292767fe4935da750423461a41224b3e0a8e37 (patch) | |
| tree | 1cd8a46c0cbd7a7c8364c3f45abe412c3c6c3c15 /src/lib/util.h | |
| parent | 7cdd53cd8de4a2c84c7ccbf1c4aa47520bc3c7b1 (diff) | |
Give DCPFrameRate a constructor. Add repeat member and cleverer dcp frame rate calculations.
Diffstat (limited to 'src/lib/util.h')
| -rw-r--r-- | src/lib/util.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/lib/util.h b/src/lib/util.h index 024c40fb5..50e7410d6 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -61,14 +61,22 @@ typedef int SourceFrame; struct DCPFrameRate { + DCPFrameRate (float); + /** frames per second for the DCP */ int frames_per_second; - /** Skip every `skip' frames. e.g. if this is 1, we skip nothing; - * if it's 2, we skip every other frame. - */ - int skip; + /** true to skip every other frame */ + bool skip; + /** true to repeat every frame once */ + bool repeat; /** true if this DCP will run its video faster than the source - * (e.g. if the source is 29.97fps and we will run the DCP at 30fps) + * without taking into account `skip' and `repeat'. + * (i.e. run_fast will be true if + * source is 29.97fps, DCP is 30fps + * source is 14.50fps, DCP is 30fps + * but not if + * source is 15.00fps, DCP is 30fps + * source is 12.50fps, DCP is 25fps) */ bool run_fast; }; @@ -183,7 +191,6 @@ struct Rect extern std::string crop_string (Position, Size); extern int dcp_audio_sample_rate (int); -extern DCPFrameRate dcp_frame_rate (float); extern int dcp_audio_channels (int); extern std::string colour_lut_index_to_name (int index); extern int stride_round_up (int, int const *, int); |
