Commit b7d91711 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜

ipcpipeline: Minimal fixes that allow building with MSVC

parent c8db7a91
......@@ -24,7 +24,13 @@
# include "config.h"
#endif
#include <unistd.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
#ifdef _MSC_VER
/* ssize_t is not available, so match return value of read()/write() on MSVC */
#define ssize_t int
#endif
#include <errno.h>
#include <string.h>
#include <gst/base/gstbytewriter.h>
......@@ -219,7 +225,8 @@ write_to_fd_raw (GstIpcPipelineComm * comm, const void *data, size_t size)
gboolean ret = TRUE;
offset = 0;
GST_TRACE_OBJECT (comm->element, "Writing %zu bytes to fdout", size);
GST_TRACE_OBJECT (comm->element, "Writing %u bytes to fdout",
(unsigned) size);
while (size) {
ssize_t written =
write (comm->fdout, (const unsigned char *) data + offset, size);
......
......@@ -295,8 +295,8 @@ gst_ipc_pipeline_src_log_queue (GstIpcPipelineSrc * src)
} else if (GST_IS_QUERY (object)) {
GST_LOG_OBJECT (src, " #%u: %s query", n, GST_QUERY_TYPE_NAME (object));
} else if (GST_IS_BUFFER (object)) {
GST_LOG_OBJECT (src, " #%u: %zu bytes buffer", n,
(size_t) gst_buffer_get_size (object));
GST_LOG_OBJECT (src, " #%u: %" G_GSIZE_FORMAT " bytes buffer", n,
gst_buffer_get_size (object));
} else {
GST_LOG_OBJECT (src, " #%u: unknown item in queue", n);
}
......
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