Add some old ffmpeg apis. frome qmmp. TO be continue

This commit is contained in:
wang-bin
2013-01-07 20:15:54 +08:00
parent 16cb6dd37e
commit 12e9bcb685
+16 -1
View File
@@ -19,7 +19,6 @@
#ifndef QTAV_COMPAT_H
#define QTAV_COMPAT_H
#include <qglobal.h>
#ifdef __cplusplus
extern "C"
{
@@ -33,6 +32,12 @@ extern "C"
}
#endif //__cplusplus
#ifndef AV_VERSION_INT
#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
#endif //AV_VERSION_INT
void ffmpeg_version_print();
//TODO: libav
//avutil: error.h
#ifndef av_err2str
@@ -70,4 +75,14 @@ av_always_inline char* av_err2str(int errnum)
*/
#endif //av_err2str
#if (LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(52,23,0))
#define avcodec_decode_audio3(avctx, samples, frame_size_ptr, avpkt) \
avcodec_decode_audio2(avctx, samples, frame_size_ptr, (*avpkt).data, (*avpkt).size);
#endif
#if (LIBAVCODEC_VERSION_INT <= AV_VERSION_INT(52,101,0))
#define av_dump_format(...) dump_format(__VA_ARGS__)
#endif
#endif