SDL
SDL copied to clipboard
testffmpeg_vulkan.c: Some `AVVulkanDeviceContext` members are deprecated since ffmpeg version 7.1
Since the latest ffmpeg release (version 7.1), there are warnings when compiling SDL tests:
gcc warnings
[ 59%] Building C object test/CMakeFiles/testffmpeg.dir/testffmpeg_vulkan.c.o
/path/to/SDL-git/test/testffmpeg_vulkan.c: In function ‘SetupVulkanDeviceContextData’:
/path/to/SDL-git/test/testffmpeg_vulkan.c:693:5: warning: ‘queue_family_index’ is deprecated [-Wdeprecated-declarations]
693 | ctx->queue_family_index = context->graphicsQueueFamilyIndex;
| ^~~
In file included from /path/to/SDL-git/test/testffmpeg_vulkan.h:14,
from /path/to/SDL-git/test/testffmpeg_vulkan.c:15:
/usr/include/libavutil/hwcontext_vulkan.h:124:9: note: declared here
124 | int queue_family_index;
| ^~~~~~~~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:694:5: warning: ‘nb_graphics_queues’ is deprecated [-Wdeprecated-declarations]
694 | ctx->nb_graphics_queues = context->graphicsQueueCount;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:126:9: note: declared here
126 | int nb_graphics_queues;
| ^~~~~~~~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:695:5: warning: ‘queue_family_tx_index’ is deprecated [-Wdeprecated-declarations]
695 | ctx->queue_family_tx_index = context->transferQueueFamilyIndex;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:133:9: note: declared here
133 | int queue_family_tx_index;
| ^~~~~~~~~~~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:696:5: warning: ‘nb_tx_queues’ is deprecated [-Wdeprecated-declarations]
696 | ctx->nb_tx_queues = context->transferQueueCount;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:135:9: note: declared here
135 | int nb_tx_queues;
| ^~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:697:5: warning: ‘queue_family_comp_index’ is deprecated [-Wdeprecated-declarations]
697 | ctx->queue_family_comp_index = context->computeQueueFamilyIndex;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:142:9: note: declared here
142 | int queue_family_comp_index;
| ^~~~~~~~~~~~~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:698:5: warning: ‘nb_comp_queues’ is deprecated [-Wdeprecated-declarations]
698 | ctx->nb_comp_queues = context->computeQueueCount;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:144:9: note: declared here
144 | int nb_comp_queues;
| ^~~~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:699:5: warning: ‘queue_family_encode_index’ is deprecated [-Wdeprecated-declarations]
699 | ctx->queue_family_encode_index = -1;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:152:9: note: declared here
152 | int queue_family_encode_index;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:700:5: warning: ‘nb_encode_queues’ is deprecated [-Wdeprecated-declarations]
700 | ctx->nb_encode_queues = 0;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:154:9: note: declared here
154 | int nb_encode_queues;
| ^~~~~~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:701:5: warning: ‘queue_family_decode_index’ is deprecated [-Wdeprecated-declarations]
701 | ctx->queue_family_decode_index = context->decodeQueueFamilyIndex;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:162:9: note: declared here
162 | int queue_family_decode_index;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/SDL-git/test/testffmpeg_vulkan.c:702:5: warning: ‘nb_decode_queues’ is deprecated [-Wdeprecated-declarations]
702 | ctx->nb_decode_queues = context->decodeQueueCount;
| ^~~
/usr/include/libavutil/hwcontext_vulkan.h:164:9: note: declared here
164 | int nb_decode_queues;
| ^~~~~~~~~~~~~~~~
clang warnings
[ 51%] Building C object test/CMakeFiles/testffmpeg.dir/testffmpeg_vulkan.c.o
/path/to/SDL-git/test/testffmpeg_vulkan.c:693:10: warning: 'queue_family_index' is deprecated [-Wdeprecated-declarations]
693 | ctx->queue_family_index = context->graphicsQueueFamilyIndex;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:123:5: note: 'queue_family_index' has been explicitly marked deprecated here
123 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:694:10: warning: 'nb_graphics_queues' is deprecated [-Wdeprecated-declarations]
694 | ctx->nb_graphics_queues = context->graphicsQueueCount;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:125:5: note: 'nb_graphics_queues' has been explicitly marked deprecated here
125 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:695:10: warning: 'queue_family_tx_index' is deprecated [-Wdeprecated-declarations]
695 | ctx->queue_family_tx_index = context->transferQueueFamilyIndex;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:132:5: note: 'queue_family_tx_index' has been explicitly marked deprecated here
132 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:696:10: warning: 'nb_tx_queues' is deprecated [-Wdeprecated-declarations]
696 | ctx->nb_tx_queues = context->transferQueueCount;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:134:5: note: 'nb_tx_queues' has been explicitly marked deprecated here
134 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:697:10: warning: 'queue_family_comp_index' is deprecated [-Wdeprecated-declarations]
697 | ctx->queue_family_comp_index = context->computeQueueFamilyIndex;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:141:5: note: 'queue_family_comp_index' has been explicitly marked deprecated here
141 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:698:10: warning: 'nb_comp_queues' is deprecated [-Wdeprecated-declarations]
698 | ctx->nb_comp_queues = context->computeQueueCount;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:143:5: note: 'nb_comp_queues' has been explicitly marked deprecated here
143 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:699:10: warning: 'queue_family_encode_index' is deprecated [-Wdeprecated-declarations]
699 | ctx->queue_family_encode_index = -1;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:151:5: note: 'queue_family_encode_index' has been explicitly marked deprecated here
151 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:700:10: warning: 'nb_encode_queues' is deprecated [-Wdeprecated-declarations]
700 | ctx->nb_encode_queues = 0;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:153:5: note: 'nb_encode_queues' has been explicitly marked deprecated here
153 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:701:10: warning: 'queue_family_decode_index' is deprecated [-Wdeprecated-declarations]
701 | ctx->queue_family_decode_index = context->decodeQueueFamilyIndex;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:161:5: note: 'queue_family_decode_index' has been explicitly marked deprecated here
161 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^
/path/to/SDL-git/test/testffmpeg_vulkan.c:702:10: warning: 'nb_decode_queues' is deprecated [-Wdeprecated-declarations]
702 | ctx->nb_decode_queues = context->decodeQueueCount;
| ^
/usr/include/libavutil/hwcontext_vulkan.h:163:5: note: 'nb_decode_queues' has been explicitly marked deprecated here
163 | attribute_deprecated
| ^
/usr/include/libavutil/attributes.h:100:49: note: expanded from macro 'attribute_deprecated'
100 | # define attribute_deprecated __attribute__((deprecated))
| ^