mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-23 17:14:23 +00:00
kate: Use G_GSIZE_FORMAT instead of unportable %zu
This commit is contained in:
parent
ace64ca3e5
commit
64160a1392
4 changed files with 15 additions and 11 deletions
|
@ -848,7 +848,8 @@ gst_kate_enc_chain_spu (GstKateEnc * ke, GstBuffer * buf)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
GST_DEBUG_OBJECT (ke, "Encoding %zux%zu SPU: (%zu bytes) from %f to %f",
|
GST_DEBUG_OBJECT (ke, "Encoding %" G_GSIZE_FORMAT "x%" G_GSIZE_FORMAT
|
||||||
|
" SPU: (%" G_GSIZE_FORMAT " bytes) from %f to %f",
|
||||||
kbitmap->width, kbitmap->height, gst_buffer_get_size (buf), t0, t1);
|
kbitmap->width, kbitmap->height, gst_buffer_get_size (buf), t0, t1);
|
||||||
|
|
||||||
ret = kate_encode_set_region (&ke->k, kregion);
|
ret = kate_encode_set_region (&ke->k, kregion);
|
||||||
|
@ -977,7 +978,8 @@ gst_kate_enc_chain (GstPad * pad, GstObject * parent, GstBuffer * buf)
|
||||||
GstKateEnc *ke = GST_KATE_ENC (parent);
|
GstKateEnc *ke = GST_KATE_ENC (parent);
|
||||||
GstFlowReturn rflow;
|
GstFlowReturn rflow;
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (ke, "got packet, %zu bytes", gst_buffer_get_size (buf));
|
GST_DEBUG_OBJECT (ke, "got packet, %" G_GSIZE_FORMAT " bytes",
|
||||||
|
gst_buffer_get_size (buf));
|
||||||
|
|
||||||
/* first push headers if we haven't done that yet */
|
/* first push headers if we haven't done that yet */
|
||||||
rflow = gst_kate_enc_flush_headers (ke);
|
rflow = gst_kate_enc_flush_headers (ke);
|
||||||
|
|
|
@ -362,7 +362,7 @@ gst_kate_parse_parse_packet (GstKateParse * parse, GstBuffer * buf)
|
||||||
|
|
||||||
size = gst_buffer_extract (buf, 0, header, 1);
|
size = gst_buffer_extract (buf, 0, header, 1);
|
||||||
|
|
||||||
GST_LOG_OBJECT (parse, "Got packet %02x, %zu bytes",
|
GST_LOG_OBJECT (parse, "Got packet %02x, %" G_GSIZE_FORMAT " bytes",
|
||||||
size ? header[0] : -1, gst_buffer_get_size (buf));
|
size ? header[0] : -1, gst_buffer_get_size (buf));
|
||||||
|
|
||||||
if (size > 0 && header[0] & 0x80) {
|
if (size > 0 && header[0] & 0x80) {
|
||||||
|
|
|
@ -386,7 +386,7 @@ out_of_range:
|
||||||
{
|
{
|
||||||
gst_buffer_unmap (buf, &info);
|
gst_buffer_unmap (buf, &info);
|
||||||
GST_ELEMENT_ERROR (ke, STREAM, DECODE, (NULL),
|
GST_ELEMENT_ERROR (ke, STREAM, DECODE, (NULL),
|
||||||
("Command sequence offset %u is out of range %zu",
|
("Command sequence offset %u is out of range %" G_GSIZE_FORMAT,
|
||||||
command_sequence_offset, info.size));
|
command_sequence_offset, info.size));
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -505,8 +505,8 @@ gst_kate_spu_decode_spu (GstKateEnc * ke, GstBuffer * buf, kate_region * kr,
|
||||||
CHECK (2);
|
CHECK (2);
|
||||||
packet_size = GST_KATE_UINT16_BE (ptr);
|
packet_size = GST_KATE_UINT16_BE (ptr);
|
||||||
ADVANCE (2);
|
ADVANCE (2);
|
||||||
GST_DEBUG_OBJECT (ke, "packet size %d (GstBuffer size %zu)", packet_size,
|
GST_DEBUG_OBJECT (ke, "packet size %d (GstBuffer size %" G_GSIZE_FORMAT ")",
|
||||||
info.size);
|
packet_size, info.size);
|
||||||
|
|
||||||
CHECK (2);
|
CHECK (2);
|
||||||
next_command_sequence = GST_KATE_UINT16_BE (ptr);
|
next_command_sequence = GST_KATE_UINT16_BE (ptr);
|
||||||
|
|
|
@ -289,7 +289,8 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
|
||||||
|
|
||||||
header_size = gst_buffer_extract (buf, 0, header, 1);
|
header_size = gst_buffer_extract (buf, 0, header, 1);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (element, "got kate packet, %zu bytes, type %02x",
|
GST_DEBUG_OBJECT (element,
|
||||||
|
"got kate packet, %" G_GSIZE_FORMAT " bytes, type %02x",
|
||||||
gst_buffer_get_size (buf), header_size == 0 ? -1 : header[0]);
|
gst_buffer_get_size (buf), header_size == 0 ? -1 : header[0]);
|
||||||
|
|
||||||
is_header = header_size > 0 && (header[0] & 0x80);
|
is_header = header_size > 0 && (header[0] & 0x80);
|
||||||
|
@ -429,15 +430,16 @@ gst_kate_util_decoder_base_chain_kate_packet (GstKateDecoderBase * decoder,
|
||||||
} else {
|
} else {
|
||||||
if (gst_kate_util_is_utf8_string (value, len)) {
|
if (gst_kate_util_is_utf8_string (value, len)) {
|
||||||
gchar *compound = g_strdup_printf ("%s=%s", tag, value);
|
gchar *compound = g_strdup_printf ("%s=%s", tag, value);
|
||||||
GST_DEBUG_OBJECT (decoder, "Metadata %d: %s=%s (%zu bytes)", idx,
|
GST_DEBUG_OBJECT (decoder,
|
||||||
tag, value, len);
|
"Metadata %d: %s=%s (%" G_GSIZE_FORMAT " bytes)", idx, tag,
|
||||||
|
value, len);
|
||||||
gst_tag_list_add (evtags, GST_TAG_MERGE_APPEND,
|
gst_tag_list_add (evtags, GST_TAG_MERGE_APPEND,
|
||||||
GST_TAG_EXTENDED_COMMENT, compound, NULL);
|
GST_TAG_EXTENDED_COMMENT, compound, NULL);
|
||||||
g_free (compound);
|
g_free (compound);
|
||||||
} else {
|
} else {
|
||||||
GST_INFO_OBJECT (decoder,
|
GST_INFO_OBJECT (decoder,
|
||||||
"Metadata %d, (%s, %zu bytes) is binary, ignored", idx, tag,
|
"Metadata %d, (%s, %" G_GSIZE_FORMAT
|
||||||
len);
|
" bytes) is binary, ignored", idx, tag, len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue