Blender  V3.3
Functions
BLI_timecode.h File Reference
#include "BLI_compiler_attrs.h"

Go to the source code of this file.

Functions

size_t BLI_timecode_string_from_time (char *str, size_t maxncpy, int brevity_level, float time_seconds, double fps, short timecode_style) ATTR_NONNULL()
 
size_t BLI_timecode_string_from_time_simple (char *str, size_t maxncpy, double time_seconds) ATTR_NONNULL()
 
size_t BLI_timecode_string_from_time_seconds (char *str, size_t maxncpy, int brevity_level, float time_seconds) ATTR_NONNULL()
 

Function Documentation

◆ BLI_timecode_string_from_time()

size_t BLI_timecode_string_from_time ( char *  str,
size_t  maxncpy,
int  brevity_level,
float  time_seconds,
double  fps,
short  timecode_style 
)

Generate time-code/frame number string and store in str

Parameters
strdestination string
maxncpymaximum number of characters to copy sizeof(str)
brevity_levelspecial setting for View2D grid drawing, used to specify how detailed we need to be
time_secondstime total time in seconds
fpsframes per second, typically from the FPS macro
timecode_styleenum from eTimecodeStyles
Returns
length of str

Definition at line 22 of file timecode.c.

References BLI_snprintf_rlen(), fmodf, round_fl_to_int(), str, time, USER_TIMECODE_MILLISECONDS, USER_TIMECODE_MINIMAL, USER_TIMECODE_SECONDS_ONLY, USER_TIMECODE_SMPTE_FULL, USER_TIMECODE_SMPTE_MSF, and USER_TIMECODE_SUBRIP.

Referenced by get_current_time_str(), sequencer_export_subtitles_exec(), stampdata(), and view_to_string__time().

◆ BLI_timecode_string_from_time_seconds()

size_t BLI_timecode_string_from_time_seconds ( char *  str,
size_t  maxncpy,
int  brevity_level,
float  time_seconds 
)

Generate time string and store in str

Parameters
strdestination string
maxncpymaximum number of characters to copy sizeof(str)
brevity_levelspecial setting for View2D grid drawing, used to specify how detailed we need to be
time_secondstime total time in seconds
Returns
length of str
Note
in some cases this is used to print non-seconds values.

Definition at line 191 of file timecode.c.

References BLI_snprintf_rlen(), round_fl_to_int(), and str.

◆ BLI_timecode_string_from_time_simple()

size_t BLI_timecode_string_from_time_simple ( char *  str,
size_t  maxncpy,
double  time_seconds 
)

Generate time string and store in str

Parameters
strdestination string
maxncpymaximum number of characters to copy sizeof(str)
time_secondstime total time in seconds
Returns
length of str

Definition at line 169 of file timecode.c.

References BLI_snprintf_rlen(), min, and str.

Referenced by do_write_image_or_movie(), make_renderinfo_string(), progress_tooltip_func(), stampdata(), and stats_background().