all repos — mgba @ d20b2e1e2302460dea1b17996a85cbd8f253fcbb

mGBA Game Boy Advance Emulator

src/feature/ffmpeg/ffmpeg-common.h (view raw)

 1/* Copyright (c) 2013-2020 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef FFMPEG_COMMON
 7#define FFMPEG_COMMON
 8
 9#include <mgba-util/common.h>
10
11CXX_GUARD_START
12
13#include <libavformat/avformat.h>
14#include <libavcodec/version.h>
15
16// Version 57.16 in FFmpeg
17#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 37, 100)
18#define FFMPEG_USE_PACKETS
19#endif
20
21// Version 57.15 in libav
22#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 35, 0)
23#define FFMPEG_USE_NEW_BSF
24#endif
25
26// Version 57.14 in libav
27#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 48, 0)
28#define FFMPEG_USE_CODECPAR
29#endif
30
31#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 8, 0)
32#define FFMPEG_USE_PACKET_UNREF
33#endif
34
35CXX_GUARD_END
36
37#endif