summaryrefslogtreecommitdiff
path: root/libs/timecode/timecode
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2012-10-12 01:08:29 +0000
committerRobin Gareus <robin@gareus.org>2012-10-12 01:08:29 +0000
commita9abe3b1e1a1e260cf1cbf148ab3909a719817d1 (patch)
treee6eb1f71bbd946abff39260a0232dd61b844c9bc /libs/timecode/timecode
parent9116ea83ddc30aebb6bb5a8fa0f4a55be8984ceb (diff)
move TimecodeFormat to libtimecode
provide a way to convert any TimecodeFormat to float frame-rate, not only the currently active timecode_foramt. git-svn-id: svn://localhost/ardour2/branches/3.0@13249 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/timecode/timecode')
-rw-r--r--libs/timecode/timecode/time.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/timecode/timecode/time.h b/libs/timecode/timecode/time.h
index bcb078f3f1..090d3851fb 100644
--- a/libs/timecode/timecode/time.h
+++ b/libs/timecode/timecode/time.h
@@ -32,6 +32,19 @@ enum Wrap {
HOURS
};
+enum TimecodeFormat {
+ timecode_23976,
+ timecode_24,
+ timecode_24976,
+ timecode_25,
+ timecode_2997,
+ timecode_2997drop,
+ timecode_30,
+ timecode_30drop,
+ timecode_5994,
+ timecode_60
+};
+
struct Time {
bool negative;
uint32_t hours;
@@ -84,6 +97,9 @@ void seconds_floor (Time& timecode);
void minutes_floor (Time& timecode);
void hours_floor (Time& timecode);
+float timecode_to_frames_per_second(TimecodeFormat const t);
+bool timecode_has_drop_frames(TimecodeFormat const t);
+
} // namespace Timecode
std::ostream& operator<< (std::ostream& ostr, const Timecode::Time& t);