1 /* GStreamer 2 * Copyright (C) 2019 Seungha Yang <seungha.yang@navercorp.com> 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public 15 * License along with this library; if not, write to the 16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 */ 19 20 #ifndef __GST_CUVID_LOADER_H__ 21 #define __GST_CUVID_LOADER_H__ 22 23 #include <gst/gst.h> 24 #include "stub/cuda.h" 25 #include "nvcuvid.h" 26 27 G_BEGIN_DECLS 28 29 /* cuvid.h */ 30 gboolean gst_cuvid_load_library (guint api_major_ver, 31 guint api_minor_ver); 32 33 gboolean gst_cuvid_get_api_version (guint * api_major_ver, 34 guint * api_minor_ver); 35 36 gboolean gst_cuvid_can_get_decoder_caps (void); 37 38 CUresult CUDAAPI CuvidCtxLockCreate (CUvideoctxlock * pLock, 39 CUcontext ctx); 40 41 CUresult CUDAAPI CuvidCtxLockDestroy (CUvideoctxlock lck); 42 43 CUresult CUDAAPI CuvidCtxLock (CUvideoctxlock lck, 44 unsigned int reserved_flags); 45 46 CUresult CUDAAPI CuvidCtxUnlock (CUvideoctxlock lck, 47 unsigned int reserved_flags); 48 49 CUresult CUDAAPI CuvidCreateDecoder (CUvideodecoder * phDecoder, 50 CUVIDDECODECREATEINFO * pdci); 51 52 CUresult CUDAAPI CuvidDestroyDecoder (CUvideodecoder hDecoder); 53 54 CUresult CUDAAPI CuvidDecodePicture (CUvideodecoder hDecoder, 55 CUVIDPICPARAMS * pPicParams); 56 57 CUresult CUDAAPI CuvidCreateVideoParser (CUvideoparser * pObj, 58 CUVIDPARSERPARAMS * pParams); 59 60 CUresult CUDAAPI CuvidParseVideoData (CUvideoparser obj, 61 CUVIDSOURCEDATAPACKET * pPacket); 62 63 CUresult CUDAAPI CuvidDestroyVideoParser (CUvideoparser obj); 64 65 CUresult CUDAAPI CuvidMapVideoFrame (CUvideodecoder hDecoder, 66 int nPicIdx, 67 guintptr * pDevPtr, 68 unsigned int *pPitch, 69 CUVIDPROCPARAMS * pVPP); 70 71 CUresult CUDAAPI CuvidUnmapVideoFrame (CUvideodecoder hDecoder, 72 guintptr DevPtr); 73 74 CUresult CUDAAPI CuvidGetDecoderCaps (CUVIDDECODECAPS * pdc); 75 76 G_END_DECLS 77 #endif /* __GST_CUVID_LOADER_H__ */ 78