mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-07 07:58:51 +00:00
configure.ac: Disable various code when compiling for MinGW.
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):
This commit is contained in:
parent
26d7745271
commit
726bbbf7c6
11 changed files with 65 additions and 5 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
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>
|
2004-04-13 David Schleef <ds@schleef.org>
|
||||||
|
|
||||||
* gst/Makefile.am:
|
* gst/Makefile.am:
|
||||||
|
|
|
@ -233,6 +233,15 @@ if test "x$GST_CVS" = "xyes"; then
|
||||||
AS_COMPILER_FLAG(-fno-common,GST_INT_CFLAGS="$GST_INT_CFLAGS -fno-common",)
|
AS_COMPILER_FLAG(-fno-common,GST_INT_CFLAGS="$GST_INT_CFLAGS -fno-common",)
|
||||||
fi
|
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 Check for essential libraries first:
|
||||||
dnl ====================================
|
dnl ====================================
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,16 @@ plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
|
||||||
|
|
||||||
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_DEPENDENCIES = ../libgstreamer-@GST_MAJORMINOR@.la
|
||||||
libgstelements_la_SOURCES = \
|
libgstelements_la_SOURCES = \
|
||||||
gstaggregator.c \
|
gstaggregator.c \
|
||||||
|
@ -21,7 +31,7 @@ libgstelements_la_SOURCES = \
|
||||||
gstfdsrc.c \
|
gstfdsrc.c \
|
||||||
gstidentity.c \
|
gstidentity.c \
|
||||||
gstmd5sink.c \
|
gstmd5sink.c \
|
||||||
gstmultifilesrc.c \
|
$(multifilesrc) \
|
||||||
gstpipefilter.c \
|
gstpipefilter.c \
|
||||||
gstshaper.c \
|
gstshaper.c \
|
||||||
gststatistics.c \
|
gststatistics.c \
|
||||||
|
|
|
@ -65,7 +65,9 @@ static struct _elements_entry _elements[] = {
|
||||||
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
|
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
|
||||||
{"identity", GST_RANK_NONE, gst_identity_get_type},
|
{"identity", GST_RANK_NONE, gst_identity_get_type},
|
||||||
{"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
|
{"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
|
||||||
|
#ifndef HAVE_WIN32
|
||||||
{"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
|
{"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
|
||||||
|
#endif
|
||||||
{"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
|
{"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
|
||||||
{"shaper", GST_RANK_NONE, gst_shaper_get_type},
|
{"shaper", GST_RANK_NONE, gst_shaper_get_type},
|
||||||
{"statistics", GST_RANK_NONE, gst_statistics_get_type},
|
{"statistics", GST_RANK_NONE, gst_statistics_get_type},
|
||||||
|
|
|
@ -185,15 +185,19 @@ gst_fdsrc_get (GstPad * pad)
|
||||||
GstFdSrc *src;
|
GstFdSrc *src;
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
glong readbytes;
|
glong readbytes;
|
||||||
|
|
||||||
|
#ifndef HAVE_WIN32
|
||||||
fd_set readfds;
|
fd_set readfds;
|
||||||
struct timeval t, *tp = &t;
|
struct timeval t, *tp = &t;
|
||||||
gint retval;
|
gint retval;
|
||||||
|
#endif
|
||||||
|
|
||||||
src = GST_FDSRC (gst_pad_get_parent (pad));
|
src = GST_FDSRC (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
/* create the buffer */
|
/* create the buffer */
|
||||||
buf = gst_buffer_new_and_alloc (src->blocksize);
|
buf = gst_buffer_new_and_alloc (src->blocksize);
|
||||||
|
|
||||||
|
#ifndef HAVE_WIN32
|
||||||
FD_ZERO (&readfds);
|
FD_ZERO (&readfds);
|
||||||
FD_SET (src->fd, &readfds);
|
FD_SET (src->fd, &readfds);
|
||||||
|
|
||||||
|
@ -216,6 +220,7 @@ gst_fdsrc_get (GstPad * pad)
|
||||||
gst_element_set_eos (GST_ELEMENT (src));
|
gst_element_set_eos (GST_ELEMENT (src));
|
||||||
return GST_DATA (gst_event_new (GST_EVENT_EOS));
|
return GST_DATA (gst_event_new (GST_EVENT_EOS));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
do {
|
do {
|
||||||
readbytes = read (src->fd, GST_BUFFER_DATA (buf), src->blocksize);
|
readbytes = read (src->fd, GST_BUFFER_DATA (buf), src->blocksize);
|
||||||
|
|
|
@ -230,7 +230,9 @@ gst_filesrc_init (GstFileSrc * src)
|
||||||
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
|
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
|
||||||
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
|
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
|
||||||
|
|
||||||
|
#ifdef HAVE_MMAP
|
||||||
src->pagesize = getpagesize ();
|
src->pagesize = getpagesize ();
|
||||||
|
#endif
|
||||||
|
|
||||||
src->filename = NULL;
|
src->filename = NULL;
|
||||||
src->fd = 0;
|
src->fd = 0;
|
||||||
|
|
|
@ -301,7 +301,7 @@ get_time (const char *path, gboolean * is_dir)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* same as 0755 */
|
/* same as 0755 */
|
||||||
#define dirmode \
|
#define DIRMODE \
|
||||||
(S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
|
(S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -316,15 +316,19 @@ make_dir (gchar * filename)
|
||||||
dirname = g_strndup (filename, strrchr (filename, '/') - filename);
|
dirname = g_strndup (filename, strrchr (filename, '/') - filename);
|
||||||
|
|
||||||
if (stat (dirname, &dirstat) == -1 && errno == ENOENT) {
|
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) {
|
if (make_dir (dirname) != TRUE) {
|
||||||
g_free (dirname);
|
g_free (dirname);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
if (mkdir (dirname, dirmode) != 0)
|
if (mkdir (dirname, DIRMODE) != 0)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
g_free (dirname);
|
g_free (dirname);
|
||||||
|
|
|
@ -8,6 +8,16 @@ plugindir = $(libdir)/gstreamer-@GST_MAJORMINOR@
|
||||||
|
|
||||||
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_DEPENDENCIES = ../libgstreamer-@GST_MAJORMINOR@.la
|
||||||
libgstelements_la_SOURCES = \
|
libgstelements_la_SOURCES = \
|
||||||
gstaggregator.c \
|
gstaggregator.c \
|
||||||
|
@ -21,7 +31,7 @@ libgstelements_la_SOURCES = \
|
||||||
gstfdsrc.c \
|
gstfdsrc.c \
|
||||||
gstidentity.c \
|
gstidentity.c \
|
||||||
gstmd5sink.c \
|
gstmd5sink.c \
|
||||||
gstmultifilesrc.c \
|
$(multifilesrc) \
|
||||||
gstpipefilter.c \
|
gstpipefilter.c \
|
||||||
gstshaper.c \
|
gstshaper.c \
|
||||||
gststatistics.c \
|
gststatistics.c \
|
||||||
|
|
|
@ -65,7 +65,9 @@ static struct _elements_entry _elements[] = {
|
||||||
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
|
{"filesink", GST_RANK_NONE, gst_filesink_get_type},
|
||||||
{"identity", GST_RANK_NONE, gst_identity_get_type},
|
{"identity", GST_RANK_NONE, gst_identity_get_type},
|
||||||
{"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
|
{"md5sink", GST_RANK_NONE, gst_md5sink_get_type},
|
||||||
|
#ifndef HAVE_WIN32
|
||||||
{"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
|
{"multifilesrc", GST_RANK_NONE, gst_multifilesrc_get_type},
|
||||||
|
#endif
|
||||||
{"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
|
{"pipefilter", GST_RANK_NONE, gst_pipefilter_get_type},
|
||||||
{"shaper", GST_RANK_NONE, gst_shaper_get_type},
|
{"shaper", GST_RANK_NONE, gst_shaper_get_type},
|
||||||
{"statistics", GST_RANK_NONE, gst_statistics_get_type},
|
{"statistics", GST_RANK_NONE, gst_statistics_get_type},
|
||||||
|
|
|
@ -185,15 +185,19 @@ gst_fdsrc_get (GstPad * pad)
|
||||||
GstFdSrc *src;
|
GstFdSrc *src;
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
glong readbytes;
|
glong readbytes;
|
||||||
|
|
||||||
|
#ifndef HAVE_WIN32
|
||||||
fd_set readfds;
|
fd_set readfds;
|
||||||
struct timeval t, *tp = &t;
|
struct timeval t, *tp = &t;
|
||||||
gint retval;
|
gint retval;
|
||||||
|
#endif
|
||||||
|
|
||||||
src = GST_FDSRC (gst_pad_get_parent (pad));
|
src = GST_FDSRC (gst_pad_get_parent (pad));
|
||||||
|
|
||||||
/* create the buffer */
|
/* create the buffer */
|
||||||
buf = gst_buffer_new_and_alloc (src->blocksize);
|
buf = gst_buffer_new_and_alloc (src->blocksize);
|
||||||
|
|
||||||
|
#ifndef HAVE_WIN32
|
||||||
FD_ZERO (&readfds);
|
FD_ZERO (&readfds);
|
||||||
FD_SET (src->fd, &readfds);
|
FD_SET (src->fd, &readfds);
|
||||||
|
|
||||||
|
@ -216,6 +220,7 @@ gst_fdsrc_get (GstPad * pad)
|
||||||
gst_element_set_eos (GST_ELEMENT (src));
|
gst_element_set_eos (GST_ELEMENT (src));
|
||||||
return GST_DATA (gst_event_new (GST_EVENT_EOS));
|
return GST_DATA (gst_event_new (GST_EVENT_EOS));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
do {
|
do {
|
||||||
readbytes = read (src->fd, GST_BUFFER_DATA (buf), src->blocksize);
|
readbytes = read (src->fd, GST_BUFFER_DATA (buf), src->blocksize);
|
||||||
|
|
|
@ -230,7 +230,9 @@ gst_filesrc_init (GstFileSrc * src)
|
||||||
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
|
gst_pad_set_formats_function (src->srcpad, gst_filesrc_get_formats);
|
||||||
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
|
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
|
||||||
|
|
||||||
|
#ifdef HAVE_MMAP
|
||||||
src->pagesize = getpagesize ();
|
src->pagesize = getpagesize ();
|
||||||
|
#endif
|
||||||
|
|
||||||
src->filename = NULL;
|
src->filename = NULL;
|
||||||
src->fd = 0;
|
src->fd = 0;
|
||||||
|
|
Loading…
Reference in a new issue