mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-03 04:52:28 +00:00
ipcpipeline: Minimal fixes that allow building with MSVC
This commit is contained in:
parent
c8db7a9127
commit
b7d91711f7
2 changed files with 11 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue