diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-12 16:25:57 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-12 16:25:57 +0000 |
commit | 5a8e83e0deef37e2973879a46af21487912b2c59 (patch) | |
tree | 7d5726db162a0e6966302f02b3bf541515fc5b4c /libs/timecode | |
parent | bce3184ff5383f47675a97a8184f7739552cb04e (diff) |
move TC FPS up into status bar, use lower right of timecode audioclock mode for something ... TBDiscussed
git-svn-id: svn://localhost/ardour2/branches/3.0@13257 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/timecode')
-rw-r--r-- | libs/timecode/src/time.cc | 51 | ||||
-rw-r--r-- | libs/timecode/timecode/time.h | 2 |
2 files changed, 53 insertions, 0 deletions
diff --git a/libs/timecode/src/time.cc b/libs/timecode/src/time.cc index 6dc123624b..cc687d492b 100644 --- a/libs/timecode/src/time.cc +++ b/libs/timecode/src/time.cc @@ -526,6 +526,57 @@ timecode_has_drop_frames(TimecodeFormat t) return false; } +std::string +timecode_format_name (TimecodeFormat const t) +{ + switch (t) { + case timecode_23976: + return "23.98"; + + break; + case timecode_24: + return "24"; + + break; + case timecode_24976: + return "24.98"; + + break; + case timecode_25: + return "25"; + + break; + case timecode_2997: + return "29.97"; + + break; + case timecode_2997drop: + return "29.97 drop"; + + break; + case timecode_30: + return "30"; + + break; + case timecode_30drop: + return "30 drop"; + + break; + case timecode_5994: + return "59.94"; + + break; + case timecode_60: + return "60"; + + break; + default: + break; + } + + return "??"; +} + } // namespace Timecode std::ostream& diff --git a/libs/timecode/timecode/time.h b/libs/timecode/timecode/time.h index 090d3851fb..7d77da1213 100644 --- a/libs/timecode/timecode/time.h +++ b/libs/timecode/timecode/time.h @@ -100,6 +100,8 @@ void hours_floor (Time& timecode); float timecode_to_frames_per_second(TimecodeFormat const t); bool timecode_has_drop_frames(TimecodeFormat const t); +std::string timecode_format_name (TimecodeFormat const t); + } // namespace Timecode std::ostream& operator<< (std::ostream& ostr, const Timecode::Time& t); |