#define FFMPEG_VERSION_INT 0x000408
#define FFMPEG_VERSION "0.4.8"
-#define LIBAVCODEC_BUILD 4706
+#define LIBAVCODEC_BUILD 4707
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION
#define DEFAULT_FRAME_RATE_BASE 1001000
+/**
+ * Used by av_log
+ */
+typedef struct AVCLASS AVClass;
+struct AVCLASS {
+ const char* class_name;
+ const char* (*item_name)(void*); /* actually passing a pointer to an AVCodecContext
+ or AVFormatContext, which begin with an AVClass.
+ Needed because av_log is in libavcodec and has no visibility
+ of AVIn/OutputFormat */
+};
+
/**
* main external api structure.
*/
typedef struct AVCodecContext {
+ /**
+ * Info on struct for av_log
+ * - set by avcodec_alloc_context
+ */
+ AVClass *av_class;
/**
* the average bitrate.
* - encoding: set by user. unused for constant quantizer encoding
* - encoding: unused
* - decoding: set by user, if not set then the native format will always be choosen
*/
- enum PixelFormat (*get_format)(struct AVCodecContext *s, enum PixelFormat * fmt);
+ enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt);
/**
* DTG active format information (additionnal aspect ratio
* the codec may call this to execute several independant things. it will return only after
* finishing all tasks, the user may replace this with some multithreaded implementation, the
* default implementation will execute the parts serially
- * @param count the number of functions this will be identical to thread_count if possible
+ * @param count the number of things to execute
* - encoding: set by lavc, user can override
* - decoding: set by lavc, user can override
*/
const AVOption *options;
struct AVCodec *next;
void (*flush)(AVCodecContext *);
- AVRational *supported_framerates; ///array of supported framerates, or NULL if any, array is terminated by {0,0}
+ const AVRational *supported_framerates; ///array of supported framerates, or NULL if any, array is terminated by {0,0}
} AVCodec;
/**
void *av_realloc(void *ptr, unsigned int size);
void av_free(void *ptr);
char *av_strdup(const char *s);
-void __av_freep(void **ptr);
-#define av_freep(p) __av_freep((void **)(p))
+void av_freep(void *ptr);
void *av_fast_realloc(void *ptr, unsigned int *size, unsigned int min_size);
/* for static data only */
/* call av_free_static to release all staticaly allocated tables */
#define AV_LOG_INFO 1
#define AV_LOG_DEBUG 2
-extern void av_log(AVCodecContext*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
-extern void av_vlog(AVCodecContext*, int level, const char *fmt, va_list);
+extern void av_log(void*, int level, const char *fmt, ...) __attribute__ ((__format__ (__printf__, 3, 4)));
+extern void av_vlog(void*, int level, const char *fmt, va_list);
extern int av_log_get_level(void);
extern void av_log_set_level(int);
-extern void av_log_set_callback(void (*)(AVCodecContext*, int, const char*, va_list));
-
-#undef AV_LOG_TRAP_PRINTF
-#ifdef AV_LOG_TRAP_PRINTF
-#define printf DO NOT USE
-#define fprintf DO NOT USE
-#undef stderr
-#define stderr DO NOT USE
-#endif
+extern void av_log_set_callback(void (*)(void*, int, const char*, va_list));
#ifdef __cplusplus
}