2006-11-06 Tim-Philipp Müller <tim at centricular dot net>
+ * gst/gstplugin.c: (gst_plugin_load_file):
+ * plugins/elements/gstfilesrc.c: (gst_mmap_buffer_finalize),
+ (gst_file_src_map_region), (gst_file_src_start):
+ * plugins/indexers/gstfileindex.c: (gst_file_index_load),
+ (gst_file_index_commit):
+ Use g_strerror() instead of strerror() - we want UTF-8.
+
+2006-11-06 Tim-Philipp Müller <tim at centricular dot net>
+
Patch by: Peter Kjellerstedt <pkj at axis com>
* plugins/elements/gstfdsrc.c: (gst_fd_src_create):
GST_CAT_DEBUG (GST_CAT_PLUGIN_LOADING, "problem accessing file");
g_set_error (error,
GST_PLUGIN_ERROR,
- GST_PLUGIN_ERROR_MODULE, "Problem accessing file %s: %s\n", filename,
- strerror (errno));
+ GST_PLUGIN_ERROR_MODULE, "Problem accessing file %s: %s", filename,
+ g_strerror (errno));
goto return_error;
}
#ifdef MADV_DONTNEED
/* madvise to tell the kernel what to do with it */
if (madvise (data, size, MADV_DONTNEED) < 0) {
- GST_WARNING_OBJECT (src, "warning: madvise failed: %s", strerror (errno));
+ GST_WARNING_OBJECT (src, "warning: madvise failed: %s", g_strerror (errno));
}
#endif
/* now unmap the memory */
if (munmap (data, size) < 0) {
- GST_WARNING_OBJECT (src, "warning: munmap failed: %s", strerror (errno));
+ GST_WARNING_OBJECT (src, "warning: munmap failed: %s", g_strerror (errno));
}
/* cast to unsigned long, since there's no gportable way to print
if (src->sequential) {
/* madvise to tell the kernel what to do with it */
if (madvise (mmapregion, size, MADV_SEQUENTIAL) < 0) {
- GST_WARNING_OBJECT (src, "warning: madvise failed: %s", strerror (errno));
+ GST_WARNING_OBJECT (src, "warning: madvise failed: %s",
+ g_strerror (errno));
}
}
#endif
if (!testonly) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
("mmap (0x%08lx, %d, 0x%llx) failed: %s",
- (gulong) size, src->fd, offset, strerror (errno)));
+ (gulong) size, src->fd, offset, g_strerror (errno)));
}
return NULL;
}
if (res < 0) {
GST_LOG_OBJECT (src, "disabling seeking, not in mmap mode and lseek "
- "failed: %s", strerror (errno));
+ "failed: %s", g_strerror (errno));
src->seekable = FALSE;
} else {
src->seekable = TRUE;
g_free (path);
if (fd < 0) {
GST_ERROR_OBJECT (index,
- "Can't open '%s': %s", path, strerror (errno));
+ "Can't open '%s': %s", path, g_strerror (errno));
continue;
}
close (fd);
if (array_data == MAP_FAILED) {
GST_ERROR_OBJECT (index,
- "mmap %s failed: %s", path, strerror (errno));
+ "mmap %s failed: %s", path, g_strerror (errno));
continue;
}
(GHFunc) _file_index_id_save_xml, writers);
if (mkdir (index->location, 0777) && errno != EEXIST) {
- GST_ERROR_OBJECT (index, "mkdir %s: %s", index->location, strerror (errno));
+ GST_ERROR_OBJECT (index, "mkdir %s: %s", index->location,
+ g_strerror (errno));
return;
}