mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-04 13:45:52 +00:00
ipcpipeline: Minimal fixes that allow building with MSVC
This commit is contained in:
parent
c8db7a9127
commit
b7d91711f7
|
@ -24,7 +24,13 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
# include <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 <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gst/base/gstbytewriter.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;
|
gboolean ret = TRUE;
|
||||||
|
|
||||||
offset = 0;
|
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) {
|
while (size) {
|
||||||
ssize_t written =
|
ssize_t written =
|
||||||
write (comm->fdout, (const unsigned char *) data + offset, size);
|
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)) {
|
} else if (GST_IS_QUERY (object)) {
|
||||||
GST_LOG_OBJECT (src, " #%u: %s query", n, GST_QUERY_TYPE_NAME (object));
|
GST_LOG_OBJECT (src, " #%u: %s query", n, GST_QUERY_TYPE_NAME (object));
|
||||||
} else if (GST_IS_BUFFER (object)) {
|
} else if (GST_IS_BUFFER (object)) {
|
||||||
GST_LOG_OBJECT (src, " #%u: %zu bytes buffer", n,
|
GST_LOG_OBJECT (src, " #%u: %" G_GSIZE_FORMAT " bytes buffer", n,
|
||||||
(size_t) gst_buffer_get_size (object));
|
gst_buffer_get_size (object));
|
||||||
} else {
|
} else {
|
||||||
GST_LOG_OBJECT (src, " #%u: unknown item in queue", n);
|
GST_LOG_OBJECT (src, " #%u: unknown item in queue", n);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue