Path: blob/master/dep/ffmpeg/include/libavutil/hwcontext_qsv.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*/1718#ifndef AVUTIL_HWCONTEXT_QSV_H19#define AVUTIL_HWCONTEXT_QSV_H2021#include <mfxvideo.h>2223/**24* @file25* An API-specific header for AV_HWDEVICE_TYPE_QSV.26*27* AVHWFramesContext.pool must contain AVBufferRefs whose data pointer points28* to a mfxFrameSurface1 struct.29*/3031/**32* This struct is allocated as AVHWDeviceContext.hwctx33*/34typedef struct AVQSVDeviceContext {35mfxSession session;36/**37* The mfxLoader handle used for mfxSession creation38*39* This field is only available for oneVPL user. For non-oneVPL user, this40* field must be set to NULL.41*42* Filled by the user before calling av_hwdevice_ctx_init() and should be43* cast to mfxLoader handle. Deallocating the AVHWDeviceContext will always44* release this interface.45*/46void *loader;47} AVQSVDeviceContext;4849/**50* This struct is allocated as AVHWFramesContext.hwctx51*/52typedef struct AVQSVFramesContext {53/**54* A pointer to a mfxFrameSurface1 struct55*56* It is available when nb_surfaces is non-zero.57*/58mfxFrameSurface1 *surfaces;5960/**61* Number of frames in the pool62*63* It is 0 for dynamic frame pools or AVHWFramesContext.initial_pool_size64* for fixed frame pools.65*66* Note only oneVPL GPU runtime 2.9+ can support dynamic frame pools67* on d3d11va or vaapi68*/69int nb_surfaces;7071/**72* A combination of MFX_MEMTYPE_* describing the frame pool.73*/74int frame_type;7576/**77* A pointer to a mfxFrameInfo struct78*79* It is available when nb_surfaces is 0, all buffers allocated from the80* pool have the same mfxFrameInfo.81*/82mfxFrameInfo *info;83} AVQSVFramesContext;8485#endif /* AVUTIL_HWCONTEXT_QSV_H */86878889