mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
nvenc: Fix build warning error
'cuDeviceComputeCapability' was deprecated as of CUDA 5.0 gstnvenc.c: In function ‘gst_nvenc_create_cuda_context’: gstnvenc.c:290:9: error: ‘cuDeviceComputeCapability’ is deprecated [-Werror=deprecated-declarations] && cuDeviceComputeCapability (&maj, &min, cdev) == CUDA_SUCCESS) { ^ https://bugzilla.gnome.org/show_bug.cgi?id=796203
This commit is contained in:
parent
feb6002680
commit
535adfee37
1 changed files with 7 additions and 3 deletions
|
@ -287,9 +287,13 @@ gst_nvenc_create_cuda_context (guint device_id)
|
|||
for (i = 0; i < dev_count; ++i) {
|
||||
if (cuDeviceGet (&cdev, i) == CUDA_SUCCESS
|
||||
&& cuDeviceGetName (name, sizeof (name), cdev) == CUDA_SUCCESS
|
||||
&& cuDeviceComputeCapability (&maj, &min, cdev) == CUDA_SUCCESS) {
|
||||
GST_INFO ("GPU #%d supports NVENC: %s (%s) (Compute SM %d.%d)",
|
||||
i, (((maj << 4) + min) >= 0x30) ? "yes" : "no", name, maj, min);
|
||||
&& cuDeviceGetAttribute (&maj,
|
||||
CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, cdev) == CUDA_SUCCESS
|
||||
&& cuDeviceGetAttribute (&min,
|
||||
CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR,
|
||||
cdev) == CUDA_SUCCESS) {
|
||||
GST_INFO ("GPU #%d supports NVENC: %s (%s) (Compute SM %d.%d)", i,
|
||||
(((maj << 4) + min) >= 0x30) ? "yes" : "no", name, maj, min);
|
||||
if (i == device_id) {
|
||||
cuda_dev = cdev;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue