| 35 | } |
| 36 | |
| 37 | void Timecode::total_frames(const unsigned int f) { |
| 38 | const unsigned int nominal_fps = nominal_framerate(); |
| 39 | unsigned int frame_input = f % max_frames(); |
| 40 | |
| 41 | if (drop_frame_ && (nominal_fps == 30 || nominal_fps == 60)) { |
| 42 | |
| 43 | // see note below |
| 44 | const int drop_count = nominal_fps / 15; |
| 45 | for (unsigned int min = 0; min * nominal_framerate() * 60 <= frame_input; min++) { |
| 46 | if (min % 10) |
| 47 | frame_input += drop_count; |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | frames_ = frame_input % nominal_fps; |
| 52 | seconds_ = (frame_input / nominal_fps) % 60; |
| 53 | minutes_ = ((frame_input / nominal_fps) / 60) % 60; |
| 54 | hours_ = ((frame_input / nominal_fps) / 60 / 60); |
| 55 | } |
| 56 | |
| 57 | |
| 58 | void Timecode::set_timecode(const std::string &timecode) { |
no outgoing calls