1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim:set ts=2 sw=2 sts=2 et cindent: */ 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 7 #ifndef __FFmpegLibs_h__ 8 #define __FFmpegLibs_h__ 9 10 extern "C" { 11 #ifdef __GNUC__ 12 # pragma GCC visibility push(default) 13 #endif 14 #include "libavcodec/avcodec.h" 15 #include "libavutil/avutil.h" 16 #include "libavutil/mem.h" 17 #ifdef MOZ_WAYLAND_USE_VAAPI 18 # include "libavutil/hwcontext_vaapi.h" 19 #endif 20 #ifdef __GNUC__ 21 # pragma GCC visibility pop 22 #endif 23 } 24 25 #if LIBAVCODEC_VERSION_MAJOR < 55 26 # define AV_CODEC_ID_VP6F CODEC_ID_VP6F 27 # define AV_CODEC_ID_H264 CODEC_ID_H264 28 # define AV_CODEC_ID_AAC CODEC_ID_AAC 29 # define AV_CODEC_ID_MP3 CODEC_ID_MP3 30 # define AV_CODEC_ID_VP8 CODEC_ID_VP8 31 # define AV_CODEC_ID_NONE CODEC_ID_NONE 32 # define AV_CODEC_ID_FLAC CODEC_ID_FLAC 33 typedef CodecID AVCodecID; 34 #endif 35 #if LIBAVCODEC_VERSION_MAJOR <= 55 36 # define AV_CODEC_FLAG_LOW_DELAY CODEC_FLAG_LOW_DELAY 37 #endif 38 39 #ifdef FFVPX_VERSION 40 enum { LIBAV_VER = FFVPX_VERSION }; 41 #else 42 enum { LIBAV_VER = LIBAVCODEC_VERSION_MAJOR }; 43 #endif 44 45 #endif // __FFmpegLibs_h__ 46