Original commit message from CVS:
* configure.ac: Disable various code when compiling for MinGW.
* gst/elements/Makefile.am:
* gst/elements/gstelements.c:
* gst/elements/gstfdsrc.c: (gst_fdsrc_get):
* gst/elements/gstfilesrc.c: (gst_filesrc_init), (gst_filesrc_get):
* gst/registries/gstxmlregistry.c: (make_dir):
2004-04-13 David Schleef <ds@schleef.org>
2004-04-13 David Schleef <ds@schleef.org>
+ * configure.ac: Disable various code when compiling for MinGW.
+ * gst/elements/Makefile.am:
+ * gst/elements/gstelements.c:
+ * gst/elements/gstfdsrc.c: (gst_fdsrc_get):
+ * gst/elements/gstfilesrc.c: (gst_filesrc_init), (gst_filesrc_get):
+ * gst/registries/gstxmlregistry.c: (make_dir):
+
+2004-04-13 David Schleef <ds@schleef.org>
+
* gst/Makefile.am:
* gst/gstcpu.c: (gst_cpuid_i386): Convert asm source into inline
assembly.
* gst/Makefile.am:
* gst/gstcpu.c: (gst_cpuid_i386): Convert asm source into inline
assembly.
AS_COMPILER_FLAG(-fno-common,GST_INT_CFLAGS="$GST_INT_CFLAGS -fno-common",)
fi
AS_COMPILER_FLAG(-fno-common,GST_INT_CFLAGS="$GST_INT_CFLAGS -fno-common",)
fi
+dnl HAVE_WIN32 currently means "disable POSIXisms".
+case "$host" in
+ *-*-mingw*)
+ AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
+ ;;
+ *)
+ ;;
+esac
+
dnl Check for essential libraries first:
dnl ====================================
dnl Check for essential libraries first:
dnl ====================================
plugin_LTLIBRARIES = libgstelements.la
plugin_LTLIBRARIES = libgstelements.la
+# FIXME:
+# Disable multifilesrc on Windows, cause it uses mmap excessively
+# and I don't feel like fixing it yet. See also the disablement
+# in gstelements.c.
+if AS_LIBTOOL_WIN32
+multifilesrc =
+else
+multifilesrc = gstmultifilesrc.c
+endif
+
libgstelements_la_DEPENDENCIES = ../libgstreamer-@GST_MAJORMINOR@.la
libgstelements_la_SOURCES = \
gstaggregator.c \
libgstelements_la_DEPENDENCIES = ../libgstreamer-@GST_MAJORMINOR@.la
libgstelements_la_SOURCES = \
gstaggregator.c \
gstfdsrc.c \
gstidentity.c \
gstmd5sink.c \
gstfdsrc.c \
gstidentity.c \
gstmd5sink.c \
gstpipefilter.c \
gstshaper.c \
gststatistics.c \
gstpipefilter.c \
gstshaper.c \
gststatistics.c \
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
{"identity", GST_RANK_NONE, gst_identity_get_type},
{"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
{"identity", GST_RANK_NONE, gst_identity_get_type},
{"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
{"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
{"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
{"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
{"shaper", GST_RANK_NONE, gst_shaper_get_type},
{"statistics", GST_RANK_NONE, gst_statistics_get_type},
{"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
{"shaper", GST_RANK_NONE, gst_shaper_get_type},
{"statistics", GST_RANK_NONE, gst_statistics_get_type},
GstFdSrc *src;
GstBuffer *buf;
glong readbytes;
GstFdSrc *src;
GstBuffer *buf;
glong readbytes;
fd_set readfds;
struct timeval t, *tp = &t;
gint retval;
fd_set readfds;
struct timeval t, *tp = &t;
gint retval;
src = GST_FDSRC (gst_pad_get_parent (pad));
/* create the buffer */
buf = gst_buffer_new_and_alloc (src->blocksize);
src = GST_FDSRC (gst_pad_get_parent (pad));
/* create the buffer */
buf = gst_buffer_new_and_alloc (src->blocksize);
FD_ZERO (&readfds);
FD_SET (src->fd, &readfds);
FD_ZERO (&readfds);
FD_SET (src->fd, &readfds);
gst_element_set_eos (GST_ELEMENT (src));
return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
gst_element_set_eos (GST_ELEMENT (src));
return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
do {
readbytes = read (src->fd, GST_BUFFER_DATA (buf), src->blocksize);
do {
readbytes = read (src->fd, GST_BUFFER_DATA (buf), src->blocksize);
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
src->pagesize = getpagesize ();
src->pagesize = getpagesize ();
src->filename = NULL;
src->fd = 0;
src->filename = NULL;
src->fd = 0;
(S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
static gboolean
(S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
static gboolean
dirname = g_strndup (filename, strrchr (filename, '/') - filename);
if (stat (dirname, &dirstat) == -1 && errno == ENOENT) {
dirname = g_strndup (filename, strrchr (filename, '/') - filename);
if (stat (dirname, &dirstat) == -1 && errno == ENOENT) {
- if (mkdir (dirname, dirmode) != 0) {
+#ifndef HAVE_WIN32
+ if (mkdir (dirname, DIRMODE) != 0) {
if (make_dir (dirname) != TRUE) {
g_free (dirname);
return FALSE;
} else {
if (make_dir (dirname) != TRUE) {
g_free (dirname);
return FALSE;
} else {
- if (mkdir (dirname, dirmode) != 0)
+ if (mkdir (dirname, DIRMODE) != 0)
+#else
+ return FALSE;
+#endif
plugin_LTLIBRARIES = libgstelements.la
plugin_LTLIBRARIES = libgstelements.la
+# FIXME:
+# Disable multifilesrc on Windows, cause it uses mmap excessively
+# and I don't feel like fixing it yet. See also the disablement
+# in gstelements.c.
+if AS_LIBTOOL_WIN32
+multifilesrc =
+else
+multifilesrc = gstmultifilesrc.c
+endif
+
libgstelements_la_DEPENDENCIES = ../libgstreamer-@GST_MAJORMINOR@.la
libgstelements_la_SOURCES = \
gstaggregator.c \
libgstelements_la_DEPENDENCIES = ../libgstreamer-@GST_MAJORMINOR@.la
libgstelements_la_SOURCES = \
gstaggregator.c \
gstfdsrc.c \
gstidentity.c \
gstmd5sink.c \
gstfdsrc.c \
gstidentity.c \
gstmd5sink.c \
gstpipefilter.c \
gstshaper.c \
gststatistics.c \
gstpipefilter.c \
gstshaper.c \
gststatistics.c \
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
{"identity", GST_RANK_NONE, gst_identity_get_type},
{"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
{"identity", GST_RANK_NONE, gst_identity_get_type},
{"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
{"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
{"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
{"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
{"shaper", GST_RANK_NONE, gst_shaper_get_type},
{"statistics", GST_RANK_NONE, gst_statistics_get_type},
{"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
{"shaper", GST_RANK_NONE, gst_shaper_get_type},
{"statistics", GST_RANK_NONE, gst_statistics_get_type},
GstFdSrc *src;
GstBuffer *buf;
glong readbytes;
GstFdSrc *src;
GstBuffer *buf;
glong readbytes;
fd_set readfds;
struct timeval t, *tp = &t;
gint retval;
fd_set readfds;
struct timeval t, *tp = &t;
gint retval;
src = GST_FDSRC (gst_pad_get_parent (pad));
/* create the buffer */
buf = gst_buffer_new_and_alloc (src->blocksize);
src = GST_FDSRC (gst_pad_get_parent (pad));
/* create the buffer */
buf = gst_buffer_new_and_alloc (src->blocksize);
FD_ZERO (&readfds);
FD_SET (src->fd, &readfds);
FD_ZERO (&readfds);
FD_SET (src->fd, &readfds);
gst_element_set_eos (GST_ELEMENT (src));
return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
gst_element_set_eos (GST_ELEMENT (src));
return GST_DATA (gst_event_new (GST_EVENT_EOS));
}
do {
readbytes = read (src->fd, GST_BUFFER_DATA (buf), src->blocksize);
do {
readbytes = read (src->fd, GST_BUFFER_DATA (buf), src->blocksize);
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
src->pagesize = getpagesize ();
src->pagesize = getpagesize ();
src->filename = NULL;
src->fd = 0;
src->filename = NULL;
src->fd = 0;