1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #ifndef __FFMPEG_API_ADAPTER_H__
- #define __FFMPEG_API_ADAPTER_H__
- #define av_always_inline __inline
- #define inline __inline
- #include <libavutil/avutil.h>
- #include <libavcodec/avcodec.h>
- #include <libswscale/swscale.h>
- #include "libavutil/opt.h"
- #include "libavutil/imgutils.h"
- #include "libavutil/pixfmt.h"
- #define API_MODE_OLD 0 /* old method, deprecated */
- #define API_MODE_NEW_API_REF_COUNT 1 /* new method, using the frame reference counting */
- #define API_MODE_NEW_API_NO_REF_COUNT 2 /* new method, without reference counting */
- #define API_MODE API_MODE_NEW_API_NO_REF_COUNT
- #if API_MODE == API_MODE_OLD
- #else
- #define FF_INPUT_BUFFER_PADDING_SIZE AV_INPUT_BUFFER_PADDING_SIZE
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define PIX_FMT_YUV420P AV_PIX_FMT_YUV420P
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define PIX_FMT_RGB24 AV_PIX_FMT_RGB24
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define PIX_FMT_BGR24 AV_PIX_FMT_BGR24
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define CODEC_ID_H264 AV_CODEC_ID_H264
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define CODEC_FLAG_LOW_DELAY AV_CODEC_FLAG_LOW_DELAY
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define CODEC_FLAG_GLOBAL_HEADER AV_CODEC_FLAG_GLOBAL_HEADER
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define CODEC_FLAG_PASS1 AV_CODEC_FLAG_PASS1
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define CODEC_FLAG2_LOCAL_HEADER AV_CODEC_FLAG2_LOCAL_HEADER
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define avcodec_alloc_frame av_frame_alloc
- #endif
- #if API_MODE == API_MODE_OLD
- #else
- #define avcodec_free_frame av_frame_free
- #endif
- #endif
|