mirror of
https://github.com/wang-bin/QtAV.git
synced 2026-10-28 19:16:48 +08:00
Add some old ffmpeg apis. frome qmmp. TO be continue
This commit is contained in:
+16
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user