Path: blob/master/dep/ffmpeg/include/libavcodec/d3d11va.h
4216 views
/*1* Direct3D11 HW acceleration2*3* copyright (c) 2009 Laurent Aimar4* copyright (c) 2015 Steve Lhomme5*6* This file is part of FFmpeg.7*8* FFmpeg is free software; you can redistribute it and/or9* modify it under the terms of the GNU Lesser General Public10* License as published by the Free Software Foundation; either11* version 2.1 of the License, or (at your option) any later version.12*13* FFmpeg is distributed in the hope that it will be useful,14* but WITHOUT ANY WARRANTY; without even the implied warranty of15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU16* Lesser General Public License for more details.17*18* You should have received a copy of the GNU Lesser General Public19* License along with FFmpeg; if not, write to the Free Software20* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA21*/2223#ifndef AVCODEC_D3D11VA_H24#define AVCODEC_D3D11VA_H2526/**27* @file28* @ingroup lavc_codec_hwaccel_d3d11va29* Public libavcodec D3D11VA header.30*/3132#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x060233#undef _WIN32_WINNT34#define _WIN32_WINNT 0x060235#endif3637#include <stdint.h>38#include <d3d11.h>3940/**41* @defgroup lavc_codec_hwaccel_d3d11va Direct3D1142* @ingroup lavc_codec_hwaccel43*44* @{45*/4647/**48* This structure is used to provides the necessary configurations and data49* to the Direct3D11 FFmpeg HWAccel implementation.50*51* The application must make it available as AVCodecContext.hwaccel_context.52*53* Use av_d3d11va_alloc_context() exclusively to allocate an AVD3D11VAContext.54*/55typedef struct AVD3D11VAContext {56/**57* D3D11 decoder object58*/59ID3D11VideoDecoder *decoder;6061/**62* D3D11 VideoContext63*/64ID3D11VideoContext *video_context;6566/**67* D3D11 configuration used to create the decoder68*/69D3D11_VIDEO_DECODER_CONFIG *cfg;7071/**72* The number of surface in the surface array73*/74unsigned surface_count;7576/**77* The array of Direct3D surfaces used to create the decoder78*/79ID3D11VideoDecoderOutputView **surface;8081/**82* A bit field configuring the workarounds needed for using the decoder83*/84uint64_t workaround;8586/**87* Private to the FFmpeg AVHWAccel implementation88*/89unsigned report_id;9091/**92* Mutex to access video_context93*/94HANDLE context_mutex;95} AVD3D11VAContext;9697/**98* Allocate an AVD3D11VAContext.99*100* @return Newly-allocated AVD3D11VAContext or NULL on failure.101*/102AVD3D11VAContext *av_d3d11va_alloc_context(void);103104/**105* @}106*/107108#endif /* AVCODEC_D3D11VA_H */109110111