+2004-05-06 David Schleef <ds@schleef.org>
+
+ Changes to handle compilers that don't have variadic macro
+ support. In particular, glib headers define some inlines
+ that need G_LOG_DOMAIN defined. Additional fixes for MSVC
+ builds.
+ * gst/Makefile.am:
+ * gst/cothreads.c:
+ * gst/elements/gstfdsink.c:
+ * gst/elements/gstfdsrc.c:
+ * gst/elements/gstfilesink.c:
+ * gst/elements/gstfilesrc.c:
+ * gst/gst_private.h:
+ * gst/gstatomic.c:
+ * gst/gstcaps.c: (gst_caps_append):
+ * gst/gstcpu.c: (gst_cpuid_i386):
+ * gst/gstelement.c:
+ * gst/gsterror.c:
+ * gst/gstfilter.c:
+ * gst/gstinfo.h:
+ * gst/gstprobe.c:
+ * gst/gstquery.c:
+ * gst/gstregistry.c:
+ * gst/gststructure.c:
+ * gst/gsttaginterface.c:
+ * gst/gsttrace.c: (gst_trace_new):
+ * gst/gsttrashstack.c:
+ * gst/gsturi.c:
+ * gst/gstvalue.c:
+ * gst/parse/grammar.y:
+ * gst/parse/parse.l:
+ * tools/gst-inspect.c: (main):
+ * tools/gst-launch.c: (main):
+ * tools/gst-xmlinspect.c: (PUT_STRING):
+
2004-05-06 Benjamin Otte <in7y118@public.uni-hamburg.de>
* gst/elements/gstfilesrc.c: (gst_filesrc_get),
mv gstmarshal.h.tmp gstmarshal.h
gstmarshal.c: gstmarshal.list
- echo "#include \"glib-object.h\"" >gstmarshal.c.tmp
- echo "#include \"gst_private.h\"" >> gstmarshal.c.tmp
+ echo "#include \"gst_private.h\"" > gstmarshal.c.tmp
+ echo "#include \"glib-object.h\"" >> gstmarshal.c.tmp
echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
glib-genmarshal --body --prefix=gst_marshal $^ >> gstmarshal.c.tmp
mv gstmarshal.c.tmp gstmarshal.c
gstenumtypes.c: $(gst_headers)
glib-mkenums \
- --fhead "#include <gst/gst.h>" \
+ --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
* Boston, MA 02111-1307, USA.
*/
+
+#include "gst_private.h"
#include <glib.h>
#include <sys/time.h>
#include <errno.h>
#include <sys/mman.h>
-#include "gst_private.h"
-
#include "cothreads.h"
#include "gstarch.h"
#include "gstinfo.h"
#endif
#include "gstfdsink.h"
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
#define GST_CAT_DEFAULT gst_fdsink_debug
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include "gst/gst_private.h"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <stdlib.h>
#include <errno.h>
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include "gstfdsrc.h"
#define DEFAULT_BLOCKSIZE 4096
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
GST_DEBUG_CATEGORY_STATIC (gst_filesink_debug);
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifdef HAVE_MMAP
#include <sys/mman.h>
#endif
#include "../gst-i18n-lib.h"
+/* FIXME we should be using glib for this */
+#ifndef S_ISREG
+#define S_ISREG(mode) ((mode)&_S_IFREG)
+#endif
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode)&_S_IFDIR)
+#endif
+#ifndef S_ISSOCK
+#define S_ISSOCK(x) (0)
+#endif
/**********************************************************************
* GStreamer Default File Source
# include "config.h"
#endif
+/* This needs to be before glib.h, since it might be used in inline
+ * functions */
+extern const char *g_log_domain_gstreamer;
+
#include <glib.h>
#include <stdlib.h>
#include <string.h>
-extern const char *g_log_domain_gstreamer;
-
gboolean __gst_in_valgrind (void);
/*** debugging categories *****************************************************/
extern GstDebugCategory *GST_CAT_PARAMS;
extern GstDebugCategory *GST_CAT_CALL_TRACE;
+#else
+
+#define GST_CAT_GST_INIT NULL
+#define GST_CAT_COTHREADS NULL
+#define GST_CAT_COTHREAD_SWITCH NULL
+#define GST_CAT_AUTOPLUG NULL
+#define GST_CAT_AUTOPLUG_ATTEMPT NULL
+#define GST_CAT_PARENTAGE NULL
+#define GST_CAT_STATES NULL
+#define GST_CAT_PLANNING NULL
+#define GST_CAT_SCHEDULING NULL
+#define GST_CAT_DATAFLOW NULL
+#define GST_CAT_BUFFER NULL
+#define GST_CAT_CAPS NULL
+#define GST_CAT_CLOCK NULL
+#define GST_CAT_ELEMENT_PADS NULL
+#define GST_CAT_PADS NULL
+#define GST_CAT_PIPELINE NULL
+#define GST_CAT_PLUGIN_LOADING NULL
+#define GST_CAT_PLUGIN_INFO NULL
+#define GST_CAT_PROPERTIES NULL
+#define GST_CAT_THREAD NULL
+#define GST_CAT_XML NULL
+#define GST_CAT_NEGOTIATION NULL
+#define GST_CAT_REFCOUNTING NULL
+#define GST_CAT_ERROR_SYSTEM NULL
+#define GST_CAT_EVENT NULL
+#define GST_CAT_PARAMS NULL
+#define GST_CAT_CALL_TRACE NULL
+
#endif
#endif /* __GST_PRIVATE_H__ */
#define GST_IMPLEMENT_INLINES 1
#define __GST_ATOMIC_C__
+#include "gst_private.h"
#include "gstatomic.h"
#include "gstatomic_impl.h"
#include <string.h>
#include <signal.h>
-#include <gst/gst.h>
-
#include "gst_private.h"
+#include <gst/gst.h>
#define CAPS_POISON(caps) G_STMT_START{ \
if (caps) { \
CAPS_POISON (caps2);
#endif
if (gst_caps_is_any (caps1) || gst_caps_is_any (caps2)) {
+ /* FIXME: this leaks */
caps1->flags |= GST_CAPS_FLAGS_ANY;
for (i = 0; i < caps2->structs->len; i++) {
structure = gst_caps_get_structure (caps2, i);
* Boston, MA 02111-1307, USA.
*/
+#include "gst_private.h"
#include <glib.h>
-#include "gst_private.h"
#include "gstcpu.h"
#include "gstinfo.h"
* Boston, MA 02111-1307, USA.
*/
+#include "gst_private.h"
#include <glib.h>
#include <stdarg.h>
#include <gobject/gvaluecollector.h>
-#include "gst_private.h"
#include "gstelement.h"
#include "gstbin.h"
#include "config.h"
#endif
-#include <gst/gst.h>
#include "gst_private.h"
+#include <gst/gst.h>
#include "gst-i18n-lib.h"
#define TABLE(t, d, a, b) t[GST_ ## d ## _ERROR_ ## a] = g_strdup (b)
* Boston, MA 02111-1307, USA.
*/
+#include "gst_private.h"
#include <gst/gstfilter.h>
/**
void gst_debug_print_stack_trace (void);
/* timestamp debugging macros */
-#define GST_TIME_FORMAT "u:%02u:%02u:%09u"
+#define GST_TIME_FORMAT "u:%02u:%02u.%09u"
#define GST_TIME_ARGS(t) \
(guint) (t / (GST_SECOND * 60 * 60)), \
(guint) ((t / (GST_SECOND * 60)) % 60), \
*/
-#include "gstprobe.h"
#include "gst_private.h"
+#include "gstprobe.h"
/**
* gst_probe_new:
#include <string.h>
-#include "gstquery.h"
#include "gst_private.h"
+#include "gstquery.h"
static GList *_gst_queries = NULL;
static GHashTable *_nick_to_query = NULL;
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include "gst_private.h"
#include <glib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <string.h>
-#include "gst_private.h"
#include "gstinfo.h"
#include "gstregistry.h"
#include <string.h>
+#include "gst_private.h"
#include <gst/gst.h>
#include <gobject/gvaluecollector.h>
-#include "gst_private.h"
typedef struct _GstStructureField GstStructureField;
# include "config.h"
#endif
+#include "gst_private.h"
#include "gsttaginterface.h"
#include <gobject/gvaluecollector.h>
#include <string.h>
-#include "gst_private.h"
GST_DEBUG_CATEGORY_STATIC (gst_tag_interface_debug);
#define GST_CAT_DEFAULT tag_tag_interface_debug
# include "config.h"
#endif
+#include "gst_private.h"
#include "gsttaginterface.h"
#include <gobject/gvaluecollector.h>
#include <string.h>
-#include "gst_private.h"
GST_DEBUG_CATEGORY_STATIC (gst_tag_interface_debug);
#define GST_CAT_DEFAULT tag_tag_interface_debug
#define S_IWUSR S_IWRITE
#endif
#ifndef S_IRUSR
-#define S_IDUSR S_IREAD
+#define S_IRUSR S_IREAD
#endif
trace->fd =
open (trace->filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
#define GST_IMPLEMENT_INLINES 1
#define __GST_TRASH_STACK_C__
+#include "gst_private.h"
#include "gsttrashstack.h"
# include "config.h"
#endif
+#include "gst_private.h"
#include "gsturi.h"
#include "gstinfo.h"
#include "gstregistrypool.h"
#include "gstmarshal.h"
-#include "gst_private.h"
#include <string.h>
#include <string.h>
#include <ctype.h>
+#include "gst_private.h"
#include <gst/gst.h>
#include <gobject/gvaluecollector.h>
-#include "gst_private.h"
typedef struct _GstValueUnionInfo GstValueUnionInfo;
struct _GstValueUnionInfo
}G_STMT_END
#endif
-#else
+#elif defined(G_HAVE_ISO_VARARGS)
#define SET_ERROR(error, type, ...) G_STMT_START{ \
GST_CAT_ERROR (GST_CAT_PIPELINE, "error while parsing" ); \
# define YYDEBUG 1
#endif
-#endif /* G_HAVE_ISO_VARARGS */
+#else
+
+static inline void
+SET_ERROR (GError **error, gint type, const char *format, ...)
+{
+ if (error) {
+ if (*error) {
+ g_warning ("error while parsing");
+ } else {
+ va_list varargs;
+ char *string;
+
+ va_start (varargs, format);
+ string = g_strdup_vprintf (format, varargs);
+ va_end (varargs);
+
+ g_set_error (error, GST_PARSE_ERROR, type, string);
+
+ g_free (string);
+ }
+ }
+}
+
+#ifndef GST_DISABLE_GST_DEBUG
+# define YYDEBUG 1
+static inline void
+YYPRINTF(const char *format, ...)
+{
+ va_list varargs;
+ gchar *temp;
+
+ va_start (varargs, format);
+ temp = g_strdup_vprintf ( format, varargs );
+ GST_CAT_LOG (GST_CAT_PIPELINE, "%s", temp);
+ g_free (temp);
+ va_end (varargs);
+}
+#endif
+
+#endif
#define GST_BIN_MAKE(res, type, chainval, assign) G_STMT_START{ \
chain_t *chain = chainval; \
GSList *walk; \
GstBin *bin = (GstBin *) gst_element_factory_make (type, NULL); \
if (!chain) { \
- ERROR (GST_PARSE_ERROR_EMPTY_BIN, _("specified empty bin \"%s\", not allowed"), type); \
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_EMPTY_BIN, _("specified empty bin \"%s\", not allowed"), type); \
g_slist_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
g_slist_free (assign); \
YYERROR; \
} else if (!bin) { \
- ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no bin \"%s\", skipping"), type); \
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no bin \"%s\", skipping"), type); \
g_slist_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
g_slist_free (assign); \
res = chain; \
}
g_object_set_property (G_OBJECT (element), value, &v);
} else {
- ERROR (GST_PARSE_ERROR_NO_SUCH_PROPERTY, _("no property \"%s\" in element \"%s\""), value, GST_ELEMENT_NAME (element));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_PROPERTY, _("no property \"%s\" in element \"%s\""), value, GST_ELEMENT_NAME (element));
}
out:
return;
error:
- ERROR (GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
_("could not set property \"%s\" in element \"%s\" to \"%s\""),
value, GST_ELEMENT_NAME (element), pos);
goto out;
error_conversion:
- ERROR (GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_COULD_NOT_SET_PROPERTY,
_("could not convert \"%s\" so that it fits property \"%s\" in element \"%s\""),
pos, value, GST_ELEMENT_NAME (element));
goto out;
return 0;
error:
- ERROR (GST_PARSE_ERROR_LINK, _("could not link %s to %s"), GST_ELEMENT_NAME (src), GST_ELEMENT_NAME (sink));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("could not link %s to %s"), GST_ELEMENT_NAME (src), GST_ELEMENT_NAME (sink));
gst_parse_free_link (link);
return -1;
}
element: IDENTIFIER { $$ = gst_element_factory_make ($1, NULL);
if (!$$)
- ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no element \"%s\""), $1);
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT, _("no element \"%s\""), $1);
gst_parse_strfree ($1);
if (!$$)
YYERROR;
if ($2) {
$$->caps = gst_caps_from_string ($2);
if (!$$->caps)
- ERROR (GST_PARSE_ERROR_LINK, _("could not parse caps \"%s\""), $2);
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("could not parse caps \"%s\""), $2);
gst_parse_strfree ($2);
}
$$->sink_name = $3->src_name;
| bin { $$ = $1; }
| chain chain { if ($1->back && $2->front) {
if (!$1->back->sink_name) {
- ERROR (GST_PARSE_ERROR_LINK, _("link without source element"));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
gst_parse_free_link ($1->back);
} else {
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $1->back);
}
if (!$2->front->src_name) {
- ERROR (GST_PARSE_ERROR_LINK, _("link without sink element"));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
gst_parse_free_link ($2->front);
} else {
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
for (walk = $2; walk; walk = walk->next) {
link_t *link = (link_t *) walk->data;
if (!link->sink_name && walk->next) {
- ERROR (GST_PARSE_ERROR_LINK, _("link without sink element"));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
gst_parse_free_link (link);
} else if (!link->src_name && !link->src) {
- ERROR (GST_PARSE_ERROR_LINK, _("link without source element"));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
gst_parse_free_link (link);
} else {
if (walk->next) {
| chain error { $$ = $1; }
| link chain { if ($2->front) {
if (!$2->front->src_name) {
- ERROR (GST_PARSE_ERROR_LINK, _("link without source element"));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
gst_parse_free_link ($2->front);
} else {
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
GstElement *element =
gst_element_make_from_uri (GST_URI_SRC, $1, NULL);
if (!element) {
- ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT,
_("no source element for URI \"%s\""), $1);
} else {
$$->front->src = element;
$$->elements = g_slist_prepend ($$->elements, element);
}
} else {
- ERROR (GST_PARSE_ERROR_LINK,
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK,
_("no element to link URI \"%s\" to"), $1);
}
g_free ($1);
| link PARSE_URL { GstElement *element =
gst_element_make_from_uri (GST_URI_SINK, $2, NULL);
if (!element) {
- ERROR (GST_PARSE_ERROR_NO_SUCH_ELEMENT,
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_NO_SUCH_ELEMENT,
_("no sink element for URI \"%s\""), $2);
YYERROR;
} else if ($1->sink_name || $1->sink_pads) {
- ERROR (GST_PARSE_ERROR_LINK,
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK,
_("could not link sink element for URI \"%s\""), $2);
YYERROR;
} else {
g_free ($2);
}
;
-graph: /* NOP */ { ERROR (GST_PARSE_ERROR_EMPTY, _("empty pipeline not allowed"));
+graph: /* NOP */ { SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_EMPTY, _("empty pipeline not allowed"));
$$ = (graph_t *) graph;
}
| chain { $$ = (graph_t *) graph;
if ($1->front) {
if (!$1->front->src_name) {
- ERROR (GST_PARSE_ERROR_LINK, _("link without source element"));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without source element"));
gst_parse_free_link ($1->front);
} else {
$$->links = g_slist_prepend ($$->links, $1->front);
}
if ($1->back) {
if (!$1->back->sink_name) {
- ERROR (GST_PARSE_ERROR_LINK, _("link without sink element"));
+ SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK, _("link without sink element"));
gst_parse_free_link ($1->back);
} else {
$$->links = g_slist_prepend ($$->links, $1->back);
#elif defined(G_HAVE_GNUC_VARARGS)
#define PRINT(args...) GST_CAT_DEBUG (GST_CAT_PIPELINE, "flex: " args)
#else
-#define PRINT(args...)
+static inline void
+PRINT (const char *format, ...)
+{
+ va_list varargs;
+
+ va_start (varargs, format);
+ GST_CAT_LEVEL_LOG_valist (GST_CAT_PIPELINE, GST_LEVEL_DEBUG, NULL,
+ format, varargs);
+ va_end (varargs);
+}
#endif
#define YY_DECL int _gst_parse_yylex (YYSTYPE *lvalp)
#endif
#include "gstfdsink.h"
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
#define GST_CAT_DEFAULT gst_fdsink_debug
* Boston, MA 02111-1307, USA.
*/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include "gst/gst_private.h"
+
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <stdlib.h>
#include <errno.h>
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include "gstfdsrc.h"
#define DEFAULT_BLOCKSIZE 4096
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
GST_DEBUG_CATEGORY_STATIC (gst_filesink_debug);
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#ifdef HAVE_MMAP
#include <sys/mman.h>
#endif
#include "../gst-i18n-lib.h"
+/* FIXME we should be using glib for this */
+#ifndef S_ISREG
+#define S_ISREG(mode) ((mode)&_S_IFREG)
+#endif
+#ifndef S_ISDIR
+#define S_ISDIR(mode) ((mode)&_S_IFDIR)
+#endif
+#ifndef S_ISSOCK
+#define S_ISSOCK(x) (0)
+#endif
/**********************************************************************
* GStreamer Default File Source
POPT_TABLEEND
};
+#ifdef GETTEXT_PACKAGE
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif
gst_init_with_popt_table (&argc, &argv, options);
gst_control_init (&argc, &argv);
# include "config.h"
#endif
+/* FIXME: hack alert */
+#ifdef _MSC_VER
+#define DISABLE_FAULT_HANDLER
+#endif
+
#include <string.h>
#include <stdlib.h>
#include <signal.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
+#ifndef DISABLE_FAULT_HANDLER
#include <sys/wait.h>
+#endif
#include <locale.h> /* for LC_ALL */
#include "gst/gst-i18n-app.h"
#endif
extern volatile gboolean glib_on_error_halt;
+
+#ifndef DISABLE_FAULT_HANDLER
static void fault_restore (void);
static void fault_spin (void);
static void sigint_restore (void);
+#endif
static gint max_iterations = 0;
static guint64 iterations = 0;
}
#endif
+#ifndef DISABLE_FAULT_HANDLER
#ifndef USE_SIGINFO
static void
fault_handler_sighandler (int signum)
sigaction (SIGSEGV, &action, NULL);
sigaction (SIGQUIT, &action, NULL);
}
+#endif
static void
print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
gst_tag_list_foreach (tags, print_tag, NULL);
}
+#ifndef DISABLE_FAULT_HANDLER
/* we only use sighandler here because the registers are not important */
static void
sigint_handler_sighandler (int signum)
sigaction (SIGUSR1, &action, NULL);
sigaction (SIGUSR2, &action, NULL);
}
+#endif
int
main (int argc, char *argv[])
free (malloc (8)); /* -lefence */
+#ifdef GETTEXT_PACKAGE
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
+#endif
gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE);
}
argc = j;
+#ifndef DISABLE_FAULT_HANDLER
if (!no_fault)
fault_setup ();
sigint_setup ();
play_signal_setup ();
+#endif
if (trace) {
if (!gst_alloc_trace_available ()) {
#include <gst/control/control.h>
#include <string.h>
#include <locale.h>
+#include <glib/gprintf.h>
#define PUT_START_TAG(pfx,tag) \
G_STMT_START{ \
g_print ("%*.*s"str"\n", pfx, pfx, "" , ##a); \
}G_STMT_END
+#else
+
+static inline void
+PUT_STRING (int pfx, const char *format, ...)
+{
+ va_list varargs;
+
+ g_print ("%*.*s", pfx, pfx, "");
+ va_start (varargs, format);
+ g_vprintf (format, varargs);
+ va_end (varargs);
+ g_print ("\n");
+}
+
#endif
static void