Commit d24ad6ac authored by Jan David Mol's avatar Jan David Mol Committed by Wim Taymans
Browse files

Various gsize and gssize printf fixes. Fixes #372507.

Original commit message from CVS:
Patch by: Jan David Mol <j dot j dot d dot mol at tudelft dot nl>
* gst-libs/gst/riff/riff-read.c: (gst_riff_parse_strf_auds),
(gst_riff_parse_strf_iavs):
* gst/subparse/gstsubparse.c: (convert_encoding):
* gst/tcp/gstmultifdsink.c:
(gst_multi_fd_sink_handle_client_write):
* gst/tcp/gsttcp.c: (gst_tcp_socket_write), (gst_tcp_socket_read),
(gst_tcp_read_buffer), (gst_tcp_gdp_read_caps),
(gst_tcp_gdp_write_buffer), (gst_tcp_gdp_write_caps):
* gst/tcp/gsttcpclientsink.c: (gst_tcp_client_sink_render):
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new):
Various gsize and gssize printf fixes. Fixes #372507.
parent cadc8811
2006-11-14 Wim Taymans <wim@fluendo.com>
Patch by: Jan David Mol <j dot j dot d dot mol at tudelft dot nl>
* gst-libs/gst/riff/riff-read.c: (gst_riff_parse_strf_auds),
(gst_riff_parse_strf_iavs):
* gst/subparse/gstsubparse.c: (convert_encoding):
* gst/tcp/gstmultifdsink.c:
(gst_multi_fd_sink_handle_client_write):
* gst/tcp/gsttcp.c: (gst_tcp_socket_write), (gst_tcp_socket_read),
(gst_tcp_read_buffer), (gst_tcp_gdp_read_caps),
(gst_tcp_gdp_write_buffer), (gst_tcp_gdp_write_caps):
* gst/tcp/gsttcpclientsink.c: (gst_tcp_client_sink_render):
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xvimage_new):
Various gsize and gssize printf fixes. Fixes #372507.
2006-11-13 Wim Taymans <wim@fluendo.com>
 
