Go to the documentation of this file.
27 #ifndef AVUTIL_TIMECODE_H
28 #define AVUTIL_TIMECODE_H
33 #define AV_TIMECODE_STR_SIZE 23
char * av_timecode_make_string(const AVTimecode *tc, char *buf, int framenum)
Load timecode string in buf.
uint32_t flags
flags such as drop frame, +24 hours support, ...
int av_timecode_adjust_ntsc_framenum2(int framenum, int fps)
Adjust frame number for NTSC drop frame time code.
char * av_timecode_make_mpeg_tc_string(char *buf, uint32_t tc25bit)
Get the timecode string from the 25-bit timecode format (MPEG GOP format).
static void frame_start(MpegEncContext *s)
uint32_t av_timecode_get_smpte_from_framenum(const AVTimecode *tc, int framenum)
Convert frame number to SMPTE 12M binary representation.
int start
timecode frame start (first base frame number)
char * av_timecode_make_smpte_tc_string2(char *buf, AVRational rate, uint32_t tcsmpte, int prevent_df, int skip_field)
Get the timecode string from the SMPTE timecode format.
#define ss(width, name, subs,...)
int av_timecode_init_from_string(AVTimecode *tc, AVRational rate, const char *str, void *log_ctx)
Parse timecode representation (hh:mm:ss[:;.
int av_timecode_init_from_components(AVTimecode *tc, AVRational rate, int flags, int hh, int mm, int ss, int ff, void *log_ctx)
Init a timecode struct from the passed timecode components.
Rational number (pair of numerator and denominator).
unsigned fps
frame per second; must be consistent with the rate field
AVRational rate
frame rate in rational form
@ AV_TIMECODE_FLAG_24HOURSMAX
timecode wraps after 24 hours
@ AV_TIMECODE_FLAG_ALLOWNEGATIVE
negative time values are allowed
@ AV_TIMECODE_FLAG_DROPFRAME
timecode is drop frame
uint32_t av_timecode_get_smpte(AVRational rate, int drop, int hh, int mm, int ss, int ff)
Convert sei info to SMPTE 12M binary representation.
char * av_timecode_make_smpte_tc_string(char *buf, uint32_t tcsmpte, int prevent_df)
Get the timecode string from the SMPTE timecode format.
int av_timecode_check_frame_rate(AVRational rate)
Check if the timecode feature is available for the given frame rate.
#define flags(name, subs,...)
int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start, void *log_ctx)
Init a timecode struct with the passed parameters.