- //Get Hours, Minutes, Seconds, Frames from timecode
- int hours, minutes, seconds, frames;
-
- hours = duration.section(':', 0, 0).toInt();
- minutes = duration.section(':', 1, 1).toInt();
- if (duration.contains(';')) {
- seconds = duration.section(';', 0, 0).section(':', 2, 2).toInt();
- frames = duration.section(';', 1, 1).toInt();
- } else {
- //Handle Drop Frame timecode frame calculations, even if the timecode supplied uses incorrect "99:99:99:99" format instead of "99:99:99;99"
- seconds = duration.section(':', 2, 2).toInt();
- frames = duration.section(':', 3, 3).toInt();
- }
-