* ext/vorbis/vorbisdec.c: (vorbis_dec_sink_event),
......@@ -470,8 +470,8 @@ gst_riff_parse_strf_auds (GstElement * element,
len = GST_READ_UINT16_LE (&GST_BUFFER_DATA (buf)[16]);
if (len + 2 + sizeof (gst_riff_strf_auds) > bufsize) {
GST_WARNING_OBJECT (element,
"Extradata indicated %d bytes, but only %d available",
len, bufsize - 2 - sizeof (gst_riff_strf_auds));
"Extradata indicated %d bytes, but only %" G_GSSIZE_FORMAT
" available", len, bufsize - 2 - sizeof (gst_riff_strf_auds));
len = bufsize - 2 - sizeof (gst_riff_strf_auds);
}
if (len)
......@@ -499,7 +499,7 @@ gst_riff_parse_strf_auds (GstElement * element,
too_small:
{
GST_ERROR_OBJECT (element,
"Too small strf_auds (%d available, %d needed)",
"Too small strf_auds (%d available, %" G_GSSIZE_FORMAT " needed)",
bufsize, sizeof (gst_riff_strf_auds));
gst_buffer_unref (buf);
return FALSE;
......@@ -570,7 +570,7 @@ gst_riff_parse_strf_iavs (GstElement * element,
too_small:
{
GST_ERROR_OBJECT (element,
"Too small strf_iavs (%d available, %d needed)",
"Too small strf_iavs (%d available, %" G_GSSIZE_FORMAT " needed)",
GST_BUFFER_SIZE (buf), sizeof (gst_riff_strf_iavs));
gst_buffer_unref (buf);
return FALSE;
......
......@@ -353,7 +353,8 @@ convert_encoding (GstSubParse * self, const gchar * str, gsize len)
NULL, NULL, NULL);
}
GST_LOG_OBJECT (self, "successfully converted %d characters from %s to UTF-8"
GST_LOG_OBJECT (self,
"successfully converted %" G_GSIZE_FORMAT " characters from %s to UTF-8"
"%s", len, encoding, (err) ? " , using ISO-8859-15 as fallback" : "");
return ret;
......
......@@ -764,7 +764,7 @@ gst_multi_fd_sink_add (GstMultiFdSink * sink, int fd)
sink->def_burst_unit, sink->def_burst_value, sink->def_burst_unit, -1);
}
/* "remove" signal implemntation */
/* "remove" signal implementation */
void
gst_multi_fd_sink_remove (GstMultiFdSink * sink, int fd)
{
......@@ -1886,7 +1886,8 @@ gst_multi_fd_sink_handle_client_write (GstMultiFdSink * sink,
if (wrote < maxsize) {
/* partial write means that the client cannot read more and we should
* stop sending more */
GST_LOG_OBJECT (sink, "partial write on %d of %d bytes", fd, wrote);
GST_LOG_OBJECT (sink,
"partial write on %d of %" G_GSSIZE_FORMAT " bytes", fd, wrote);
client->bufoffset += wrote;
more = FALSE;
} else {
......
......@@ -119,7 +119,7 @@ gst_tcp_socket_write (int socket, const void *buf, size_t count)
if (bytes_written < 0)
GST_WARNING ("error while writing");
else
GST_LOG ("wrote %d bytes succesfully", bytes_written);
GST_LOG ("wrote %" G_GSIZE_FORMAT " bytes succesfully", bytes_written);
return bytes_written;
}
......@@ -209,7 +209,7 @@ read_error:
short_read:
{
GST_ELEMENT_ERROR (this, RESOURCE, READ, (NULL),
("short read: wanted %d bytes, got %d", num_to_read, n));
("short read: wanted %d bytes, got %" G_GSSIZE_FORMAT, num_to_read, n));
return GST_FLOW_ERROR;
}
}
......@@ -311,7 +311,8 @@ read_error:
short_read:
{
GST_ELEMENT_ERROR (this, RESOURCE, READ, (NULL),
("short read: wanted %d bytes, got %d", readsize, bytes_read));
("short read: wanted %d bytes, got %" G_GSSIZE_FORMAT, readsize,
bytes_read));
gst_buffer_unref (*buf);
*buf = NULL;
return GST_FLOW_ERROR;
......@@ -424,7 +425,8 @@ gst_tcp_gdp_read_caps (GstElement * this, int socket, int cancel_fd,
payload_length = gst_dp_header_payload_length (header);
payload = g_malloc (payload_length);
GST_LOG_OBJECT (this, "Reading %d bytes for caps packet payload",
GST_LOG_OBJECT (this,
"Reading %" G_GSIZE_FORMAT " bytes for caps packet payload",
payload_length);
ret = gst_tcp_socket_read (this, socket, payload, payload_length, cancel_fd);
......@@ -515,7 +517,7 @@ write_error:
if (fatal)
GST_ELEMENT_ERROR (this, RESOURCE, WRITE,
(_("Error while sending data to \"%s:%d\"."), host, port),
("Only %d of %d bytes written: %s",
("Only %" G_GSIZE_FORMAT " of %u bytes written: %s",
wrote, GST_BUFFER_SIZE (buffer), g_strerror (errno)));
return FALSE;
}
......@@ -567,7 +569,7 @@ write_header_error:
if (fatal)
GST_ELEMENT_ERROR (this, RESOURCE, WRITE,
(_("Error while sending gdp header data to \"%s:%d\"."), host, port),
("Only %d of %d bytes written: %s",
("Only %" G_GSIZE_FORMAT " of %u bytes written: %s",
wrote, length, g_strerror (errno)));
return FALSE;
}
......@@ -576,7 +578,7 @@ write_payload_error:
if (fatal)
GST_ELEMENT_ERROR (this, RESOURCE, WRITE,
(_("Error while sending gdp payload data to \"%s:%d\"."), host, port),
("Only %d of %d bytes written: %s",
("Only %" G_GSIZE_FORMAT " of %u bytes written: %s",
wrote, length, g_strerror (errno)));
return FALSE;
}
......
......@@ -266,7 +266,7 @@ write_error:
{
GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
(_("Error while sending data to \"%s:%d\"."), sink->host, sink->port),
("Only %d of %d bytes written: %s",
("Only %" G_GSIZE_FORMAT " of %u bytes written: %s",
wrote, GST_BUFFER_SIZE (buf), g_strerror (errno)));
return GST_FLOW_ERROR;
}
......
......@@ -345,7 +345,8 @@ gst_ximagesink_check_xshm_calls (GstXImageSink * ximagesink,
SHMInfo.shmid = shmget (IPC_PRIVATE, size, IPC_CREAT | 0777);
if (SHMInfo.shmid == -1) {
GST_WARNING ("could not get shared memory of %d bytes", size);
GST_WARNING ("could not get shared memory of %" G_GSIZE_FORMAT " bytes",
size);
goto beach;
}
......@@ -439,7 +440,8 @@ gst_ximagesink_ximage_new (GstXImageSink * ximagesink, GstCaps * caps)
/* we have to use the returned bytes_per_line for our shm size */
ximage->size = ximage->ximage->bytes_per_line * ximage->ximage->height;
GST_LOG_OBJECT (ximagesink, "XShm image size is %d, width %d, stride %d",
GST_LOG_OBJECT (ximagesink,
"XShm image size is %" G_GSIZE_FORMAT ", width %d, stride %d",
ximage->size, ximage->width, ximage->ximage->bytes_per_line);
ximage->SHMInfo.shmid = shmget (IPC_PRIVATE, ximage->size,
......@@ -449,7 +451,8 @@ gst_ximagesink_ximage_new (GstXImageSink * ximagesink, GstCaps * caps)
GST_ELEMENT_ERROR (ximagesink, RESOURCE, WRITE,
("Failed to create output image buffer of %dx%d pixels",
ximage->width, ximage->height),
("could not get shared memory of %d bytes", ximage->size));
("could not get shared memory of %" G_GSIZE_FORMAT " bytes",
ximage->size));
goto beach;
}
......
......@@ -547,7 +547,8 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps)
/* we have to use the returned data_size for our shm size */
xvimage->size = xvimage->xvimage->data_size;
GST_LOG_OBJECT (xvimagesink, "XShm image size is %d", xvimage->size);
GST_LOG_OBJECT (xvimagesink, "XShm image size is %" G_GSIZE_FORMAT,
xvimage->size);
xvimage->SHMInfo.shmid = shmget (IPC_PRIVATE, xvimage->size,
IPC_CREAT | 0777);
......@@ -556,7 +557,8 @@ gst_xvimagesink_xvimage_new (GstXvImageSink * xvimagesink, GstCaps * caps)
GST_ELEMENT_ERROR (xvimagesink, RESOURCE, WRITE,
("Failed to create output image buffer of %dx%d pixels",
xvimage->width, xvimage->height),
("could not get shared memory of %d bytes", xvimage->size));
("could not get shared memory of %" G_GSIZE_FORMAT " bytes",
xvimage->size));
goto beach_unlocked;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment