summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h29
1 files changed, 12 insertions, 17 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 9efb95ee0a..83514e676d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -17,7 +17,7 @@ extern "C" {
#define FFMPEG_VERSION_INT 0x000409
#define FFMPEG_VERSION "0.4.9-pre1"
-#define LIBAVCODEC_BUILD 4753
+#define LIBAVCODEC_BUILD 4754
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION
@@ -28,6 +28,7 @@ extern "C" {
#define AV_NOPTS_VALUE int64_t_C(0x8000000000000000)
#define AV_TIME_BASE 1000000
+#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
enum CodecID {
CODEC_ID_NONE,
@@ -442,8 +443,8 @@ typedef struct AVPanScan{
int pict_type;\
\
/**\
- * presentation timestamp in AV_TIME_BASE (=micro seconds currently) (time when frame should be shown to user)\
- * if AV_NOPTS_VALUE then the frame_rate will be used as reference\
+ * presentation timestamp in time_base units (time when frame should be shown to user)\
+ * if AV_NOPTS_VALUE then frame_rate = 1/time_base will be assumed\
* - encoding: MUST be set by user\
* - decoding: set by lavc\
*/\
@@ -721,13 +722,11 @@ typedef struct AVCodecContext {
/* video only */
/**
- * frames per sec multiplied by frame_rate_base.
- * for variable fps this is the precission, so if the timestamps
- * can be specified in msec precssion then this is 1000*frame_rate_base
+ * time base in which the timestamps are specified.
* - encoding: MUST be set by user
- * - decoding: set by lavc. 0 or the frame_rate if available
+ * - decoding: set by lavc.
*/
- int frame_rate;
+ AVRational time_base;
/**
* picture width / height.
@@ -1421,15 +1420,6 @@ typedef struct AVCodecContext {
int me_range;
/**
- * frame_rate_base.
- * for variable fps this is 1
- * - encoding: set by user.
- * - decoding: set by lavc.
- * @todo move this after frame_rate
- */
-
- int frame_rate_base;
- /**
* intra quantizer bias.
* - encoding: set by user.
* - decoding: unused
@@ -2244,6 +2234,11 @@ int64_t av_rescale(int64_t a, int64_t b, int64_t c);
*/
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding);
+/**
+ * rescale a 64bit integer by 2 rational numbers.
+ */
+int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq);
+
/* frame parsing */
typedef struct AVCodecParserContext {
void *priv_data;