diff options
author | Siddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in> | 2021-12-17 16:01:32 +0300 |
---|---|---|
committer | Siddhartha Jejurkar <f20180617@goa.bits-pilani.ac.in> | 2021-12-17 16:01:32 +0300 |
commit | dbc41b30f88b96f7d8c6e995b17f5930eb55cc77 (patch) | |
tree | c6c495328443ea3621e5df2ef483b0e0dd504496 /source/blender/blenlib/BLI_timecode.h | |
parent | 99a2af76d10e05a18987be5d554ada197b1ca086 (diff) | |
parent | 7c9e4099854a4fc8eab4db97173c1aacd25f9e08 (diff) |
Merge branch 'master' into soc-2021-uv-edge-select-supportsoc-2021-uv-edge-select-support
Diffstat (limited to 'source/blender/blenlib/BLI_timecode.h')
-rw-r--r-- | source/blender/blenlib/BLI_timecode.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_timecode.h b/source/blender/blenlib/BLI_timecode.h index 5dfd9089598..4eec8aef245 100644 --- a/source/blender/blenlib/BLI_timecode.h +++ b/source/blender/blenlib/BLI_timecode.h @@ -29,17 +29,49 @@ extern "C" { #endif +/** + * Generate time-code/frame number string and store in \a str + * + * \param str: destination string + * \param maxncpy: maximum number of characters to copy `sizeof(str)` + * \param brevity_level: special setting for #View2D grid drawing, + * used to specify how detailed we need to be + * \param time_seconds: time total time in seconds + * \param fps: frames per second, typically from the #FPS macro + * \param timecode_style: enum from #eTimecodeStyles + * \return length of \a str + */ size_t BLI_timecode_string_from_time(char *str, const size_t maxncpy, const int brevity_level, const float time_seconds, - const double scene_fps, + const double fps, const short timecode_style) ATTR_NONNULL(); +/** + * Generate time string and store in \a str + * + * \param str: destination string + * \param maxncpy: maximum number of characters to copy `sizeof(str)` + * \param time_seconds: time total time in seconds + * \return length of \a str + */ size_t BLI_timecode_string_from_time_simple(char *str, const size_t maxncpy, const double time_seconds) ATTR_NONNULL(); +/** + * Generate time string and store in \a str + * + * \param str: destination string + * \param maxncpy: maximum number of characters to copy `sizeof(str)` + * \param brevity_level: special setting for #View2D grid drawing, + * used to specify how detailed we need to be + * \param time_seconds: time total time in seconds + * \return length of \a str + * + * \note in some cases this is used to print non-seconds values. + */ size_t BLI_timecode_string_from_time_seconds(char *str, const size_t maxncpy, const int brevity_level, |