22#ifndef TIMECODE_H_INCLUDED 
   23#define TIMECODE_H_INCLUDED 
   29#include <gavl/gavldefs.h> 
   45#define GAVL_TIMECODE_SIGN_MASK     (0x1LL<<62)  
   46#define GAVL_TIMECODE_INVALID_MASK  (0x1LL<<63)  
   48#define GAVL_TIMECODE_DROP_FRAME (1<<0)  
   50#define GAVL_TIMECODE_UNDEFINED GAVL_TIMECODE_INVALID_MASK  
  172#define GAVL_TIMECODE_STRING_LEN 26  
  192#define GAVL_TIMECODE_STRING_LEN_SHORT 13  
GAVL_PUBLIC void gavl_timecode_prettyprint_short(gavl_timecode_t tc, char str[GAVL_TIMECODE_STRING_LEN_SHORT])
Print a short timecode into a string.
GAVL_PUBLIC gavl_timecode_t gavl_timecode_from_framecount(const gavl_timecode_format_t *tf, int64_t fc)
Get a timecode from the frame count.
GAVL_PUBLIC void gavl_timecode_format_copy(gavl_timecode_format_t *dst, const gavl_timecode_format_t *src)
Copy one timecode format to another.
uint64_t gavl_timecode_t
Typedef for timecodes.
Definition timecode.h:43
GAVL_PUBLIC void gavl_timecode_to_hmsf(gavl_timecode_t tc, int *hours, int *minutes, int *seconds, int *frames)
Extract the time part of the timecode.
GAVL_PUBLIC void gavl_timecode_from_hmsf(gavl_timecode_t *tc, int hours, int minutes, int seconds, int frames)
Set the time part of the timecode.
GAVL_PUBLIC void gavl_timecode_from_ymd(gavl_timecode_t *tc, int year, int month, int day)
Set the date part of the timecode.
GAVL_PUBLIC int64_t gavl_timecode_to_framecount(const gavl_timecode_format_t *tf, gavl_timecode_t tc)
Get the frame count from the timecode.
GAVL_PUBLIC void gavl_timecode_dump(const gavl_timecode_format_t *tf, gavl_timecode_t tc)
Dump a timecode to stderr.
GAVL_PUBLIC void gavl_timecode_prettyprint(const gavl_timecode_format_t *tf, gavl_timecode_t tc, char str[GAVL_TIMECODE_STRING_LEN])
Print a full timecode into a string.
#define GAVL_TIMECODE_STRING_LEN_SHORT
Definition timecode.h:192
GAVL_PUBLIC void gavl_timecode_to_ymd(gavl_timecode_t tc, int *year, int *month, int *day)
Extract the date part of the timecode.
#define GAVL_TIMECODE_STRING_LEN
Definition timecode.h:172