

*/ #include "FFmpegVideoDecoder.h" #include "FFmpegLog.h" #include "ImageContainer.h" #include "MP4Decoder.h" #include "MediaInfo.h" #include "VideoUtils.h" #include "VPXDecoder.h" #include "mozilla/layers/KnowsCompositor.h" #if LIBAVCODEC_VERSION_MAJOR >= 57 # include "mozilla/layers/TextureClient.h" #endif #if LIBAVCODEC_VERSION_MAJOR >= 58 # include "mozilla/ProfilerMarkers.h" #endif #ifdef MOZ_WAYLAND_USE_VAAPI # include "H264.h" # include "mozilla/layers/DMABUFSurfaceImage.h" # include "mozilla/widget/DMABufLibWrapper.h" # include "FFmpegVideoFramePool.h" # include "va/va.h" #endif #if defined(MOZ_AV1) & defined(MOZ_WAYLAND) & \ (defined(FFVPX_VERSION) || LIBAVCODEC_VERSION_MAJOR >= 59) # define FFMPEG_AV1_DECODE 1 # include "AOMDecoder.h" #endif #include "libavutil/pixfmt.h" #if LIBAVCODEC_VERSION_MAJOR 58 # define AV_PIX_FMT_VAAPI_VLD AV_PIX_FMT_VAAPI #endif #include "mozilla/PodOperations.h" #include "mozilla/StaticPrefs_gfx.h" #include "mozilla/StaticPrefs_media.h" #include "mozilla/TaskQueue.h" #include "nsThreadUtils.h" #include "prsystem.h" #ifdef XP_WIN # include "mozilla/gfx/DeviceManagerDx.h" # include "mozilla/gfx/gfxVars.h" #endif // Forward declare from va.h #ifdef MOZ_WAYLAND_USE_VAAPI typedef int VAStatus # define VA_EXPORT_SURFACE_READ_ONLY 0x0001 # define VA_EXPORT_SURFACE_SEPARATE_LAYERS 0x0004 # define VA_STATUS_SUCCESS 0x00000000 #endif // Use some extra HW frames for potential rendering lags. If a copy of the MPL was not distributed with this * file, You can obtain one at. * -*- Mode: C++ tab-width: 2 indent-tabs-mode: nil c-basic-offset: 2 -*- */ /* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v.
