mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
nvenc: add support for building against version 6 of the SDK
While mostly API compatible, the ABI has changed so binaries will not work across header versions (and ultimately nvidia driver releases). https://bugzilla.gnome.org/show_bug.cgi?id=763324
This commit is contained in:
parent
d1266be431
commit
d6f7ea88bb
1 changed files with 21 additions and 1 deletions
|
@ -38,6 +38,9 @@
|
|||
* - reset last_flow on FLUSH_STOP (seeking)
|
||||
*/
|
||||
|
||||
/* This currently supports both 5.x and 6.x versions of the NvEncodeAPI.h
|
||||
* header which are mostly API compatible. */
|
||||
|
||||
#define N_BUFFERS_PER_FRAME 1
|
||||
#define SUPPORTED_GL_APIS GST_GL_API_OPENGL3
|
||||
|
||||
|
@ -172,23 +175,40 @@ _get_supported_input_formats (GstNvBaseEnc * nvenc)
|
|||
* it the respective untiled planar format instead ?! */
|
||||
switch (formats[i]) {
|
||||
case NV_ENC_BUFFER_FORMAT_NV12_PL:
|
||||
#if defined (NV_ENC_BUFFER_FORMAT_NV12_TILED16x16)
|
||||
case NV_ENC_BUFFER_FORMAT_NV12_TILED16x16:
|
||||
#endif
|
||||
#if defined (NV_ENC_BUFFER_FORMAT_NV12_TILED64x16)
|
||||
case NV_ENC_BUFFER_FORMAT_NV12_TILED64x16:
|
||||
#endif
|
||||
format_mask |= (1 << GST_VIDEO_FORMAT_NV12);
|
||||
break;
|
||||
case NV_ENC_BUFFER_FORMAT_YV12_PL:
|
||||
#if defined(NV_ENC_BUFFER_FORMAT_YV12_TILED16x16)
|
||||
case NV_ENC_BUFFER_FORMAT_YV12_TILED16x16:
|
||||
#endif
|
||||
#if defined (NV_ENC_BUFFER_FORMAT_YV12_TILED64x16)
|
||||
case NV_ENC_BUFFER_FORMAT_YV12_TILED64x16:
|
||||
#endif
|
||||
format_mask |= (1 << GST_VIDEO_FORMAT_YV12);
|
||||
break;
|
||||
case NV_ENC_BUFFER_FORMAT_IYUV_PL:
|
||||
#if defined (NV_ENC_BUFFER_FORMAT_IYUV_TILED16x16)
|
||||
case NV_ENC_BUFFER_FORMAT_IYUV_TILED16x16:
|
||||
#endif
|
||||
#if defined (NV_ENC_BUFFER_FORMAT_IYUV_TILED64x16)
|
||||
case NV_ENC_BUFFER_FORMAT_IYUV_TILED64x16:
|
||||
#endif
|
||||
format_mask |= (1 << GST_VIDEO_FORMAT_I420);
|
||||
break;
|
||||
case NV_ENC_BUFFER_FORMAT_YUV444_PL:
|
||||
#if defined (NV_ENC_BUFFER_FORMAT_YUV444_TILED16x16)
|
||||
case NV_ENC_BUFFER_FORMAT_YUV444_TILED16x16:
|
||||
case NV_ENC_BUFFER_FORMAT_YUV444_TILED64x16:{
|
||||
#endif
|
||||
#if defined (NV_ENC_BUFFER_FORMAT_YUV444_TILED64x16)
|
||||
case NV_ENC_BUFFER_FORMAT_YUV444_TILED64x16:
|
||||
#endif
|
||||
{
|
||||
NV_ENC_CAPS_PARAM caps_param = { 0, };
|
||||
int yuv444_supported = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue