Commit 8f8f497d authored by michael's avatar michael

time_base description by Rich Felker | dalias, aerifal cx


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4536 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent cce38030
...@@ -732,14 +732,17 @@ typedef struct AVCodecContext { ...@@ -732,14 +732,17 @@ typedef struct AVCodecContext {
void *extradata; void *extradata;
int extradata_size; int extradata_size;
/* video only */
/** /**
* time base in which the timestamps are specified. * this is the fundamental unit of time (in seconds) in terms
* of which frame timestamps are represented. for fixed-fps content,
* timebase should be 1/framerate and timestamp increments should be
* identically 1.
* - encoding: MUST be set by user * - encoding: MUST be set by user
* - decoding: set by lavc. * - decoding: set by lavc.
*/ */
AVRational time_base; AVRational time_base;
/* video only */
/** /**
* picture width / height. * picture width / height.
* - encoding: MUST be set by user. * - encoding: MUST be set by user.
......
...@@ -229,6 +229,13 @@ typedef struct AVStream { ...@@ -229,6 +229,13 @@ typedef struct AVStream {
int codec_info_nb_frames; int codec_info_nb_frames;
/* encoding: PTS generation when outputing stream */ /* encoding: PTS generation when outputing stream */
AVFrac pts; AVFrac pts;
/**
* this is the fundamental unit of time (in seconds) in terms
* of which frame timestamps are represented. for fixed-fps content,
* timebase should be 1/framerate and timestamp increments should be
* identically 1.
*/
AVRational time_base; AVRational time_base;
int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */ int pts_wrap_bits; /* number of bits in pts (used for wrapping control) */
/* ffmpeg.c private use */ /* ffmpeg.c private use */
......
...@@ -199,7 +199,10 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id) ...@@ -199,7 +199,10 @@ AVStream *add_video_stream(AVFormatContext *oc, int codec_id)
/* resolution must be a multiple of two */ /* resolution must be a multiple of two */
c->width = 352; c->width = 352;
c->height = 288; c->height = 288;
/* frames per second */ /* time base: this is the fundamental unit of time (in seconds) in terms
of which frame timestamps are represented. for fixed-fps content,
timebase should be 1/framerate and timestamp increments should be
identically 1. */
c->time_base.den = STREAM_FRAME_RATE; c->time_base.den = STREAM_FRAME_RATE;
c->time_base.num = 1; c->time_base.num = 1;
c->gop_size = 12; /* emit one intra frame every twelve frames at most */ c->gop_size = 12; /* emit one intra frame every twelve frames at most */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment