gst_private.h: make sure gst_private.h is included before glib.h

For the reason outlined at the beginning of gst_private.h (inline
functions in glib may need the g_log_domain variable). Also include
gst_private.h before using any G_OS_* defines, esp. in plugin loader.
This commit is contained in:
Tim-Philipp Müller 2010-01-20 01:09:55 +00:00
parent 745b35e7d4
commit 087aa6ced4
8 changed files with 20 additions and 10 deletions

View file

@ -33,6 +33,10 @@
* functions */ * functions */
extern const char g_log_domain_gstreamer[]; extern const char g_log_domain_gstreamer[];
#ifdef __G_LIB_H__
#warning "gst_private.h must be included before glib.h"
#endif
#include <glib.h> #include <glib.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -49,6 +49,9 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
#endif #endif
#include "gst_private.h"
#include <glib/gstdio.h> #include <glib/gstdio.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_DIRENT_H #ifdef HAVE_DIRENT_H
@ -60,7 +63,6 @@
#include <signal.h> #include <signal.h>
#include <errno.h> #include <errno.h>
#include "gst_private.h"
#include "glib-compat-private.h" #include "glib-compat-private.h"
#include <gst/gst.h> #include <gst/gst.h>

View file

@ -24,6 +24,8 @@
# include "config.h" # include "config.h"
#endif #endif
#include <gst/gst_private.h>
#ifndef G_OS_WIN32 #ifndef G_OS_WIN32
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
@ -33,7 +35,6 @@
#endif #endif
#include <errno.h> #include <errno.h>
#include <gst/gst_private.h>
#include <gst/gstconfig.h> #include <gst/gstconfig.h>
#include <gst/gstpoll.h> #include <gst/gstpoll.h>

View file

@ -1,11 +1,12 @@
%{ %{
#include "../gst_private.h"
#include <glib-object.h> #include <glib-object.h>
#include <glib.h> #include <glib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include "../gst_private.h"
#include "../gst-i18n-lib.h" #include "../gst-i18n-lib.h"
#include "../gstconfig.h" #include "../gstconfig.h"

View file

@ -1,11 +1,11 @@
%{ %{
#include "../gst_private.h"
#include <math.h> #include <math.h>
#include <string.h> #include <string.h>
#include <glib/gprintf.h> #include <glib/gprintf.h>
#include "../gst_private.h"
#include "types.h" #include "types.h"
#include "../gstinfo.h" #include "../gstinfo.h"
#include "../gsturi.h" #include "../gsturi.h"

View file

@ -146,9 +146,10 @@
# include "config.h" # include "config.h"
#endif #endif
#include <gst/gst_private.h>
#include "gstbasesink.h" #include "gstbasesink.h"
#include <gst/gstmarshal.h> #include <gst/gstmarshal.h>
#include <gst/gst_private.h>
#include <gst/gst-i18n-lib.h> #include <gst/gst-i18n-lib.h>
GST_DEBUG_CATEGORY_STATIC (gst_base_sink_debug); GST_DEBUG_CATEGORY_STATIC (gst_base_sink_debug);

View file

@ -26,10 +26,10 @@
# include "config.h" # include "config.h"
#endif #endif
#include <string.h>
#include <gst/gst.h>
#include <gst/gst_private.h> #include <gst/gst_private.h>
#include <gst/gst.h>
#include <string.h>
int int
main (int argc, char *argv[]) main (int argc, char *argv[])

View file

@ -60,8 +60,9 @@
# include "config.h" # include "config.h"
#endif #endif
#include "gsttypefindelement.h"
#include "gst/gst_private.h" #include "gst/gst_private.h"
#include "gsttypefindelement.h"
#include "gst/gst-i18n-lib.h" #include "gst/gst-i18n-lib.h"
#include "gst/base/gsttypefindhelper.h" #include "gst/base/gsttypefindhelper.h"