#include <stdint.h>
#include "avcodec.h"
#include "libavutil/rational.h"
Go to the source code of this file.
Data Structures | |
struct | ff_timecode |
Defines | |
#define | TIMECODE_OPT(ctx, flags) |
Functions | |
int | avpriv_framenum_to_drop_timecode (int frame_num) |
Adjust frame number for NTSC drop frame time code. | |
uint32_t | avpriv_framenum_to_smpte_timecode (unsigned frame, int fps, int drop) |
Convert frame id (timecode) to SMPTE 12M binary representation. | |
char * | avpriv_timecode_to_string (char *buf, const struct ff_timecode *tc, unsigned frame) |
Load timecode string in buf. | |
int | avpriv_check_timecode_rate (void *avcl, AVRational rate, int drop) |
Check if timecode rate is valid and consistent with the drop flag. | |
int | avpriv_init_smpte_timecode (void *avcl, struct ff_timecode *tc) |
Parse SMTPE 12M time representation (hh:mm:ss[:;. | |
attribute_deprecated int | ff_framenum_to_drop_timecode (int frame_num) |
attribute_deprecated uint32_t | ff_framenum_to_smtpe_timecode (unsigned frame, int fps, int drop) |
attribute_deprecated int | ff_init_smtpe_timecode (void *avcl, struct ff_timecode *tc) |
Definition in file timecode.h.
#define TIMECODE_OPT | ( | ctx, | |||
flags | ) |
Value:
"timecode", "set timecode value following hh:mm:ss[:;.]ff format, " \ "use ';' or '.' before frame number for drop frame", \ offsetof(ctx, tc.str), \ AV_OPT_TYPE_STRING, {.str=NULL}, CHAR_MIN, CHAR_MAX, flags
Definition at line 34 of file timecode.h.
int avpriv_check_timecode_rate | ( | void * | avcl, | |
AVRational | rate, | |||
int | drop | |||
) |
Check if timecode rate is valid and consistent with the drop flag.
Definition at line 58 of file timecode.c.
Referenced by avpriv_init_smpte_timecode(), and parse_timecode_in_framenum_format().
int avpriv_framenum_to_drop_timecode | ( | int | frame_num | ) |
Adjust frame number for NTSC drop frame time code.
frame_num | Actual frame number to adjust |
Definition at line 31 of file timecode.c.
Referenced by avpriv_timecode_to_string(), dv_write_pack(), ff_framenum_to_drop_timecode(), mpeg1_encode_sequence_header(), and mxf_write_system_item().
uint32_t avpriv_framenum_to_smpte_timecode | ( | unsigned | frame, | |
int | fps, | |||
int | drop | |||
) |
Convert frame id (timecode) to SMPTE 12M binary representation.
Definition at line 40 of file timecode.c.
Referenced by dv_write_pack(), ff_framenum_to_smtpe_timecode(), and mxf_write_system_item().
int avpriv_init_smpte_timecode | ( | void * | avcl, | |
struct ff_timecode * | tc | |||
) |
Parse SMTPE 12M time representation (hh:mm:ss[:;.
]ff). str and rate fields from tc struct must be set.
avcl | A pointer to an arbitrary struct of which the first field is a pointer to an AVClass struct (used for av_log). | |
tc | Timecode struct pointer |
Definition at line 104 of file timecode.c.
Referenced by dv_write_header(), encode_init(), ff_init_smtpe_timecode(), init(), and mxf_write_header().
char* avpriv_timecode_to_string | ( | char * | buf, | |
const struct ff_timecode * | tc, | |||
unsigned | frame | |||
) |
Load timecode string in buf.
buf | Destination buffer | |
tc | Timecode struct pointer | |
frame | Frame id (timecode frame is computed with tc->start+frame) |
buf must have enough space to store the timecode representation: 16 bytes is the minimum required size.
Definition at line 82 of file timecode.c.
Referenced by draw_text(), and parse_timecode_in_framenum_format().
attribute_deprecated int ff_framenum_to_drop_timecode | ( | int | frame_num | ) |
Definition at line 132 of file timecode.c.
attribute_deprecated uint32_t ff_framenum_to_smtpe_timecode | ( | unsigned | frame, | |
int | fps, | |||
int | drop | |||
) |
Definition at line 137 of file timecode.c.
attribute_deprecated int ff_init_smtpe_timecode | ( | void * | avcl, | |
struct ff_timecode * | tc | |||
) |
Definition at line 142 of file timecode.c.