| 1 |
/* CUDA EGL stub header |
| 2 |
* |
| 3 |
* This library is free software; you can redistribute it and/or |
| 4 |
* modify it under the terms of the GNU Library General Public |
| 5 |
* License as published by the Free Software Foundation; either |
| 6 |
* version 2 of the License, or (at your option) any later version. |
| 7 |
* |
| 8 |
* This library is distributed in the hope that it will be useful, |
| 9 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 11 |
* Library General Public License for more details. |
| 12 |
* |
| 13 |
* You should have received a copy of the GNU Library General Public |
| 14 |
* License along with this library; if not, write to the |
| 15 |
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, |
| 16 |
* Boston, MA 02110-1301, USA. |
| 17 |
*/ |
| 18 |
|
| 19 |
#ifndef __GST_CUDA_EGLSTUB_H__ |
| 20 |
#define __GST_CUDA_EGLSTUB_H__ |
| 21 |
|
| 22 |
#include "cuda.h" |
| 23 |
|
| 24 |
#ifdef CUDA_FORCE_API_VERSION |
| 25 |
#error "CUDA_FORCE_API_VERSION is no longer supported." |
| 26 |
#endif |
| 27 |
|
| 28 |
#ifdef __cplusplus |
| 29 |
extern "C" { |
| 30 |
#endif |
| 31 |
|
| 32 |
#define CU_EGL_MAX_PLANES 3 |
| 33 |
|
| 34 |
typedef enum CUeglFrameType_enum { |
| 35 |
CU_EGL_FRAME_TYPE_ARRAY = 0, |
| 36 |
CU_EGL_FRAME_TYPE_PITCH = 1, |
| 37 |
} CUeglFrameType; |
| 38 |
|
| 39 |
typedef enum CUeglColorFormat_enum { |
| 40 |
CU_EGL_COLOR_FORMAT_RGBA = 0x07, |
| 41 |
CU_EGL_COLOR_FORMAT_MAX = 0x72, |
| 42 |
} CUeglColorFormat; |
| 43 |
|
| 44 |
typedef struct CUeglFrame { |
| 45 |
union { |
| 46 |
CUarray pArray[CU_EGL_MAX_PLANES]; |
| 47 |
void* pPitch[CU_EGL_MAX_PLANES]; |
| 48 |
} frame; |
| 49 |
guint width; |
| 50 |
guint height; |
| 51 |
guint depth; |
| 52 |
guint pitch; |
| 53 |
guint planeCount; |
| 54 |
guint numChannels; |
| 55 |
CUeglFrameType frameType; |
| 56 |
CUeglColorFormat eglColorFormat; |
| 57 |
CUarray_format cuFormat; |
| 58 |
} CUeglFrame; |
| 59 |
|
| 60 |
#ifdef __cplusplus |
| 61 |
}; |
| 62 |
#endif |
| 63 |
|
| 64 |
#endif |
| 65 |
|