libavcodec/timecode.h File Reference

Timecode helpers header. More...

#include <stdint.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 ff_framenum_to_drop_timecode (int frame_num)
 Adjust frame number for NTSC drop frame time code.
uint32_t ff_framenum_to_smtpe_timecode (unsigned frame, int fps, int drop)
 Convert frame id (timecode) to SMPTE 12M binary representation.
int ff_init_smtpe_timecode (void *avcl, struct ff_timecode *tc)
 Parse SMTPE 12M time representation (hh:mm:ss[:;.


Detailed Description

Timecode helpers header.

Definition in file timecode.h.


Define Documentation

#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 33 of file timecode.h.


Function Documentation

int ff_framenum_to_drop_timecode ( int  frame_num  ) 

Adjust frame number for NTSC drop frame time code.

Parameters:
frame_num Actual frame number to adjust
Returns:
Adjusted frame number
Warning:
Adjustment is only valid in NTSC 29.97

Definition at line 31 of file timecode.c.

Referenced by dv_write_pack(), mpeg1_encode_sequence_header(), and mxf_write_system_item().

uint32_t ff_framenum_to_smtpe_timecode ( unsigned  frame,
int  fps,
int  drop 
)

Convert frame id (timecode) to SMPTE 12M binary representation.

Parameters:
frame Frame number
fps Frame rate
drop Drop flag
Returns:
The actual binary representation

Definition at line 40 of file timecode.c.

Referenced by dv_write_pack(), and mxf_write_system_item().

int ff_init_smtpe_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.

Parameters:
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
Returns:
0 on success, negative value on failure
Warning:
Adjustement is only valid in NTSC 29.97

Definition at line 58 of file timecode.c.

Referenced by dv_write_header(), encode_init(), and mxf_write_header().


Generated on Fri Oct 26 02:43:49 2012 for FFmpeg by  doxygen 1.5.8