diff options
author | James Almer <jamrial@gmail.com> | 2016-09-28 19:30:27 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2016-09-28 19:30:27 +0300 |
commit | eba041476879fc46a49fa36fca03f1565ecaefca (patch) | |
tree | 937fd074b99894eb3f1c9ec096c8e74bbe12f946 /libavutil/hwcontext_qsv.h | |
parent | e9a5fc967867f9bd361f472306ca130bb64b0b04 (diff) | |
parent | 59e7361cc791e5103be1712dc59a2055f118d0da (diff) |
Merge commit '59e7361cc791e5103be1712dc59a2055f118d0da'
* commit '59e7361cc791e5103be1712dc59a2055f118d0da':
hwcontext: add a QSV implementation
Conflicts:
doc/APIchanges
libavutil/version.h
Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavutil/hwcontext_qsv.h')
-rw-r--r-- | libavutil/hwcontext_qsv.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libavutil/hwcontext_qsv.h b/libavutil/hwcontext_qsv.h new file mode 100644 index 0000000000..b98d611cfc --- /dev/null +++ b/libavutil/hwcontext_qsv.h @@ -0,0 +1,53 @@ +/* + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVUTIL_HWCONTEXT_QSV_H +#define AVUTIL_HWCONTEXT_QSV_H + +#include <mfx/mfxvideo.h> + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_QSV. + * + * This API does not support dynamic frame pools. AVHWFramesContext.pool must + * contain AVBufferRefs whose data pointer points to an mfxFrameSurface1 struct. + */ + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVQSVDeviceContext { + mfxSession session; +} AVQSVDeviceContext; + +/** + * This struct is allocated as AVHWFramesContext.hwctx + */ +typedef struct AVQSVFramesContext { + mfxFrameSurface1 *surfaces; + int nb_surfaces; + + /** + * A combination of MFX_MEMTYPE_* describing the frame pool. + */ + int frame_type; +} AVQSVFramesContext; + +#endif /* AVUTIL_HWCONTEXT_QSV_H */ + |