2 Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef DCPOMATIC_FRAME_RATE_CHANGE_H
21 #define DCPOMATIC_FRAME_RATE_CHANGE_H
25 struct FrameRateChange
27 FrameRateChange (float, int);
29 /** @return factor by which to multiply a source frame rate
30 to get the effective rate after any skip or repeat has happened.
32 float factor () const {
43 /** true to skip every other frame */
45 /** number of times to use each frame (e.g. 1 is normal, 2 means repeat each frame once, and so on) */
47 /** true if this DCP will run its video faster or slower than the source
48 * without taking into account `repeat' nor `skip'.
49 * (e.g. change_speed will be true if
50 * source is 29.97fps, DCP is 30fps
51 * source is 14.50fps, DCP is 30fps
53 * source is 15.00fps, DCP is 30fps
54 * source is 12.50fps, DCP is 25fps)
58 /** Amount by which the video is being sped-up in the DCP; e.g. for a
59 * 24fps source in a 25fps DCP this would be 25/24.
63 std::string description () const;