+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),
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)
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;
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;
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;
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)
{
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 {
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;
}
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;
}
}
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;
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);
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;
}
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;
}
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;
}
{
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;
}
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;
}
/* 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,
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;
}
/* 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);
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;
}