tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

FFmpegLibs.h (1626B)


      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 #if defined(MOZ_USE_HWDECODE) && defined(MOZ_WIDGET_GTK)
     18 #  include "libavutil/hwcontext_drm.h"
     19 #  include "libavutil/hwcontext_vaapi.h"
     20 #endif
     21 #ifdef __GNUC__
     22 #  pragma GCC visibility pop
     23 #endif
     24 }
     25 
     26 #if LIBAVCODEC_VERSION_MAJOR >= 58
     27 #  include "libavcodec/codec_desc.h"
     28 #endif  // LIBAVCODEC_VERSION_MAJOR >= 58
     29 
     30 #if LIBAVCODEC_VERSION_MAJOR < 55
     31 // This value is not defined in older version of libavcodec
     32 #  define CODEC_ID_OPUS 86076
     33 #  define AV_CODEC_ID_VP6F CODEC_ID_VP6F
     34 #  define AV_CODEC_ID_H264 CODEC_ID_H264
     35 #  define AV_CODEC_ID_AAC CODEC_ID_AAC
     36 #  define AV_CODEC_ID_VORBIS CODEC_ID_VORBIS
     37 #  define AV_CODEC_ID_OPUS CODEC_ID_OPUS
     38 #  define AV_CODEC_ID_MP3 CODEC_ID_MP3
     39 #  define AV_CODEC_ID_VP8 CODEC_ID_VP8
     40 #  define AV_CODEC_ID_NONE CODEC_ID_NONE
     41 #  define AV_CODEC_ID_FLAC CODEC_ID_FLAC
     42 typedef CodecID AVCodecID;
     43 #endif
     44 #if LIBAVCODEC_VERSION_MAJOR <= 55
     45 #  define AV_CODEC_FLAG_LOW_DELAY CODEC_FLAG_LOW_DELAY
     46 #endif
     47 
     48 #ifdef FFVPX_VERSION
     49 enum { LIBAV_VER = FFVPX_VERSION };
     50 #else
     51 enum { LIBAV_VER = LIBAVCODEC_VERSION_MAJOR };
     52 #endif
     53 
     54 #endif  // __FFmpegLibs_h__