MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/xstudio / total_frames

Method total_frames

src/utility/src/timecode.cpp:37–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void 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
58void Timecode::set_timecode(const std::string &timecode) {

Callers 15

ClipActorMethod · 0.80
message_handlerMethod · 0.80
register_timecode_classFunction · 0.80
TESTFunction · 0.80
max_framesMethod · 0.80
operator+Method · 0.80
operator-Method · 0.80
operator==Method · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64