00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00028 #ifndef AVCODEC_TIMECODE_H
00029 #define AVCODEC_TIMECODE_H
00030
00031 #include "version.h"
00032
00033 #if FF_API_OLD_TIMECODE
00034
00035 #include <stdint.h>
00036 #include "avcodec.h"
00037 #include "libavutil/rational.h"
00038
00039 #define TIMECODE_OPT(ctx, flags) \
00040 "timecode", "set timecode value following hh:mm:ss[:;.]ff format, " \
00041 "use ';' or '.' before frame number for drop frame", \
00042 offsetof(ctx, tc.str), \
00043 AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, flags
00044
00045 struct ff_timecode {
00046 char *str;
00047 int start;
00048 int drop;
00049 AVRational rate;
00050 };
00051
00058 int avpriv_framenum_to_drop_timecode(int frame_num);
00059
00067 uint32_t avpriv_framenum_to_smpte_timecode(unsigned frame, int fps, int drop);
00068
00080 char *avpriv_timecode_to_string(char *buf, const struct ff_timecode *tc, unsigned frame);
00081
00087 int avpriv_check_timecode_rate(void *avcl, AVRational rate, int drop);
00088
00099 int avpriv_init_smpte_timecode(void *avcl, struct ff_timecode *tc);
00100
00101 attribute_deprecated int ff_framenum_to_drop_timecode(int frame_num);
00102 attribute_deprecated uint32_t ff_framenum_to_smtpe_timecode(unsigned frame, int fps, int drop);
00103 attribute_deprecated int ff_init_smtpe_timecode(void *avcl, struct ff_timecode *tc);
00104 #endif
00105
00106 #endif