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

Method set_timecode

src/utility/src/timecode.cpp:58–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58void Timecode::set_timecode(const std::string &timecode) {
59 unsigned int h, m, s, f;
60
61 if (sscanf(timecode.c_str(), "%2u%*1c%2u%*1c%2u%*1c%2u", &h, &m, &s, &f) == 4) {
62 hours_ = h;
63 minutes_ = m;
64 seconds_ = s;
65 frames_ = f;
66 } else {
67 throw std::invalid_argument("Invalid string passed.");
68 }
69}
70
71unsigned int Timecode::nominal_framerate() const {
72 int nominal_fps = static_cast<int>(frame_rate_);

Callers 6

add_media_with_audioMethod · 0.45
add_output_to_sessionMethod · 0.45
TESTFunction · 0.45

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.36