这里先只列出已经用到的部分,便于自己查看(节选自http://blog.csdn.net/leixiaohua1020/article/details/14214859):
- /**
- * the average bitrate
- * - encoding: Set by user; unused for constant quantizer encoding.
- * - decoding: Set by libavcodec. 0 or some bitrate if this info is available in the stream.
- */
- int bit_rate;
- /**
- * 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.
- * - decoding: Set by libavcodec.
- */
- AVRational time_base;
- /* video only */
- /**
- * picture width / height.
- * - encoding: MUST be set by user.
- * - decoding: Set by libavcodec.
- * Note: For compatibility it is possible to set this instead of
- * coded_width/height before decoding.
- */
- int width, height;
- /**
- * Bitstream width / height, may be different from width/height if lowres enabled.
- * - encoding: unused
- * - decoding: Set by user before init if known. Codec should override / dynamically change if needed.
- */
- int coded_width, coded_height;
- /**
- * Pixel format, see AV_PIX_FMT_xxx.
- * May be set by the demuxer if known from headers.
- * May be overridden by the decoder if it knows better.
- * - encoding: Set by user.
- * - decoding: Set by user if known, overridden by libavcodec if known
- */
- enum AVPixelFormat pix_fmt;
- /**
- * Motion estimation algorithm used for video coding.
- * 1 (zero), 2 (full), 3 (log), 4 (phods), 5 (epzs), 6 (x1), 7 (hex),
- * 8 (umh), 9 (iter), 10 (tesa) [7, 8, 10 are x264 specific, 9 is snow specific]
- * - encoding: MUST be set by user.
- * - decoding: unused
- */
- int me_method;