diff options
author | Doug Nazar <nazard@nazar.ca> | 2021-04-07 01:03:15 -0400 |
---|---|---|
committer | Doug Nazar <nazard@nazar.ca> | 2021-04-07 04:16:01 -0400 |
commit | dbff4c6f06b85e3af11fcb286cd2e1839405f9d2 (patch) | |
tree | d39b4816412f3d87cec553ddf5dbb2fc0dffa908 | |
parent | 4373535bb5fa15d1f8ce32254cdca95d253357ae (diff) | |
download | gstreamer-plugins-bad-dbff4c6f06b85e3af11fcb286cd2e1839405f9d2.tar.gz |
avtp: Fix log format macros
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2145>
-rw-r--r-- | ext/avtp/gstavtpcvfdepay.c | 21 | ||||
-rw-r--r-- | ext/avtp/gstavtpcvfpay.c | 8 | ||||
-rw-r--r-- | ext/avtp/gstavtpsrc.c | 2 |
3 files changed, 17 insertions, 14 deletions
diff --git a/ext/avtp/gstavtpcvfdepay.c b/ext/avtp/gstavtpcvfdepay.c index 43b44c8ec..3523c0328 100644 --- a/ext/avtp/gstavtpcvfdepay.c +++ b/ext/avtp/gstavtpcvfdepay.c @@ -333,7 +333,8 @@ gst_avtp_cvf_depay_validate_avtpdu (GstAvtpCvfDepay * avtpcvfdepay, g_assert (r == 0); if (G_UNLIKELY (val != 1)) { GST_DEBUG_OBJECT (avtpcvfdepay, - "Unexpected AVTP header stream valid %ld, expected %d", val, 1); + "Unexpected AVTP header stream valid %" G_GUINT64_FORMAT + ", expected %d", val, 1); goto end; } @@ -341,7 +342,8 @@ gst_avtp_cvf_depay_validate_avtpdu (GstAvtpCvfDepay * avtpcvfdepay, g_assert (r == 0); if (val != avtpbasedepayload->streamid) { GST_DEBUG_OBJECT (avtpcvfdepay, - "Unexpected AVTP header stream id 0x%lx, expected 0x%lx", val, + "Unexpected AVTP header stream id 0x%" G_GINT64_MODIFIER + "x, expected 0x%" G_GINT64_MODIFIER "x", val, avtpbasedepayload->streamid); goto end; } @@ -350,7 +352,7 @@ gst_avtp_cvf_depay_validate_avtpdu (GstAvtpCvfDepay * avtpcvfdepay, g_assert (r == 0); if (G_UNLIKELY (val != AVTP_CVF_FORMAT_RFC)) { GST_DEBUG_OBJECT (avtpcvfdepay, - "Unexpected AVTP header format %ld, expected %d", val, + "Unexpected AVTP header format %" G_GUINT64_FORMAT ", expected %d", val, AVTP_CVF_FORMAT_RFC); goto end; } @@ -359,7 +361,7 @@ gst_avtp_cvf_depay_validate_avtpdu (GstAvtpCvfDepay * avtpcvfdepay, g_assert (r == 0); if (G_UNLIKELY (val != AVTP_CVF_FORMAT_SUBTYPE_H264)) { GST_DEBUG_OBJECT (avtpcvfdepay, - "Unsupported AVTP header format subtype %ld", val); + "Unsupported AVTP header format subtype %" G_GUINT64_FORMAT, val); goto end; } @@ -367,8 +369,9 @@ gst_avtp_cvf_depay_validate_avtpdu (GstAvtpCvfDepay * avtpcvfdepay, g_assert (r == 0); if (G_UNLIKELY (map->size < sizeof (*pdu) + val)) { GST_DEBUG_OBJECT (avtpcvfdepay, - "AVTP packet size %ld too small, expected at least %" G_GUINT64_FORMAT, - map->size - AVTP_CVF_H264_HEADER_SIZE, sizeof (*pdu) + val); + "AVTP packet size %" G_GSIZE_FORMAT " too small, expected at least %" + G_GUINT64_FORMAT, map->size - AVTP_CVF_H264_HEADER_SIZE, + sizeof (*pdu) + val); goto end; } @@ -449,8 +452,8 @@ gst_avtp_cvf_depay_internal_push (GstAvtpCvfDepay * avtpcvfdepay, GstFlowReturn ret = GST_FLOW_OK; GST_LOG_OBJECT (avtpcvfdepay, - "Adding buffer of size %" G_GUINT64_FORMAT " (nalu size %" - G_GUINT64_FORMAT ") to out_buffer", gst_buffer_get_size (buffer), + "Adding buffer of size %" G_GSIZE_FORMAT " (nalu size %" + G_GSIZE_FORMAT ") to out_buffer", gst_buffer_get_size (buffer), gst_buffer_get_size (buffer) - sizeof (guint32)); if (avtpcvfdepay->out_buffer) { @@ -571,7 +574,7 @@ gst_avtp_cvf_depay_handle_fu_a (GstAvtpCvfDepay * avtpcvfdepay, if (G_UNLIKELY (map->size - AVTP_CVF_H264_HEADER_SIZE < 2)) { GST_ERROR_OBJECT (avtpcvfdepay, "Buffer too small to contain fragment headers, size: %" - G_GUINT64_FORMAT, map->size - AVTP_CVF_H264_HEADER_SIZE); + G_GSIZE_FORMAT, map->size - AVTP_CVF_H264_HEADER_SIZE); ret = gst_avtp_cvf_depay_push_and_discard (avtpcvfdepay); goto end; } diff --git a/ext/avtp/gstavtpcvfpay.c b/ext/avtp/gstavtpcvfpay.c index 4a3c3aff3..828b74e43 100644 --- a/ext/avtp/gstavtpcvfpay.c +++ b/ext/avtp/gstavtpcvfpay.c @@ -350,7 +350,7 @@ gst_avtpcvpay_fragment_nal (GstAvtpCvfPay * avtpcvfpay, GstBuffer * nal, *last_fragment = TRUE; *offset = nal_size; GST_DEBUG_OBJECT (avtpcvfpay, - "Generated fragment with size %" G_GUINT64_FORMAT, nal_size); + "Generated fragment with size %" G_GSIZE_FORMAT, nal_size); return gst_buffer_ref (nal); } @@ -406,7 +406,7 @@ gst_avtpcvpay_fragment_nal (GstAvtpCvfPay * avtpcvfpay, GstBuffer * nal, *offset += fragment_size; GST_DEBUG_OBJECT (avtpcvfpay, - "Generated fragment with size %" G_GUINT64_FORMAT, fragment_size); + "Generated fragment with size %" G_GSIZE_FORMAT, fragment_size); return fragment; } @@ -536,7 +536,7 @@ gst_avtp_cvf_pay_prepare_avtp_packets (GstAvtpCvfPay * avtpcvfpay, nal = g_ptr_array_index (nals, i); GST_LOG_OBJECT (avtpcvfpay, - "Preparing AVTP packets for NAL whose size is %" G_GUINT64_FORMAT, + "Preparing AVTP packets for NAL whose size is %" G_GSIZE_FORMAT, gst_buffer_get_size (nal)); /* Calculate timestamps. Note that we do it twice, one using DTS as base, @@ -665,7 +665,7 @@ gst_avtp_cvf_pay_chain (GstPad * pad, GstObject * parent, GstBuffer * buffer) GstFlowReturn ret = GST_FLOW_OK; GST_LOG_OBJECT (avtpcvfpay, - "Incoming buffer size: %" G_GUINT64_FORMAT " PTS: %" GST_TIME_FORMAT + "Incoming buffer size: %" G_GSIZE_FORMAT " PTS: %" GST_TIME_FORMAT " DTS: %" GST_TIME_FORMAT, gst_buffer_get_size (buffer), GST_TIME_ARGS (GST_BUFFER_PTS (buffer)), GST_TIME_ARGS (GST_BUFFER_DTS (buffer))); diff --git a/ext/avtp/gstavtpsrc.c b/ext/avtp/gstavtpsrc.c index ea9b6f1b8..a8ec28a9e 100644 --- a/ext/avtp/gstavtpsrc.c +++ b/ext/avtp/gstavtpsrc.c @@ -277,7 +277,7 @@ gst_avtp_src_fill (GstPushSrc * pushsrc, GstBuffer * buffer) buffer_size = gst_buffer_get_size (buffer); if (G_UNLIKELY (buffer_size < MAX_AVTPDU_SIZE)) { GST_WARNING_OBJECT (avtpsrc, - "Buffer size (%" G_GUINT64_FORMAT + "Buffer size (%" G_GSIZE_FORMAT ") may not be enough to hold AVTPDU (max AVTPDU size %d)", buffer_size, MAX_AVTPDU_SIZE); n = buffer_size; |