From 8619e163bfbcf2f86edd3243bd075bc6ddc2eb43 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 28 Jun 2024 17:19:46 +0530 Subject: [PATCH] vk-video: Fix uint64_t string format errors With clang on macOS: ``` error: format specifies type 'long' but the argument has type 'uint64_t' (aka 'unsigned long long') ... error: format specifies type 'unsigned long' but the argument has type 'VkImageView' (aka 'unsigned long long') ``` Part-of: --- subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c | 4 ++-- subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c | 4 ++-- .../gst-libs/gst/vulkan/gstvkencoder-private.c | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c index 726671080b..00d09993bb 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh264dec.c @@ -1096,8 +1096,8 @@ _fill_ref_slot (GstVulkanH264Decoder * self, GstH264Picture * picture, if (ref) *ref = &pic->base; - GST_TRACE_OBJECT (self, "0x%lx slotIndex: %d", res->imageViewBinding, - slot->slotIndex); + GST_TRACE_OBJECT (self, "0x%" G_GUINT64_FORMAT "x slotIndex: %d", + res->imageViewBinding, slot->slotIndex); } static GstFlowReturn diff --git a/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c b/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c index c6e2f54b50..8ad5aa2f99 100644 --- a/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c +++ b/subprojects/gst-plugins-bad/ext/vulkan/vkh265dec.c @@ -1391,8 +1391,8 @@ _fill_ref_slot (GstVulkanH265Decoder * self, GstH265Picture * picture, *ref = &pic->base; - GST_TRACE_OBJECT (self, "0x%lx slotIndex: %d", res->imageViewBinding, - slot->slotIndex); + GST_TRACE_OBJECT (self, "0x%" G_GUINT64_FORMAT "x slotIndex: %d", + res->imageViewBinding, slot->slotIndex); } static GstFlowReturn diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkencoder-private.c b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkencoder-private.c index 56622a8b24..0af8f8736c 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkencoder-private.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/vulkan/gstvkencoder-private.c @@ -746,8 +746,9 @@ gst_vulkan_encoder_start (GstVulkanEncoder * self, if (priv->enc_caps.maxBitrate && priv->prop.average_bitrate >= priv->enc_caps.maxBitrate) { g_set_error (error, GST_VULKAN_ERROR, VK_ERROR_INITIALIZATION_FAILED, - "The driver does not support the average bitrate requested %d, driver caps: %ld", - priv->prop.average_bitrate, priv->enc_caps.maxBitrate); + "The driver does not support the average bitrate requested %d, driver caps: %" + G_GUINT64_FORMAT, priv->prop.average_bitrate, + priv->enc_caps.maxBitrate); GST_OBJECT_UNLOCK (self); return FALSE; } @@ -758,7 +759,7 @@ gst_vulkan_encoder_start (GstVulkanEncoder * self, GST_LOG_OBJECT (self, "Capabilities for %" GST_PTR_FORMAT ":\n" " Width from %i to %i\n" " Height from %i to %i\n" - " MaxBitrate: %ld\n" + " MaxBitrate: %" G_GUINT64_FORMAT "\n" " Encode mode:%s", priv->profile_caps, priv->caps.caps.minCodedExtent.width,