Path: blob/master/dep/ffmpeg/include/libavutil/hwcontext_dxva2.h
4216 views
/*1* This file is part of FFmpeg.2*3* FFmpeg is free software; you can redistribute it and/or4* modify it under the terms of the GNU Lesser General Public5* License as published by the Free Software Foundation; either6* version 2.1 of the License, or (at your option) any later version.7*8* FFmpeg is distributed in the hope that it will be useful,9* but WITHOUT ANY WARRANTY; without even the implied warranty of10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU11* Lesser General Public License for more details.12*13* You should have received a copy of the GNU Lesser General Public14* License along with FFmpeg; if not, write to the Free Software15* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA16*/171819#ifndef AVUTIL_HWCONTEXT_DXVA2_H20#define AVUTIL_HWCONTEXT_DXVA2_H2122/**23* @file24* An API-specific header for AV_HWDEVICE_TYPE_DXVA2.25*26* Only fixed-size pools are supported.27*28* For user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs29* with the data pointer set to a pointer to IDirect3DSurface9.30*/3132#include <d3d9.h>33#include <dxva2api.h>3435/**36* This struct is allocated as AVHWDeviceContext.hwctx37*/38typedef struct AVDXVA2DeviceContext {39IDirect3DDeviceManager9 *devmgr;40} AVDXVA2DeviceContext;4142/**43* This struct is allocated as AVHWFramesContext.hwctx44*/45typedef struct AVDXVA2FramesContext {46/**47* The surface type (e.g. DXVA2_VideoProcessorRenderTarget or48* DXVA2_VideoDecoderRenderTarget). Must be set by the caller.49*/50DWORD surface_type;5152/**53* The surface pool. When an external pool is not provided by the caller,54* this will be managed (allocated and filled on init, freed on uninit) by55* libavutil.56*/57IDirect3DSurface9 **surfaces;58int nb_surfaces;5960/**61* Certain drivers require the decoder to be destroyed before the surfaces.62* To allow internally managed pools to work properly in such cases, this63* field is provided.64*65* If it is non-NULL, libavutil will call IDirectXVideoDecoder_Release() on66* it just before the internal surface pool is freed.67*68* This is for convenience only. Some code uses other methods to manage the69* decoder reference.70*/71IDirectXVideoDecoder *decoder_to_release;72} AVDXVA2FramesContext;7374#endif /* AVUTIL_HWCONTEXT_DXVA2_H */757677