mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
Changes to handle compilers that don't have variadic macro support. In particular, glib headers define some inlines ...
Original commit message from CVS: 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):
This commit is contained in:
parent
f9bafab28f
commit
ca7539c40e
34 changed files with 246 additions and 53 deletions
35
ChangeLog
35
ChangeLog
|
@ -1,3 +1,38 @@
|
||||||
|
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>
|
2004-05-06 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||||
|
|
||||||
* gst/elements/gstfilesrc.c: (gst_filesrc_get),
|
* gst/elements/gstfilesrc.c: (gst_filesrc_get),
|
||||||
|
|
|
@ -227,8 +227,8 @@ gstmarshal.h: gstmarshal.list
|
||||||
mv gstmarshal.h.tmp gstmarshal.h
|
mv gstmarshal.h.tmp gstmarshal.h
|
||||||
|
|
||||||
gstmarshal.c: gstmarshal.list
|
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
|
echo "#include \"gstmarshal.h\"" >> gstmarshal.c.tmp
|
||||||
glib-genmarshal --body --prefix=gst_marshal $^ >> gstmarshal.c.tmp
|
glib-genmarshal --body --prefix=gst_marshal $^ >> gstmarshal.c.tmp
|
||||||
mv gstmarshal.c.tmp gstmarshal.c
|
mv gstmarshal.c.tmp gstmarshal.c
|
||||||
|
@ -243,7 +243,7 @@ gstenumtypes.h: $(gst_headers)
|
||||||
|
|
||||||
gstenumtypes.c: $(gst_headers)
|
gstenumtypes.c: $(gst_headers)
|
||||||
glib-mkenums \
|
glib-mkenums \
|
||||||
--fhead "#include <gst/gst.h>" \
|
--fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" \
|
||||||
--fprod "\n/* enumerations from \"@filename@\" */" \
|
--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[] = {" \
|
--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@\" }," \
|
--vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
@ -31,8 +33,6 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include "cothreads.h"
|
#include "cothreads.h"
|
||||||
#include "gstarch.h"
|
#include "gstarch.h"
|
||||||
#include "gstinfo.h"
|
#include "gstinfo.h"
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gstfdsink.h"
|
#include "gstfdsink.h"
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
|
||||||
#define GST_CAT_DEFAULT gst_fdsink_debug
|
#define GST_CAT_DEFAULT gst_fdsink_debug
|
||||||
|
|
|
@ -20,18 +20,21 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
#include "gst/gst_private.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gstfdsrc.h"
|
#include "gstfdsrc.h"
|
||||||
|
|
||||||
#define DEFAULT_BLOCKSIZE 4096
|
#define DEFAULT_BLOCKSIZE 4096
|
||||||
|
|
|
@ -33,7 +33,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_filesink_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_filesink_debug);
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_MMAP
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,6 +41,16 @@
|
||||||
|
|
||||||
#include "../gst-i18n-lib.h"
|
#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
|
* GStreamer Default File Source
|
||||||
|
|
|
@ -28,13 +28,15 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#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 <glib.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
extern const char *g_log_domain_gstreamer;
|
|
||||||
|
|
||||||
gboolean __gst_in_valgrind (void);
|
gboolean __gst_in_valgrind (void);
|
||||||
|
|
||||||
/*** debugging categories *****************************************************/
|
/*** debugging categories *****************************************************/
|
||||||
|
@ -71,6 +73,36 @@ extern GstDebugCategory *GST_CAT_EVENT;
|
||||||
extern GstDebugCategory *GST_CAT_PARAMS;
|
extern GstDebugCategory *GST_CAT_PARAMS;
|
||||||
extern GstDebugCategory *GST_CAT_CALL_TRACE;
|
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
|
||||||
|
|
||||||
#endif /* __GST_PRIVATE_H__ */
|
#endif /* __GST_PRIVATE_H__ */
|
||||||
|
|
|
@ -20,5 +20,6 @@
|
||||||
#define GST_IMPLEMENT_INLINES 1
|
#define GST_IMPLEMENT_INLINES 1
|
||||||
#define __GST_ATOMIC_C__
|
#define __GST_ATOMIC_C__
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include "gstatomic.h"
|
#include "gstatomic.h"
|
||||||
#include "gstatomic_impl.h"
|
#include "gstatomic_impl.h"
|
||||||
|
|
|
@ -23,9 +23,8 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#define CAPS_POISON(caps) G_STMT_START{ \
|
#define CAPS_POISON(caps) G_STMT_START{ \
|
||||||
if (caps) { \
|
if (caps) { \
|
||||||
|
@ -291,6 +290,7 @@ gst_caps_append (GstCaps * caps1, GstCaps * caps2)
|
||||||
CAPS_POISON (caps2);
|
CAPS_POISON (caps2);
|
||||||
#endif
|
#endif
|
||||||
if (gst_caps_is_any (caps1) || gst_caps_is_any (caps2)) {
|
if (gst_caps_is_any (caps1) || gst_caps_is_any (caps2)) {
|
||||||
|
/* FIXME: this leaks */
|
||||||
caps1->flags |= GST_CAPS_FLAGS_ANY;
|
caps1->flags |= GST_CAPS_FLAGS_ANY;
|
||||||
for (i = 0; i < caps2->structs->len; i++) {
|
for (i = 0; i < caps2->structs->len; i++) {
|
||||||
structure = gst_caps_get_structure (caps2, i);
|
structure = gst_caps_get_structure (caps2, i);
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include "gstcpu.h"
|
#include "gstcpu.h"
|
||||||
#include "gstinfo.h"
|
#include "gstinfo.h"
|
||||||
|
|
|
@ -20,10 +20,10 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <gobject/gvaluecollector.h>
|
#include <gobject/gvaluecollector.h>
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include "gstelement.h"
|
#include "gstelement.h"
|
||||||
#include "gstbin.h"
|
#include "gstbin.h"
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gst/gst.h>
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include <gst/gst.h>
|
||||||
#include "gst-i18n-lib.h"
|
#include "gst-i18n-lib.h"
|
||||||
|
|
||||||
#define TABLE(t, d, a, b) t[GST_ ## d ## _ERROR_ ## a] = g_strdup (b)
|
#define TABLE(t, d, a, b) t[GST_ ## d ## _ERROR_ ## a] = g_strdup (b)
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include <gst/gstfilter.h>
|
#include <gst/gstfilter.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -812,7 +812,7 @@ GST_LOG (const char *format, ...)
|
||||||
void gst_debug_print_stack_trace (void);
|
void gst_debug_print_stack_trace (void);
|
||||||
|
|
||||||
/* timestamp debugging macros */
|
/* timestamp debugging macros */
|
||||||
#define GST_TIME_FORMAT "u:%02u:%02u:%09u"
|
#define GST_TIME_FORMAT "u:%02u:%02u.%09u"
|
||||||
#define GST_TIME_ARGS(t) \
|
#define GST_TIME_ARGS(t) \
|
||||||
(guint) (t / (GST_SECOND * 60 * 60)), \
|
(guint) (t / (GST_SECOND * 60 * 60)), \
|
||||||
(guint) ((t / (GST_SECOND * 60)) % 60), \
|
(guint) ((t / (GST_SECOND * 60)) % 60), \
|
||||||
|
|
|
@ -21,8 +21,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "gstprobe.h"
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include "gstprobe.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gst_probe_new:
|
* gst_probe_new:
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "gstquery.h"
|
|
||||||
#include "gst_private.h"
|
#include "gst_private.h"
|
||||||
|
#include "gstquery.h"
|
||||||
|
|
||||||
static GList *_gst_queries = NULL;
|
static GList *_gst_queries = NULL;
|
||||||
static GHashTable *_nick_to_query = NULL;
|
static GHashTable *_nick_to_query = NULL;
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "gst_private.h"
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -33,7 +34,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include "gstinfo.h"
|
#include "gstinfo.h"
|
||||||
#include "gstregistry.h"
|
#include "gstregistry.h"
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gobject/gvaluecollector.h>
|
#include <gobject/gvaluecollector.h>
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
typedef struct _GstStructureField GstStructureField;
|
typedef struct _GstStructureField GstStructureField;
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,10 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include "gsttaginterface.h"
|
#include "gsttaginterface.h"
|
||||||
#include <gobject/gvaluecollector.h>
|
#include <gobject/gvaluecollector.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_tag_interface_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_tag_interface_debug);
|
||||||
#define GST_CAT_DEFAULT tag_tag_interface_debug
|
#define GST_CAT_DEFAULT tag_tag_interface_debug
|
||||||
|
|
|
@ -24,10 +24,10 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include "gsttaginterface.h"
|
#include "gsttaginterface.h"
|
||||||
#include <gobject/gvaluecollector.h>
|
#include <gobject/gvaluecollector.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_tag_interface_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_tag_interface_debug);
|
||||||
#define GST_CAT_DEFAULT tag_tag_interface_debug
|
#define GST_CAT_DEFAULT tag_tag_interface_debug
|
||||||
|
|
|
@ -74,7 +74,7 @@ gst_trace_new (gchar * filename, gint size)
|
||||||
#define S_IWUSR S_IWRITE
|
#define S_IWUSR S_IWRITE
|
||||||
#endif
|
#endif
|
||||||
#ifndef S_IRUSR
|
#ifndef S_IRUSR
|
||||||
#define S_IDUSR S_IREAD
|
#define S_IRUSR S_IREAD
|
||||||
#endif
|
#endif
|
||||||
trace->fd =
|
trace->fd =
|
||||||
open (trace->filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
|
open (trace->filename, O_RDWR | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
|
||||||
|
|
|
@ -20,4 +20,5 @@
|
||||||
#define GST_IMPLEMENT_INLINES 1
|
#define GST_IMPLEMENT_INLINES 1
|
||||||
#define __GST_TRASH_STACK_C__
|
#define __GST_TRASH_STACK_C__
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include "gsttrashstack.h"
|
#include "gsttrashstack.h"
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include "gsturi.h"
|
#include "gsturi.h"
|
||||||
#include "gstinfo.h"
|
#include "gstinfo.h"
|
||||||
#include "gstregistrypool.h"
|
#include "gstregistrypool.h"
|
||||||
#include "gstmarshal.h"
|
#include "gstmarshal.h"
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#include "gst_private.h"
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <gobject/gvaluecollector.h>
|
#include <gobject/gvaluecollector.h>
|
||||||
#include "gst_private.h"
|
|
||||||
|
|
||||||
typedef struct _GstValueUnionInfo GstValueUnionInfo;
|
typedef struct _GstValueUnionInfo GstValueUnionInfo;
|
||||||
struct _GstValueUnionInfo
|
struct _GstValueUnionInfo
|
||||||
|
|
|
@ -136,7 +136,7 @@ typedef struct {
|
||||||
}G_STMT_END
|
}G_STMT_END
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#elif defined(G_HAVE_ISO_VARARGS)
|
||||||
|
|
||||||
#define SET_ERROR(error, type, ...) G_STMT_START{ \
|
#define SET_ERROR(error, type, ...) G_STMT_START{ \
|
||||||
GST_CAT_ERROR (GST_CAT_PIPELINE, "error while parsing" ); \
|
GST_CAT_ERROR (GST_CAT_PIPELINE, "error while parsing" ); \
|
||||||
|
@ -149,19 +149,58 @@ typedef struct {
|
||||||
# define YYDEBUG 1
|
# define YYDEBUG 1
|
||||||
#endif
|
#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{ \
|
#define GST_BIN_MAKE(res, type, chainval, assign) G_STMT_START{ \
|
||||||
chain_t *chain = chainval; \
|
chain_t *chain = chainval; \
|
||||||
GSList *walk; \
|
GSList *walk; \
|
||||||
GstBin *bin = (GstBin *) gst_element_factory_make (type, NULL); \
|
GstBin *bin = (GstBin *) gst_element_factory_make (type, NULL); \
|
||||||
if (!chain) { \
|
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_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
|
||||||
g_slist_free (assign); \
|
g_slist_free (assign); \
|
||||||
YYERROR; \
|
YYERROR; \
|
||||||
} else if (!bin) { \
|
} 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_foreach (assign, (GFunc) gst_parse_strfree, NULL); \
|
||||||
g_slist_free (assign); \
|
g_slist_free (assign); \
|
||||||
res = chain; \
|
res = chain; \
|
||||||
|
@ -299,7 +338,7 @@ gst_parse_element_set (gchar *value, GstElement *element, graph_t *graph)
|
||||||
}
|
}
|
||||||
g_object_set_property (G_OBJECT (element), value, &v);
|
g_object_set_property (G_OBJECT (element), value, &v);
|
||||||
} else {
|
} 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:
|
out:
|
||||||
|
@ -311,12 +350,12 @@ out:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
error:
|
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\""),
|
_("could not set property \"%s\" in element \"%s\" to \"%s\""),
|
||||||
value, GST_ELEMENT_NAME (element), pos);
|
value, GST_ELEMENT_NAME (element), pos);
|
||||||
goto out;
|
goto out;
|
||||||
error_conversion:
|
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\""),
|
_("could not convert \"%s\" so that it fits property \"%s\" in element \"%s\""),
|
||||||
pos, value, GST_ELEMENT_NAME (element));
|
pos, value, GST_ELEMENT_NAME (element));
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -502,7 +541,7 @@ success:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
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);
|
gst_parse_free_link (link);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -547,7 +586,7 @@ static int yyerror (const char *s);
|
||||||
|
|
||||||
element: IDENTIFIER { $$ = gst_element_factory_make ($1, NULL);
|
element: IDENTIFIER { $$ = gst_element_factory_make ($1, NULL);
|
||||||
if (!$$)
|
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);
|
gst_parse_strfree ($1);
|
||||||
if (!$$)
|
if (!$$)
|
||||||
YYERROR;
|
YYERROR;
|
||||||
|
@ -598,7 +637,7 @@ link: linkpart LINK linkpart { $$ = $1;
|
||||||
if ($2) {
|
if ($2) {
|
||||||
$$->caps = gst_caps_from_string ($2);
|
$$->caps = gst_caps_from_string ($2);
|
||||||
if (!$$->caps)
|
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);
|
gst_parse_strfree ($2);
|
||||||
}
|
}
|
||||||
$$->sink_name = $3->src_name;
|
$$->sink_name = $3->src_name;
|
||||||
|
@ -620,13 +659,13 @@ chain: element { $$ = gst_parse_chain_new ();
|
||||||
| bin { $$ = $1; }
|
| bin { $$ = $1; }
|
||||||
| chain chain { if ($1->back && $2->front) {
|
| chain chain { if ($1->back && $2->front) {
|
||||||
if (!$1->back->sink_name) {
|
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);
|
gst_parse_free_link ($1->back);
|
||||||
} else {
|
} else {
|
||||||
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $1->back);
|
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $1->back);
|
||||||
}
|
}
|
||||||
if (!$2->front->src_name) {
|
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);
|
gst_parse_free_link ($2->front);
|
||||||
} else {
|
} else {
|
||||||
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
|
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
|
||||||
|
@ -670,10 +709,10 @@ chain: element { $$ = gst_parse_chain_new ();
|
||||||
for (walk = $2; walk; walk = walk->next) {
|
for (walk = $2; walk; walk = walk->next) {
|
||||||
link_t *link = (link_t *) walk->data;
|
link_t *link = (link_t *) walk->data;
|
||||||
if (!link->sink_name && walk->next) {
|
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);
|
gst_parse_free_link (link);
|
||||||
} else if (!link->src_name && !link->src) {
|
} 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);
|
gst_parse_free_link (link);
|
||||||
} else {
|
} else {
|
||||||
if (walk->next) {
|
if (walk->next) {
|
||||||
|
@ -689,7 +728,7 @@ chain: element { $$ = gst_parse_chain_new ();
|
||||||
| chain error { $$ = $1; }
|
| chain error { $$ = $1; }
|
||||||
| link chain { if ($2->front) {
|
| link chain { if ($2->front) {
|
||||||
if (!$2->front->src_name) {
|
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);
|
gst_parse_free_link ($2->front);
|
||||||
} else {
|
} else {
|
||||||
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
|
((graph_t *) graph)->links = g_slist_prepend (((graph_t *) graph)->links, $2->front);
|
||||||
|
@ -706,7 +745,7 @@ chain: element { $$ = gst_parse_chain_new ();
|
||||||
GstElement *element =
|
GstElement *element =
|
||||||
gst_element_make_from_uri (GST_URI_SRC, $1, NULL);
|
gst_element_make_from_uri (GST_URI_SRC, $1, NULL);
|
||||||
if (!element) {
|
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);
|
_("no source element for URI \"%s\""), $1);
|
||||||
} else {
|
} else {
|
||||||
$$->front->src = element;
|
$$->front->src = element;
|
||||||
|
@ -716,7 +755,7 @@ chain: element { $$ = gst_parse_chain_new ();
|
||||||
$$->elements = g_slist_prepend ($$->elements, element);
|
$$->elements = g_slist_prepend ($$->elements, element);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ERROR (GST_PARSE_ERROR_LINK,
|
SET_ERROR (((graph_t *) graph)->error, GST_PARSE_ERROR_LINK,
|
||||||
_("no element to link URI \"%s\" to"), $1);
|
_("no element to link URI \"%s\" to"), $1);
|
||||||
}
|
}
|
||||||
g_free ($1);
|
g_free ($1);
|
||||||
|
@ -724,11 +763,11 @@ chain: element { $$ = gst_parse_chain_new ();
|
||||||
| link PARSE_URL { GstElement *element =
|
| link PARSE_URL { GstElement *element =
|
||||||
gst_element_make_from_uri (GST_URI_SINK, $2, NULL);
|
gst_element_make_from_uri (GST_URI_SINK, $2, NULL);
|
||||||
if (!element) {
|
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);
|
_("no sink element for URI \"%s\""), $2);
|
||||||
YYERROR;
|
YYERROR;
|
||||||
} else if ($1->sink_name || $1->sink_pads) {
|
} 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);
|
_("could not link sink element for URI \"%s\""), $2);
|
||||||
YYERROR;
|
YYERROR;
|
||||||
} else {
|
} else {
|
||||||
|
@ -741,13 +780,13 @@ chain: element { $$ = gst_parse_chain_new ();
|
||||||
g_free ($2);
|
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;
|
$$ = (graph_t *) graph;
|
||||||
}
|
}
|
||||||
| chain { $$ = (graph_t *) graph;
|
| chain { $$ = (graph_t *) graph;
|
||||||
if ($1->front) {
|
if ($1->front) {
|
||||||
if (!$1->front->src_name) {
|
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);
|
gst_parse_free_link ($1->front);
|
||||||
} else {
|
} else {
|
||||||
$$->links = g_slist_prepend ($$->links, $1->front);
|
$$->links = g_slist_prepend ($$->links, $1->front);
|
||||||
|
@ -756,7 +795,7 @@ graph: /* NOP */ { ERROR (GST_PARSE_ERROR_EMPTY, _("empty pipeline not a
|
||||||
}
|
}
|
||||||
if ($1->back) {
|
if ($1->back) {
|
||||||
if (!$1->back->sink_name) {
|
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);
|
gst_parse_free_link ($1->back);
|
||||||
} else {
|
} else {
|
||||||
$$->links = g_slist_prepend ($$->links, $1->back);
|
$$->links = g_slist_prepend ($$->links, $1->back);
|
||||||
|
|
|
@ -14,7 +14,16 @@
|
||||||
#elif defined(G_HAVE_GNUC_VARARGS)
|
#elif defined(G_HAVE_GNUC_VARARGS)
|
||||||
#define PRINT(args...) GST_CAT_DEBUG (GST_CAT_PIPELINE, "flex: " args)
|
#define PRINT(args...) GST_CAT_DEBUG (GST_CAT_PIPELINE, "flex: " args)
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
#define YY_DECL int _gst_parse_yylex (YYSTYPE *lvalp)
|
#define YY_DECL int _gst_parse_yylex (YYSTYPE *lvalp)
|
||||||
|
|
|
@ -25,7 +25,9 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gstfdsink.h"
|
#include "gstfdsink.h"
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_fdsink_debug);
|
||||||
#define GST_CAT_DEFAULT gst_fdsink_debug
|
#define GST_CAT_DEFAULT gst_fdsink_debug
|
||||||
|
|
|
@ -20,18 +20,21 @@
|
||||||
* Boston, MA 02111-1307, USA.
|
* Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include "config.h"
|
||||||
|
#endif
|
||||||
|
#include "gst/gst_private.h"
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
|
||||||
# include "config.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "gstfdsrc.h"
|
#include "gstfdsrc.h"
|
||||||
|
|
||||||
#define DEFAULT_BLOCKSIZE 4096
|
#define DEFAULT_BLOCKSIZE 4096
|
||||||
|
|
|
@ -33,7 +33,9 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_filesink_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_filesink_debug);
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
#ifdef HAVE_MMAP
|
#ifdef HAVE_MMAP
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -39,6 +41,16 @@
|
||||||
|
|
||||||
#include "../gst-i18n-lib.h"
|
#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
|
* GStreamer Default File Source
|
||||||
|
|
|
@ -941,9 +941,11 @@ main (int argc, char *argv[])
|
||||||
POPT_TABLEEND
|
POPT_TABLEEND
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef GETTEXT_PACKAGE
|
||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
textdomain (GETTEXT_PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
#endif
|
||||||
|
|
||||||
gst_init_with_popt_table (&argc, &argv, options);
|
gst_init_with_popt_table (&argc, &argv, options);
|
||||||
gst_control_init (&argc, &argv);
|
gst_control_init (&argc, &argv);
|
||||||
|
|
|
@ -25,11 +25,20 @@
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* FIXME: hack alert */
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define DISABLE_FAULT_HANDLER
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
#ifndef DISABLE_FAULT_HANDLER
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
#endif
|
||||||
#include <locale.h> /* for LC_ALL */
|
#include <locale.h> /* for LC_ALL */
|
||||||
#include "gst/gst-i18n-app.h"
|
#include "gst/gst-i18n-app.h"
|
||||||
|
|
||||||
|
@ -42,9 +51,12 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern volatile gboolean glib_on_error_halt;
|
extern volatile gboolean glib_on_error_halt;
|
||||||
|
|
||||||
|
#ifndef DISABLE_FAULT_HANDLER
|
||||||
static void fault_restore (void);
|
static void fault_restore (void);
|
||||||
static void fault_spin (void);
|
static void fault_spin (void);
|
||||||
static void sigint_restore (void);
|
static void sigint_restore (void);
|
||||||
|
#endif
|
||||||
|
|
||||||
static gint max_iterations = 0;
|
static gint max_iterations = 0;
|
||||||
static guint64 iterations = 0;
|
static guint64 iterations = 0;
|
||||||
|
@ -156,6 +168,7 @@ xmllaunch_parse_cmdline (const gchar ** argv)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef DISABLE_FAULT_HANDLER
|
||||||
#ifndef USE_SIGINFO
|
#ifndef USE_SIGINFO
|
||||||
static void
|
static void
|
||||||
fault_handler_sighandler (int signum)
|
fault_handler_sighandler (int signum)
|
||||||
|
@ -247,6 +260,7 @@ fault_setup (void)
|
||||||
sigaction (SIGSEGV, &action, NULL);
|
sigaction (SIGSEGV, &action, NULL);
|
||||||
sigaction (SIGQUIT, &action, NULL);
|
sigaction (SIGQUIT, &action, NULL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
|
print_tag (const GstTagList * list, const gchar * tag, gpointer unused)
|
||||||
|
@ -282,6 +296,7 @@ found_tag (GObject * pipeline, GstElement * source, GstTagList * tags)
|
||||||
gst_tag_list_foreach (tags, print_tag, NULL);
|
gst_tag_list_foreach (tags, print_tag, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_FAULT_HANDLER
|
||||||
/* we only use sighandler here because the registers are not important */
|
/* we only use sighandler here because the registers are not important */
|
||||||
static void
|
static void
|
||||||
sigint_handler_sighandler (int signum)
|
sigint_handler_sighandler (int signum)
|
||||||
|
@ -340,6 +355,7 @@ play_signal_setup (void)
|
||||||
sigaction (SIGUSR1, &action, NULL);
|
sigaction (SIGUSR1, &action, NULL);
|
||||||
sigaction (SIGUSR2, &action, NULL);
|
sigaction (SIGUSR2, &action, NULL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
|
@ -379,9 +395,11 @@ main (int argc, char *argv[])
|
||||||
|
|
||||||
free (malloc (8)); /* -lefence */
|
free (malloc (8)); /* -lefence */
|
||||||
|
|
||||||
|
#ifdef GETTEXT_PACKAGE
|
||||||
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
|
||||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||||
textdomain (GETTEXT_PACKAGE);
|
textdomain (GETTEXT_PACKAGE);
|
||||||
|
#endif
|
||||||
|
|
||||||
gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE);
|
gst_alloc_trace_set_flags_all (GST_ALLOC_TRACE_LIVE);
|
||||||
|
|
||||||
|
@ -406,11 +424,13 @@ main (int argc, char *argv[])
|
||||||
}
|
}
|
||||||
argc = j;
|
argc = j;
|
||||||
|
|
||||||
|
#ifndef DISABLE_FAULT_HANDLER
|
||||||
if (!no_fault)
|
if (!no_fault)
|
||||||
fault_setup ();
|
fault_setup ();
|
||||||
|
|
||||||
sigint_setup ();
|
sigint_setup ();
|
||||||
play_signal_setup ();
|
play_signal_setup ();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (trace) {
|
if (trace) {
|
||||||
if (!gst_alloc_trace_available ()) {
|
if (!gst_alloc_trace_available ()) {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <gst/control/control.h>
|
#include <gst/control/control.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
#include <glib/gprintf.h>
|
||||||
|
|
||||||
#define PUT_START_TAG(pfx,tag) \
|
#define PUT_START_TAG(pfx,tag) \
|
||||||
G_STMT_START{ \
|
G_STMT_START{ \
|
||||||
|
@ -43,6 +44,20 @@ G_STMT_START{ \
|
||||||
g_print ("%*.*s"str"\n", pfx, pfx, "" , ##a); \
|
g_print ("%*.*s"str"\n", pfx, pfx, "" , ##a); \
|
||||||
}G_STMT_END
|
}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
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue