From: Thomas V. S. <tho...@us...> - 2002-04-12 18:51:08
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Fri Apr 12 2002 11:51:00 PDT Log message: more registry fixes Modified files: . : DEVEL gst : gstplugin.c gstregistry.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/DEVEL.diff?r1=1.1&r2=1.2 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstplugin.c.diff?r1=1.81&r2=1.82 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstregistry.c.diff?r1=1.1&r2=1.2 ====Begin Diffs==== Index: DEVEL =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/DEVEL,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DEVEL 12 Apr 2002 09:30:30 -0000 1.1 +++ DEVEL 12 Apr 2002 18:50:48 -0000 1.2 @@ -1,9 +1,11 @@ Development Notes and Random Wisdom * in libs like dparams, include the respective dparam headers with -#include "dparams.h" -instead of -#include <gst/libs/control/dparams.h> -because the latter will, if the include flags are set that way, first look -for the installed headers instead of the newest one, which is in your source -dir. + #include "dparams.h" + instead of + #include <gst/libs/control/dparams.h> + because the latter will, if the include flags are set that way, first look + for the installed headers instead of the newest one, which is in your source + dir. + +* When doing releases, please follow the guidelines in docs Index: gstplugin.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstplugin.c,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- gstplugin.c 12 Apr 2002 09:53:00 -0000 1.81 +++ gstplugin.c 12 Apr 2002 18:50:48 -0000 1.82 @@ -64,7 +64,6 @@ _gst_plugin_initialize (void) { GList *gst_plugin_default_paths = NULL; - struct stat stat_buf; #ifndef GST_DISABLE_REGISTRY GstRegistryRead *gst_reg; gchar *gst_registry; @@ -107,12 +106,19 @@ if (_gst_init_registry_write) { /* delete it before writing */ + GST_INFO (GST_CAT_PLUGIN_LOADING, " Removing registry %s if it exists", gst_registry); unlink (gst_registry); } - if (stat (gst_registry, &stat_buf) == 0) + if (g_file_test (gst_registry, G_FILE_TEST_EXISTS)) + { doc = xmlParseFile (gst_registry); + GST_INFO (GST_CAT_PLUGIN_LOADING, " Reading registry from %s", gst_registry); + } else + { + GST_INFO (GST_CAT_PLUGIN_LOADING, " Not reading registry", gst_registry); doc = NULL; + } if (!doc || !doc->xmlRootNode || Index: gstregistry.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstregistry.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gstregistry.c 12 Apr 2002 09:53:00 -0000 1.1 +++ gstregistry.c 12 Apr 2002 18:50:48 -0000 1.2 @@ -124,6 +124,11 @@ { gchar *homedir = (gchar *) g_get_home_dir (); gst_reg->local_reg = g_strjoin ("/", homedir, LOCAL_REGISTRY_FILE, NULL); + if (g_file_test (gst_reg->local_reg, G_FILE_TEST_EXISTS) == FALSE) + { + /* it does not exist, so don't read from it */ + g_free (gst_reg->local_reg); + } gst_reg->global_reg = g_strdup (GLOBAL_REGISTRY_FILE); } return gst_reg; |
From: Thomas V. S. <tho...@us...> - 2002-07-11 21:23:13
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Thu Jul 11 2002 14:23:11 PDT Log message: combined patch by me and lioux@FreeBSD.org Modified files: . : configure.ac gst : gstthread.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/configure.ac.diff?r1=1.166&r2=1.167 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstthread.c.diff?r1=1.90&r2=1.91 ====Begin Diffs==== Index: configure.ac =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/configure.ac,v retrieving revision 1.166 retrieving revision 1.167 diff -u -d -r1.166 -r1.167 --- configure.ac 10 Jul 2002 10:42:04 -0000 1.166 +++ configure.ac 11 Jul 2002 21:22:55 -0000 1.167 @@ -320,6 +320,11 @@ AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available]) fi +dnl test if we have pthread_attr_setstack; if not use the older calls +AC_CHECK_LIB(pthread, pthread_attr_setstack, + AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACK, 1, + [Defined if libpthread has pthread_attr_setstack])) + if test "x$PLUGINS_USE_BUILDDIR" = xyes; then AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this]) fi Index: gstthread.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstthread.c,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- gstthread.c 8 Jul 2002 19:07:27 -0000 1.90 +++ gstthread.c 11 Jul 2002 21:22:55 -0000 1.91 @@ -178,7 +178,7 @@ thread->cond = g_cond_new (); thread->ppid = getpid (); - thread->thread_id = -1; + thread->thread_id = (pthread_t) -1; thread->sched_policy = SCHED_OTHER; thread->priority = 0; } @@ -329,11 +329,23 @@ if (pthread_attr_init (&thread->attr) != 0) g_warning ("pthread_attr_init returned an error !"); - if (gst_scheduler_get_preferred_stack (GST_ELEMENT_SCHED (element), &thread->stack, &stacksize)) { + if (gst_scheduler_get_preferred_stack (GST_ELEMENT_SCHED (element), + &thread->stack, &stacksize)) { +#ifdef HAVE_PTHREAD_ATTR_SETSTACK if (pthread_attr_setstack (&thread->attr, thread->stack, stacksize) != 0) { - g_warning ("pthread_attr_setstack failed"); + g_warning ("pthread_attr_setstack failed\n"); return GST_STATE_FAILURE; } +#else + if (pthread_attr_setstackaddr (&thread->attr, thread->stack) != 0) { + g_warning ("pthread_attr_setstackaddr failed\n"); + return GST_STATE_FAILURE; + } + if (pthread_attr_setstacksize (&thread->attr, stacksize) != 0) { + g_warning ("pthread_attr_setstacksize failed\n"); + return GST_STATE_FAILURE; + } +#endif GST_DEBUG (GST_CAT_THREAD, "pthread attr set stack at %p of size %ld", thread->stack, stacksize); } |
From: Thomas V. S. <tho...@us...> - 2002-07-11 21:38:36
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Thu Jul 11 2002 14:38:35 PDT Log message: lioux's virtual patch Modified files: . : configure.ac gst : cothreads.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/configure.ac.diff?r1=1.167&r2=1.168 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/cothreads.c.diff?r1=1.76&r2=1.77 ====Begin Diffs==== Index: configure.ac =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/configure.ac,v retrieving revision 1.167 retrieving revision 1.168 diff -u -d -r1.167 -r1.168 --- configure.ac 11 Jul 2002 21:22:55 -0000 1.167 +++ configure.ac 11 Jul 2002 21:38:22 -0000 1.168 @@ -323,7 +323,12 @@ dnl test if we have pthread_attr_setstack; if not use the older calls AC_CHECK_LIB(pthread, pthread_attr_setstack, AC_DEFINE(HAVE_PTHREAD_ATTR_SETSTACK, 1, - [Defined if libpthread has pthread_attr_setstack])) + [Defined if libpthread has pthread_attr_setstack ()])) + +dnl test if we have posix_memalign; FreeBSD doesn't +AC_CHECK_FUNC(posix_memalign, + AC_DEFINE(HAVE_POSIX_MEMALIGN, 1, + [Defined if we have posix_memalign ()])) if test "x$PLUGINS_USE_BUILDDIR" = xyes; then AC_DEFINE(PLUGINS_USE_BUILDDIR, 1, [Define if plugins should be loaded from the build tree - only developers should use this]) Index: cothreads.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/cothreads.c,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- cothreads.c 8 Jul 2002 19:10:11 -0000 1.76 +++ cothreads.c 11 Jul 2002 21:38:23 -0000 1.77 @@ -499,6 +499,7 @@ int retval = 0; +#ifdef HAVE_POSIX_MEMALIGN retval = posix_memalign (stack, STACK_SIZE, STACK_SIZE); if (retval != 0) { @@ -514,6 +515,16 @@ } GST_DEBUG (GST_CAT_THREAD, "have posix_memalign at %p of size %d", (void *) *stack, STACK_SIZE); +#else + if ((*stack = valloc (STACK_SIZE)) != 0) + { + g_warning ("Could not valloc stack !\n"); + return FALSE; + } + GST_DEBUG (GST_CAT_THREAD, "have valloc at %p of size %d", + (void *) *stack, STACK_SIZE); +#endif + GST_DEBUG (GST_CAT_COTHREADS, "Got new cothread stack from %p to %p (size %ld)", *stack, *stack + STACK_SIZE - 1, (long) STACK_SIZE); |
From: Thomas V. S. <tho...@us...> - 2002-11-27 21:08:21
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Wed Nov 27 2002 13:08:19 PST Log message: gst_init modeled upon gtk_init code cleanups Modified files: . : ChangeLog gst : gst.c gst.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.19&r2=1.20 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.80&r2=1.81 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.h.diff?r1=1.45&r2=1.46 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- ChangeLog 12 Apr 2002 09:52:58 -0000 1.19 +++ ChangeLog 27 Nov 2002 21:08:05 -0000 1.20 @@ -1,3 +1,10 @@ +2002-11-27 Thomas Vander Stichele <thomas at apestaart dot org> + + * ChangeLog: added an entry + * gst/gst.*: add gst_init_check which can return TRUE or FALSE + make gst_init_with_popt_table do the same + only initialize once, like GTK does + 2002-04-12 Thomas Vander Stichele <th...@ap...> * gst/gst*.[ch]: commited GUAD3C code review comments (marked CR1) Index: gst.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- gst.c 27 Oct 2002 01:35:51 -0000 1.80 +++ gst.c 27 Nov 2002 21:08:06 -0000 1.81 @@ -43,17 +43,21 @@ static gboolean _gst_registry_fixed = FALSE; static gboolean _gst_use_threads = TRUE; +static gboolean gst_initialized = FALSE; +/* this will be set in popt callbacks when a problem has been encountered */ +static gboolean _gst_initialization_failure = FALSE; extern gint _gst_trace_on; extern GThreadFunctions gst_thread_dummy_functions; -static void load_plugin_func (gpointer data, gpointer user_data); -static void init_popt_callback (poptContext context, enum poptCallbackReason reason, - const struct poptOption *option, const char *arg, void *data); -static void init_pre (void); -static void init_post (void); - +static void load_plugin_func (gpointer data, gpointer user_data); +static void init_popt_callback (poptContext context, + enum poptCallbackReason reason, + const struct poptOption *option, + const char *arg, void *data); +static gboolean init_pre (void); +static gboolean init_post (void); static GSList *preload_plugins = NULL; @@ -65,8 +69,8 @@ const gchar *message, gpointer user_data) { - g_log_default_handler(log_domain, log_level, message, user_data); - g_on_error_query(NULL); + g_log_default_handler (log_domain, log_level, message, user_data); + g_on_error_query (NULL); } enum { @@ -89,7 +93,7 @@ #endif /* default scheduler, 'basicomega', can be changed in - * gstscheduler.c in function gst_scheduler_factory_class_init + * gstscheduler.c in function gst_scheduler_factory_class_init */ static const struct poptOption options[] = { {NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, &init_popt_callback, 0, NULL, NULL}, @@ -116,7 +120,8 @@ * actually performed (via a poptGetContext()), the GStreamer libraries will * be initialized. * - * Returns: a pointer to the static GStreamer option table. No free is necessary. + * Returns: a pointer to the static GStreamer option table. + * No free is necessary. */ const struct poptOption * gst_init_get_popt_table (void) @@ -125,30 +130,56 @@ } /** + * gst_init_check: + * @argc: pointer to application's argc + * @argv: pointer to application's argv + * + * Initializes the GStreamer library, setting up internal path lists, + * registering built-in elements, and loading standard plugins. + * + * This function will return %FALSE if GStreamer could not be initialized + * for some reason. If you want your program to fail fatally, + * use gst_init() instead. + */ + +gboolean +gst_init_check (int *argc, char **argv[]) +{ + return gst_init_with_popt_table (argc, argv, NULL); +} + +/** * gst_init: * @argc: pointer to application's argc * @argv: pointer to application's argv * * Initializes the GStreamer library, setting up internal path lists, * registering built-in elements, and loading standard plugins. + * + * This function will terminate your program if it was unable to initialize + * GStreamer for some reason. If you want your program to fall back, + * use gst_init_check() instead. */ -void +void gst_init (int *argc, char **argv[]) { - gst_init_with_popt_table (argc, argv, NULL); + if (!gst_init_with_popt_table (argc, argv, NULL)) + g_error ("Could not initialize GStreamer !\n"); } + /** * gst_init_with_popt_table: * @argc: pointer to application's argc * @argv: pointer to application's argv * @popt_options: pointer to a popt table to append * - * Initializes the GStreamer library, parsing the options, + * Initializes the GStreamer library, parsing the options, * setting up internal path lists, * registering built-in elements, and loading standard plugins. */ -void -gst_init_with_popt_table (int *argc, char **argv[], const struct poptOption *popt_options) +gboolean +gst_init_with_popt_table (int *argc, char **argv[], + const struct poptOption *popt_options) { poptContext context; gint nextopt, i, j, nstrip; @@ -167,13 +198,20 @@ POPT_TABLEEND }; + if (gst_initialized) + { + GST_DEBUG (GST_CAT_GST_INIT, "already initialized gst\n"); + return TRUE; + } + if (!argc || !argv) { if (argc || argv) g_warning ("gst_init: Only one of argc or argv was NULL"); - - init_pre(); - init_post(); - return; + + if (!init_pre ()) return FALSE; + if (!init_post ()) return FALSE; + gst_initialized = TRUE; + return TRUE; } if (popt_options == NULL) { @@ -181,18 +219,24 @@ } else { options = options_with; } - context = poptGetContext ("GStreamer", *argc, (const char**)*argv, options, 0); - - while ((nextopt = poptGetNextOpt (context)) > 0); /* do nothing, it's all callbacks */ - + context = poptGetContext ("GStreamer", *argc, (const char**)*argv, + options, 0); + + while ((nextopt = poptGetNextOpt (context)) > 0) + { + /* we only check for failures here, actual work is done in callbacks */ + if (_gst_initialization_failure) return FALSE; + } + if (nextopt != -1) { - g_print ("Error on option %s: %s.\nRun '%s --help' to see a full list of available command line options.\n", + g_print ("Error on option %s: %s.\nRun '%s --help' " + "to see a full list of available command line options.\n", poptBadOption (context, 0), poptStrerror (nextopt), (*argv)[0]); poptFreeContext (context); - exit (1); + return FALSE; } poptFreeContext (context); @@ -211,6 +255,7 @@ nstrip++; } *argc -= nstrip; + return TRUE; } static void @@ -278,7 +323,8 @@ } } -static void +/* we have no fail cases yet, but maybe in the future */ +static gboolean init_pre (void) { const gchar *homedir; @@ -321,6 +367,8 @@ #endif g_free (user_reg); + + return TRUE; } static gboolean @@ -359,8 +407,11 @@ * - initial output * - initializes gst_format * - registers a bunch of types for gst_objects + * + * - we don't have cases yet where this fails, but in the future + * we might and then it's nice to be able to return that */ -static void +static gboolean init_post (void) { GLogLevelFlags llf; @@ -447,6 +498,8 @@ if (_gst_progname == NULL) { _gst_progname = g_strdup ("gstprog"); } + + return TRUE; } static void @@ -483,9 +536,11 @@ gint val = 0; GLogLevelFlags fatal_mask; + if (gst_initialized) + return; switch (reason) { case POPT_CALLBACK_REASON_PRE: - init_pre(); + if (!init_pre ()) _gst_initialization_failure = TRUE; break; case POPT_CALLBACK_REASON_OPTION: switch (option->val) { @@ -537,7 +592,8 @@ } break; case POPT_CALLBACK_REASON_POST: - init_post(); + if (!init_post ()) _gst_initialization_failure = TRUE; + gst_initialized = TRUE; break; } } Index: gst.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gst.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- gst.h 27 Nov 2002 20:47:36 -0000 1.45 +++ gst.h 27 Nov 2002 21:08:06 -0000 1.46 @@ -62,16 +62,19 @@ G_BEGIN_DECLS /* initialize GST */ -void gst_init (int *argc, char **argv[]); -void gst_init_with_popt_table (int *argc, char **argv[], - const struct poptOption *popt_options); -const struct poptOption* gst_init_get_popt_table (void); +void gst_init (int *argc, char **argv[]); +gboolean gst_init_check (int *argc, char **argv[]); +gboolean gst_init_with_popt_table (int *argc, char **argv[], + const struct poptOption + *popt_options); +const struct +poptOption* gst_init_get_popt_table (void); -void gst_use_threads (gboolean use_threads); -gboolean gst_has_threads (void); +void gst_use_threads (gboolean use_threads); +gboolean gst_has_threads (void); -void gst_main (void); -void gst_main_quit (void); +void gst_main (void); +void gst_main_quit (void); G_END_DECLS |
From: Thomas V. S. <tho...@us...> - 2002-12-11 21:33:22
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Wed Dec 11 2002 13:33:19 PST Log message: merge from release branch Modified files: . : configure.ac gst : gstarch.h gstclock.c gstelement.c gstinfo.c gstinfo.h gstsystemclock.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/configure.ac.diff?r1=1.192&r2=1.193 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstarch.h.diff?r1=1.17&r2=1.18 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstclock.c.diff?r1=1.28&r2=1.29 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.166&r2=1.167 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstinfo.c.diff?r1=1.48&r2=1.49 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstinfo.h.diff?r1=1.34&r2=1.35 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstsystemclock.c.diff?r1=1.5&r2=1.6 ====Begin Diffs==== Index: configure.ac =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/configure.ac,v retrieving revision 1.192 retrieving revision 1.193 diff -u -d -r1.192 -r1.193 --- configure.ac 11 Dec 2002 16:00:41 -0000 1.192 +++ configure.ac 11 Dec 2002 21:33:06 -0000 1.193 @@ -106,6 +106,12 @@ AC_MSG_RESULT(no) ]) +dnl check for makecontext and define HAVE_MAKECONTEXT if we have it +GST_CHECK_MAKECONTEXT() + +dnl Check for a way to display the function name in debug output +GST_CHECK_FUNCTION() + dnl Check for essential libraries first: dnl ==================================== Index: gstarch.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstarch.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- gstarch.h 9 Dec 2002 01:41:05 -0000 1.17 +++ gstarch.h 11 Dec 2002 21:33:07 -0000 1.18 @@ -183,6 +183,7 @@ #elif defined(HAVE_MAKECONTEXT) /* If we have makecontext(), we'll be using that. */ +#define USE_MAKECONTEXT 1 #else #error Need to know about this architecture, or have a generic implementation Index: gstclock.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstclock.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- gstclock.c 27 Nov 2002 20:47:36 -0000 1.28 +++ gstclock.c 11 Dec 2002 21:33:07 -0000 1.29 @@ -520,7 +520,7 @@ * @time: The new time * * Notifies the clock of a discontinuity in time. - * + * * Returns: TRUE if the clock was updated. It is possible that * the clock was not updated by this call because only the first * discontinuitity in the pipeline is honoured. @@ -529,8 +529,10 @@ gst_clock_handle_discont (GstClock *clock, guint64 time) { GstClockTime itime = 0LL; - - GST_DEBUG (GST_CAT_CLOCK, "clock discont %llu %llu %d", time, clock->start_time, clock->accept_discont); + + GST_DEBUG (GST_CAT_CLOCK, "clock discont %" G_GUINT64_FORMAT + " %" G_GUINT64_FORMAT " %d", + time, clock->start_time, clock->accept_discont); if (time == GST_CLOCK_TIME_NONE) return TRUE; @@ -543,7 +545,9 @@ } else { GST_UNLOCK (clock); - GST_DEBUG (GST_CAT_CLOCK, "clock discont refused %llu %llu", time, clock->start_time); + GST_DEBUG (GST_CAT_CLOCK, "clock discont refused %" G_GUINT64_FORMAT + " %" G_GUINT64_FORMAT, + time, clock->start_time); return FALSE; } @@ -552,11 +556,12 @@ clock->accept_discont = FALSE; GST_UNLOCK (clock); - GST_DEBUG (GST_CAT_CLOCK, "new time %llu", gst_clock_get_time (clock)); + GST_DEBUG (GST_CAT_CLOCK, "new time %" G_GUINT64_FORMAT, + gst_clock_get_time (clock)); - g_mutex_lock (clock->active_mutex); - g_cond_broadcast (clock->active_cond); - g_mutex_unlock (clock->active_mutex); + g_mutex_lock (clock->active_mutex); + g_cond_broadcast (clock->active_cond); + g_mutex_unlock (clock->active_mutex); return TRUE; } @@ -567,7 +572,7 @@ * * Gets the current time of the given clock. The time is always * monotonically increasing. - * + * * Returns: the time of the clock. */ GstClockTime Index: gstelement.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.166 retrieving revision 1.167 diff -u -d -r1.166 -r1.167 --- gstelement.c 7 Dec 2002 22:18:17 -0000 1.166 +++ gstelement.c 11 Dec 2002 21:33:07 -0000 1.167 @@ -2261,7 +2261,8 @@ else if (G_IS_PARAM_SPEC_ENUM (spec)) contents = g_strdup_printf ("%d", g_value_get_enum (&value)); else if (G_IS_PARAM_SPEC_INT64 (spec)) - contents = g_strdup_printf ("%lld", g_value_get_int64 (&value)); + contents = g_strdup_printf ("%" G_GINT64_FORMAT, + g_value_get_int64 (&value)); else contents = g_strdup_value_contents (&value); Index: gstinfo.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstinfo.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- gstinfo.c 10 Dec 2002 03:48:15 -0000 1.48 +++ gstinfo.c 11 Dec 2002 21:33:07 -0000 1.49 @@ -50,8 +50,6 @@ extern gchar *_gst_progname; -GStaticPrivate _gst_debug_cothread_index = G_STATIC_PRIVATE_INIT; - /***** Categories and colorization *****/ /* be careful with these, make them match the enum */ @@ -142,7 +140,7 @@ /* [GST_CAT_TYPES] = */ "01;37;41", /* !! */ /* [GST_CAT_XML] = */ "01;37;41", /* !! */ /* [GST_CAT_NEGOTIATION] = */ "07;34", - /* [GST_CAT_REFCOUNTING] = */ "00;34:42", + /* [GST_CAT_REFCOUNTING] = */ "00;34;42", /* [GST_CAT_EVENT] = */ "01;37;41", /* !! */ /* [GST_CAT_PARAMS] = */ "00;30;43", /* !! */ "", @@ -193,9 +191,9 @@ void *element, gchar *string) { gchar *empty = ""; - gchar *elementname = empty,*location = empty; - int pid = getpid(); - int cothread_id = (int) g_static_private_get(&_gst_debug_cothread_index); + gchar *elementname = empty,* location = empty; + int pid = getpid (); + int cothread_id = 0; /*FIXME*/ #ifdef GST_DEBUG_COLOR int pid_color = pid%6 + 31; int cothread_color = (cothread_id < 0) ? 37 : (cothread_id%6 + 31); @@ -203,28 +201,30 @@ if (debug_string == NULL) debug_string = ""; /* if (category != GST_CAT_GST_INIT) */ - location = g_strdup_printf("%s:%d%s:",function,line,debug_string); + location = g_strdup_printf ("%s(%d): %s: %s:", + file, line, function, debug_string); if (element && GST_IS_ELEMENT (element)) #ifdef GST_DEBUG_COLOR - elementname = g_strdup_printf (" \033[04m[%s]\033[00m", GST_OBJECT_NAME (element)); + elementname = g_strdup_printf (" \033[04m[%s]\033[00m", + GST_OBJECT_NAME (element)); #else elementname = g_strdup_printf (" [%s]", GST_OBJECT_NAME (element)); #endif #ifdef GST_DEBUG_COLOR - fprintf(stderr,"DEBUG(\033[00;%dm%5d\033[00m:\033[00;%dm%2d\033[00m)\033[" - "%s;%sm%s%s\033[00m %s\n", - pid_color,pid,cothread_color,cothread_id,incore?"00":"01", - _gst_category_colors[category],location,elementname,string); + fprintf (stderr, "DEBUG(\033[00;%dm%5d\033[00m:\033[00;%dm%2d\033[00m)\033[" + "%s;%sm%s%s\033[00m %s\n", + pid_color, pid, cothread_color, cothread_id, incore ? "00" : "01", + _gst_category_colors[category], location, elementname, string); #else fprintf(stderr,"DEBUG(%5d:%2d)%s%s %s\n", - pid,cothread_id,location,elementname,string); + pid, cothread_id, location, elementname, string); #endif /* GST_DEBUG_COLOR */ - if (location != empty) g_free(location); - if (elementname != empty) g_free(elementname); + if (location != empty) g_free (location); + if (elementname != empty) g_free (elementname); - g_free(string); + g_free (string); } @@ -275,14 +275,11 @@ _gst_debug_categories &= ~ (1 << category); } - - - /***** INFO system *****/ GstInfoHandler _gst_info_handler = gst_default_info_handler; guint32 _gst_info_categories = 0x00000001; - +/* FIXME:what does debug_string DO ??? */ /** * gst_default_info_handler: * @category: category of the INFO message @@ -296,6 +293,7 @@ * * Prints out the INFO mesage in a variant of the following form: * + * FIXME: description should be fixed * INFO:gst_function:542(args): [elementname] something neat happened */ void @@ -305,9 +303,9 @@ void *element, gchar *string) { gchar *empty = ""; - gchar *elementname = empty,*location = empty; - int pid = getpid(); - int cothread_id = (int) g_static_private_get(&_gst_debug_cothread_index); + gchar *elementname = empty, *location = empty; + int pid = getpid (); + int cothread_id = 0; /*FIXME*/ #ifdef GST_DEBUG_COLOR int pid_color = pid%6 + 31; int cothread_color = (cothread_id < 0) ? 37 : (cothread_id%6 + 31); @@ -315,21 +313,23 @@ if (debug_string == NULL) debug_string = ""; if (category != GST_CAT_GST_INIT) - location = g_strdup_printf("%s:%d%s:",function,line,debug_string); + location = g_strdup_printf ("%s(%d): %s: %s:", + file, line, function, debug_string); if (element && GST_IS_ELEMENT (element)) - elementname = g_strdup_printf (" \033[04m[%s]\033[00m", GST_OBJECT_NAME (element)); + elementname = g_strdup_printf (" \033[04m[%s]\033[00m", + GST_OBJECT_NAME (element)); /* #ifdef GST_DEBUG_ENABLED */ #ifdef GST_DEBUG_COLOR - fprintf(stderr,"\033[01mINFO\033[00m (\033[00;%dm%5d\033[00m:\033[00;%dm%2d\033[00m)\033[" - GST_DEBUG_CHAR_MODE ";%sm%s%s\033[00m %s\n", - pid_color,pid,cothread_color,cothread_id, - _gst_category_colors[category],location,elementname,string); + fprintf (stderr, "\033[01mINFO\033[00m (\033[00;%dm%5d\033[00m:\033[00;%dm%2d\033[00m)\033[" + GST_DEBUG_CHAR_MODE ";%sm%s%s\033[00m %s\n", + pid_color, pid, cothread_color, cothread_id, + _gst_category_colors[category], location, elementname, string); #else - fprintf(stderr,"INFO (%5d:%2d)%s%s %s\n", - pid,cothread_id,location,elementname,string); + fprintf (stderr, "INFO (%5d:%2d)%s%s %s\n", + pid, cothread_id, location, elementname, string); #endif /* GST_DEBUG_COLOR */ /* #else @@ -344,10 +344,10 @@ #endif */ - if (location != empty) g_free(location); - if (elementname != empty) g_free(elementname); + if (location != empty) g_free (location); + if (elementname != empty) g_free (elementname); - g_free(string); + g_free (string); } /** @@ -485,6 +485,7 @@ /***** DEBUG system *****/ #ifdef GST_DEBUG_ENABLED +#ifdef GST_DEBUG_ENABLED GHashTable *__gst_function_pointers = NULL; /* FIXME make this thread specific */ /* static GSList *stack_trace = NULL; */ @@ -504,6 +505,7 @@ return g_strdup_printf("%p",ptr); } return NULL; +#endif } #endif Index: gstinfo.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstinfo.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- gstinfo.h 10 Dec 2002 03:48:15 -0000 1.34 +++ gstinfo.h 11 Dec 2002 21:33:07 -0000 1.35 @@ -2,7 +2,7 @@ * Copyright (C) 1999,2000 Erik Walthinsen <om...@cs...> * 2000 Wim Taymans <wt...@ch...> * - * gstinfo.h: + * gstinfo.h: * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -26,11 +26,28 @@ #include <stdio.h> #include <gmodule.h> #include <unistd.h> +#include <glib/gmacros.h> #ifdef HAVE_CONFIG_H #include <config.h> #endif +/* FIXME: convert to using G_STRLOC all the way if we can ! */ + +#ifndef FUNCTION +#ifdef G_GNUC_PRETTY_FUNCTION +#define FUNCTION G_GNUC_PRETTY_FUNCTION +#elif HAVE_FUNC +#define FUNCTION __func__ +#elif HAVE_PRETTY_FUNCTION +#define FUNCTION __PRETTY_FUNCTION__ +#elif HAVE_FUNCTION +#define FUNCTION __FUNCTION__ +#else +#define FUNCTION "" +#endif +#endif /* ifndef FUNCTION */ + /***** are we in the core or not? *****/ #ifdef __GST_PRIVATE_H__ #define _GST_DEBUG_INCORE TRUE @@ -95,7 +112,6 @@ extern const gchar *_gst_category_colors[32]; -extern GStaticPrivate _gst_debug_cothread_index; /********************************************************************** @@ -141,13 +157,13 @@ #ifdef GST_DEBUG_ENABLED #define GST_DEBUG(cat, ...) G_STMT_START{ \ if ((1<<cat) & _gst_debug_categories) \ - _gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \ NULL,g_strdup_printf( __VA_ARGS__ )); \ }G_STMT_END #define GST_DEBUG_ELEMENT(cat, element, ...) G_STMT_START{ \ if ((1<<cat) & _gst_debug_categories) \ - _gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \ element,g_strdup_printf( __VA_ARGS__ )); \ }G_STMT_END @@ -161,13 +177,13 @@ #ifdef GST_DEBUG_ENABLED #define GST_DEBUG(cat,format,args...) G_STMT_START{ \ if ((1<<cat) & _gst_debug_categories) \ - _gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \ NULL,g_strdup_printf( format , ## args )); \ }G_STMT_END #define GST_DEBUG_ELEMENT(cat,element,format,args...) G_STMT_START{ \ if ((1<<cat) & _gst_debug_categories) \ - _gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_debug_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \ element,g_strdup_printf( format , ## args )); \ }G_STMT_END @@ -352,13 +368,13 @@ #ifdef GST_INFO_ENABLED #define GST_INFO(cat,...) G_STMT_START{ \ if ((1<<cat) & _gst_info_categories) \ - _gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \ NULL,g_strdup_printf( __VA_ARGS__ )); \ }G_STMT_END #define GST_INFO_ELEMENT(cat,element,...) G_STMT_START{ \ if ((1<<cat) & _gst_info_categories) \ - _gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \ element,g_strdup_printf( __VA_ARGS__ )); \ }G_STMT_END @@ -372,13 +388,13 @@ #ifdef GST_INFO_ENABLED #define GST_INFO(cat,format,args...) G_STMT_START{ \ if ((1<<cat) & _gst_info_categories) \ - _gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \ NULL,g_strdup_printf( format , ## args )); \ }G_STMT_END #define GST_INFO_ELEMENT(cat,element,format,args...) G_STMT_START{ \ if ((1<<cat) & _gst_info_categories) \ - _gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_info_handler(cat,_GST_DEBUG_INCORE,__FILE__,FUNCTION,__LINE__,_debug_string, \ element,g_strdup_printf( format , ## args )); \ }G_STMT_END @@ -420,21 +436,21 @@ #ifdef G_HAVE_ISO_VARARGS #define GST_ERROR(element,...) \ - _gst_error_handler(__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_error_handler(__FILE__,FUNCTION,__LINE__,_debug_string, \ element,NULL,g_strdup_printf( __VA_ARGS__ )) #define GST_ERROR_OBJECT(element,object,...) \ - _gst_error_handler(__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_error_handler(__FILE__,FUNCTION,__LINE__,_debug_string, \ element,object,g_strdup_printf( __VA_ARGS__ )) #elif defined(G_HAVE_GNUC_VARARGS) #define GST_ERROR(element,format,args...) \ - _gst_error_handler(__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_error_handler(__FILE__,FUNCTION,__LINE__,_debug_string, \ element,NULL,g_strdup_printf( format , ## args )) #define GST_ERROR_OBJECT(element,object,format,args...) \ - _gst_error_handler(__FILE__,G_GNUC_PRETTY_FUNCTION,__LINE__,_debug_string, \ + _gst_error_handler(__FILE__,FUNCTION,__LINE__,_debug_string, \ element,object,g_strdup_printf( format , ## args )) #endif @@ -446,24 +462,27 @@ extern GHashTable *__gst_function_pointers; -#ifdef GST_DEBUG_ENABLED +#if GST_DEBUG_ENABLED +#define GST_DEBUG_FUNCPTR(ptr) _gst_debug_register_funcptr((void *)(ptr), #ptr) +#define GST_DEBUG_FUNCPTR_NAME(ptr) _gst_debug_nameof_funcptr((void *)ptr) +#else +#define GST_DEBUG_FUNCPTR(ptr) (ptr) +#define GST_DEBUG_FUNCPTR_NAME(ptr) "" +#endif + static inline void * -_gst_debug_register_funcptr (void *ptr, gchar *ptrname) +_gst_debug_register_funcptr (void *ptr, gchar *ptrname) { if (!__gst_function_pointers) __gst_function_pointers = g_hash_table_new(g_direct_hash,g_direct_equal); if (!g_hash_table_lookup(__gst_function_pointers,ptr)) g_hash_table_insert(__gst_function_pointers,ptr,ptrname); return ptr; } -#define GST_DEBUG_FUNCPTR(ptr) _gst_debug_register_funcptr((void *)(ptr), #ptr) -#define GST_DEBUG_FUNCPTR_NAME(ptr) _gst_debug_nameof_funcptr((void *)ptr) -gchar * _gst_debug_nameof_funcptr (void *ptr); -#else -#define GST_DEBUG_FUNCPTR(ptr) (ptr) -#define GST_DEBUG_FUNCPTR_NAME(ptr) "" -#endif +gchar *_gst_debug_nameof_funcptr (void *ptr); void gst_debug_print_stack_trace (void); + + #endif /* __GSTINFO_H__ */ Index: gstsystemclock.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstsystemclock.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gstsystemclock.c 2 Nov 2002 13:54:34 -0000 1.5 +++ gstsystemclock.c 11 Dec 2002 21:33:07 -0000 1.6 @@ -128,19 +128,21 @@ return 1 * GST_USECOND; } -static GstClockEntryStatus +static GstClockEntryStatus gst_system_clock_wait (GstClock *clock, GstClockEntry *entry) { GstClockEntryStatus res = GST_CLOCK_ENTRY_OK; GstClockTime current, target; - + current = gst_clock_get_time (clock); target = gst_system_clock_get_internal_time (clock) + GST_CLOCK_ENTRY_TIME (entry) - current; - - GST_DEBUG (GST_CAT_CLOCK, "real_target %llu, target %llu, now %llu", - target, GST_CLOCK_ENTRY_TIME (entry), current); - + + GST_DEBUG (GST_CAT_CLOCK, "real_target %" G_GUINT64_FORMAT + " target %" G_GUINT64_FORMAT + " now %" G_GUINT64_FORMAT, + target, GST_CLOCK_ENTRY_TIME (entry), current); + if (((gint64)target) > 0) { GTimeVal tv; |
From: Thomas V. S. <tho...@us...> - 2003-05-31 15:38:37
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sat May 31 2003 08:35:27 PDT Branch: BRANCH-GSTREAMER-0_6 Log message: Backport Company's fixes for refcounting, this fixes the player fixes #114130 Modified files: . : ChangeLog gst : gstelement.c gstobject.h gstpad.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.21.4.2&r2=1.21.4.3 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.185.4.4&r2=1.185.4.5 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstobject.h.diff?r1=1.33&r2=1.33.4.1 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstpad.c.diff?r1=1.206.4.6&r2=1.206.4.7 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.21.4.2 retrieving revision 1.21.4.3 diff -u -d -r1.21.4.2 -r1.21.4.3 --- ChangeLog 2 Feb 2003 00:56:48 -0000 1.21.4.2 +++ ChangeLog 31 May 2003 15:35:13 -0000 1.21.4.3 @@ -1,3 +1,14 @@ +2003-05-31 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gstelement.c: (gst_element_remove_ghost_pad): + * gst/gstpad.c: (gst_pad_class_init), (gst_pad_init), + (gst_pad_dispose), (gst_pad_custom_new_from_template), + (gst_pad_set_pad_template), (gst_pad_remove_ghost_pad), + (gst_pad_try_relink_filtered_func), (gst_real_pad_dispose), + (gst_ghost_pad_class_init), (gst_ghost_pad_init), + (gst_ghost_pad_dispose), (gst_ghost_pad_new): + Backport Company's refcounting fixes to fix libgstplay + 2003-02-02 Thomas Vander Stichele <thomas at apestaart dot org> * configure.ac: Index: gstelement.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.185.4.4 retrieving revision 1.185.4.5 diff -u -d -r1.185.4.4 -r1.185.4.5 --- gstelement.c 16 Apr 2003 19:19:42 -0000 1.185.4.4 +++ gstelement.c 31 May 2003 15:35:14 -0000 1.185.4.5 @@ -982,9 +982,7 @@ void gst_element_remove_ghost_pad (GstElement *element, GstPad *pad) { - g_return_if_fail (element != NULL); g_return_if_fail (GST_IS_ELEMENT (element)); - g_return_if_fail (pad != NULL); g_return_if_fail (GST_IS_GHOST_PAD (pad)); /* FIXME this is redundant? @@ -992,8 +990,10 @@ * from the element. gst_pad_remove_ghost_pad just removes the ghostpad from * the real pad's ghost pad list */ - gst_pad_remove_ghost_pad (GST_PAD (GST_PAD_REALIZE (pad)), pad); + gst_object_ref (GST_OBJECT (pad)); gst_element_remove_pad (element, pad); + gst_pad_remove_ghost_pad (GST_PAD (GST_PAD_REALIZE (pad)), pad); + gst_object_unref (GST_OBJECT (pad)); } Index: gstobject.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstobject.h,v retrieving revision 1.33 retrieving revision 1.33.4.1 diff -u -d -r1.33 -r1.33.4.1 --- gstobject.h 17 Jan 2003 17:44:07 -0000 1.33 +++ gstobject.h 31 May 2003 15:35:14 -0000 1.33.4.1 @@ -147,7 +147,9 @@ void gst_object_unref (GstObject *object); void gst_object_sink (GstObject *object); +/* replace object pointer */ void gst_object_swap (GstObject **oldobj, GstObject *newobj); + /* destroying an object */ void gst_object_destroy (GstObject *object); Index: gstpad.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstpad.c,v retrieving revision 1.206.4.6 retrieving revision 1.206.4.7 diff -u -d -r1.206.4.6 -r1.206.4.7 --- gstpad.c 18 May 2003 22:22:12 -0000 1.206.4.6 +++ gstpad.c 31 May 2003 15:35:14 -0000 1.206.4.7 @@ -46,9 +46,11 @@ /***** Start with the base GstPad class *****/ static void gst_pad_class_init (GstPadClass *klass); static void gst_pad_init (GstPad *pad); +static void gst_pad_dispose (GObject *object); static gboolean gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad, GstCaps *caps, gboolean clear); +static void gst_pad_set_pad_template (GstPad *pad, GstPadTemplate *templ); #ifndef GST_DISABLE_LOADSAVE static xmlNodePtr gst_pad_save_thyself (GstObject *object, xmlNodePtr parent); @@ -76,15 +78,28 @@ static void gst_pad_class_init (GstPadClass *klass) { + GObjectClass *gobject_class; + + gobject_class = (GObjectClass*) klass; + pad_parent_class = g_type_class_ref (GST_TYPE_OBJECT); + + gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_pad_dispose); } static void gst_pad_init (GstPad *pad) { - pad->element_private = NULL; + /* all structs are initialized to NULL by glib */ +} +static void +gst_pad_dispose (GObject *object) +{ + GstPad *pad = GST_PAD (object); - pad->padtemplate = NULL; + gst_pad_set_pad_template (pad, NULL); + + G_OBJECT_CLASS (pad_parent_class)->dispose (object); } @@ -108,6 +123,7 @@ static void gst_real_pad_class_init (GstRealPadClass *klass); static void gst_real_pad_init (GstRealPad *pad); +static void gst_real_pad_dispose (GObject *object); static void gst_real_pad_set_property (GObject *object, guint prop_id, const GValue *value, @@ -116,8 +132,6 @@ GValue *value, GParamSpec *pspec); -static void gst_real_pad_dispose (GObject *object); - GType _gst_real_pad_type = 0; static GstPad *real_pad_parent_class = NULL; @@ -322,12 +336,8 @@ g_return_val_if_fail (templ != NULL, NULL); pad = gst_pad_new (name, templ->direction); - - gst_object_ref (GST_OBJECT (templ)); - GST_PAD_PAD_TEMPLATE (pad) = templ; + gst_pad_set_pad_template (pad, templ); - g_signal_emit (G_OBJECT (templ), gst_pad_template_signals[TEMPL_PAD_CREATED], 0, pad); - return pad; } @@ -980,7 +990,7 @@ * @filtercaps: the filter #GstCaps. * * Links the source pad and the sink pad, constrained - * by the given filter caps. + * by the given filter caps. This function sinks the caps. * * Returns: TRUE if the pads have been linked, FALSE otherwise. */ @@ -1147,6 +1157,16 @@ return GST_PAD_PARENT (pad); } +static void +gst_pad_set_pad_template (GstPad *pad, GstPadTemplate *templ) +{ + /* this function would need checks if it weren't static */ + + gst_object_swap ((GstObject **) &pad->padtemplate, (GstObject *) templ); + + if (templ) + g_signal_emit (G_OBJECT (templ), gst_pad_template_signals[TEMPL_PAD_CREATED], 0, pad); +} /** * gst_pad_get_pad_template: * @pad: a #GstPad to get the pad template of. @@ -1256,14 +1276,13 @@ { GstRealPad *realpad; - g_return_if_fail (pad != NULL); g_return_if_fail (GST_IS_PAD (pad)); - g_return_if_fail (ghostpad != NULL); g_return_if_fail (GST_IS_GHOST_PAD (ghostpad)); - realpad = GST_PAD_REALIZE (pad); + g_return_if_fail (GST_GPAD_REALPAD (ghostpad) == realpad); realpad->ghostpads = g_list_remove (realpad->ghostpads, ghostpad); + GST_GPAD_REALPAD (ghostpad) = NULL; } /** @@ -1513,7 +1532,6 @@ "start relink filtered %s:%s and %s:%s, clearing caps", GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink)); - /* FIXME does this leak? */ gst_caps_replace (&GST_PAD_CAPS (GST_PAD (realsrc)), NULL); gst_caps_replace (&GST_PAD_CAPS (GST_PAD (realsink)), NULL); gst_caps_replace (&GST_RPAD_FILTER (realsrc), NULL); @@ -1566,7 +1584,7 @@ filtercaps); /* get rid of the old intersection here */ - gst_caps_unref (intersection); + gst_caps_sink (intersection); if (!filtered_intersection) { GST_INFO (GST_CAT_PADS, @@ -1579,6 +1597,7 @@ /* keep a reference to the app caps */ gst_caps_replace_sink (&GST_RPAD_APPFILTER (realsink), filtercaps); gst_caps_replace_sink (&GST_RPAD_APPFILTER (realsrc), filtercaps); + gst_caps_sink (intersection); } } GST_DEBUG (GST_CAT_CAPS, "setting filter for link to:"); @@ -2042,13 +2061,6 @@ GST_DEBUG (GST_CAT_REFCOUNTING, "dispose %s:%s", GST_DEBUG_PAD_NAME(pad)); - if (GST_PAD_PAD_TEMPLATE (pad)){ - GST_DEBUG (GST_CAT_REFCOUNTING, "unreffing padtemplate'%s'", - GST_OBJECT_NAME (GST_PAD_PAD_TEMPLATE (pad))); - gst_object_unref (GST_OBJECT (GST_PAD_PAD_TEMPLATE (pad))); - GST_PAD_PAD_TEMPLATE (pad) = NULL; - } - /* we destroy the ghostpads, because they are nothing without the real pad */ if (GST_REAL_PAD (pad)->ghostpads) { GList *orig, *ghostpads; @@ -2602,8 +2614,9 @@ /***** ghost pads *****/ GType _gst_ghost_pad_type = 0; -static void gst_ghost_pad_class_init (GstGhostPadClass *klass); -static void gst_ghost_pad_init (GstGhostPad *pad); +static void gst_ghost_pad_class_init (GstGhostPadClass *klass); +static void gst_ghost_pad_init (GstGhostPad *pad); +static void gst_ghost_pad_dispose (GObject *object); static GstPad *ghost_pad_parent_class = NULL; /* static guint gst_ghost_pad_signals[LAST_SIGNAL] = { 0 }; */ @@ -2634,12 +2647,24 @@ gobject_class = (GObjectClass*) klass; ghost_pad_parent_class = g_type_class_ref (GST_TYPE_PAD); + + gobject_class->dispose = GST_DEBUG_FUNCPTR (gst_ghost_pad_dispose); } static void gst_ghost_pad_init (GstGhostPad *pad) { - pad->realpad = NULL; + /* zeroed by glib */ +} +static void +gst_ghost_pad_dispose (GObject *object) +{ + GstGhostPad *pad = GST_GHOST_PAD (object); + + if (pad->realpad) + gst_pad_remove_ghost_pad((GstPad *) pad->realpad, (GstPad *) pad); + + G_OBJECT_CLASS (ghost_pad_parent_class)->dispose (object); } /** @@ -2672,7 +2697,7 @@ realpad = GST_PAD_REALIZE (realpad); } GST_GPAD_REALPAD (ghostpad) = realpad; - GST_PAD_PAD_TEMPLATE (ghostpad) = GST_PAD_PAD_TEMPLATE (pad); + gst_pad_set_pad_template (GST_PAD (ghostpad), GST_PAD_PAD_TEMPLATE (pad)); /* add ourselves to the real pad's list of ghostpads */ gst_pad_add_ghost_pad (pad, GST_PAD (ghostpad)); |
From: Thomas V. S. <tho...@us...> - 2003-09-28 14:40:17
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Sun Sep 28 2003 07:40:04 PDT Branch: BRANCH-GSTREAMER-0_6 Log message: fixes #120345 add disable-cpu-opt Modified files: . : configure.ac gst : gst.c gstcpu.c gstcpu.h gsttrashstack.h Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/configure.ac.diff?r1=1.205.2.2.2.22&r2=1.205.2.2.2.23 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.90.4.3&r2=1.90.4.4 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstcpu.c.diff?r1=1.17&r2=1.17.20.1 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstcpu.h.diff?r1=1.7&r2=1.7.12.1 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gsttrashstack.h.diff?r1=1.4.6.1&r2=1.4.6.2 ====Begin Diffs==== Index: configure.ac =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/configure.ac,v retrieving revision 1.205.2.2.2.22 retrieving revision 1.205.2.2.2.23 diff -u -d -r1.205.2.2.2.22 -r1.205.2.2.2.23 --- configure.ac 25 Sep 2003 01:02:47 -0000 1.205.2.2.2.22 +++ configure.ac 28 Sep 2003 14:39:51 -0000 1.205.2.2.2.23 @@ -229,6 +229,16 @@ esac], [USE_ATOMIC_H=$HAVE_ATOMIC_H]) dnl Default value +AC_ARG_ENABLE(fast-stack-trash, +AC_HELP_STRING([--enable-fast-stack-trash],[use fast memory allocator (i586 or above)]), +[case "${enableval}" in + yes) USE_FAST_STACK_TRASH=yes;; + noset) USE_FAST_STACK_TRASH=no;; + no) USE_FAST_STACK_TRASH=no;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-atomic) ;; +esac], +[USE_FAST_STACK_TRASH=yes]) dnl Default value + AC_ARG_ENABLE(plugin-builddir, AC_HELP_STRING([--enable-plugin-builddir],[allow tests/demos to use non-installed plugins]), [case "${enableval}" in @@ -338,6 +348,10 @@ if test "x$USE_ATOMIC_H" = xyes; then AC_DEFINE(HAVE_ATOMIC_H, 1, [Define if atomic.h header file is available]) +fi + +if test "x$USE_FAST_STACK_TRASH" = xyes; then + AC_DEFINE(USE_FAST_STACK_TRASH, 1, [Define if we should use i586 optimized stack functions]) fi dnl test if we have pthread_attr_setstack; if not use the older calls Index: gst.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.90.4.3 retrieving revision 1.90.4.4 diff -u -d -r1.90.4.3 -r1.90.4.4 --- gst.c 8 May 2003 05:37:06 -0000 1.90.4.3 +++ gst.c 28 Sep 2003 14:39:52 -0000 1.90.4.4 @@ -43,6 +43,8 @@ static gboolean _gst_registry_fixed = FALSE; static gboolean _gst_use_threads = TRUE; +static gboolean _gst_enable_cpu_opt = TRUE; + static gboolean gst_initialized = FALSE; /* this will be set in popt callbacks when a problem has been encountered */ static gboolean _gst_initialization_failure = FALSE; @@ -82,6 +84,7 @@ ARG_DEBUG_MASK, ARG_MASK, ARG_MASK_HELP, + ARG_DISABLE_CPU_OPT, ARG_PLUGIN_SPEW, ARG_PLUGIN_PATH, ARG_PLUGIN_LOAD, @@ -105,6 +108,7 @@ {"gst-debug-mask", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_MASK, "debugging bitmask", "MASK"}, {"gst-mask", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_MASK, "bitmask for both info and debugging", "MASK"}, {"gst-mask-help", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_MASK_HELP, "how to set the level of diagnostic output (-mask values)", NULL}, + {"gst-disable-cpu-opt",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DISABLE_CPU_OPT,"Disable accelerated CPU instructions", NULL}, {"gst-plugin-spew", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_SPEW, "enable verbose plugin loading diagnostics", NULL}, {"gst-plugin-path", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH, "'" G_SEARCHPATH_SEPARATOR_S "'--separated path list for loading plugins", "PATHS"}, {"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, "comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH", "PLUGINS"}, @@ -497,7 +501,7 @@ /* register core plugins */ _gst_plugin_register_static (&plugin_desc); - _gst_cpu_initialize (); + _gst_cpu_initialize (_gst_enable_cpu_opt); _gst_props_initialize (); _gst_caps_initialize (); _gst_plugin_initialize (); @@ -610,6 +614,9 @@ case ARG_MASK_HELP: gst_mask_help (); exit (0); + case ARG_DISABLE_CPU_OPT: + _gst_enable_cpu_opt = FALSE; + break; case ARG_PLUGIN_SPEW: break; case ARG_PLUGIN_PATH: Index: gstcpu.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstcpu.c,v retrieving revision 1.17 retrieving revision 1.17.20.1 diff -u -d -r1.17 -r1.17.20.1 --- gstcpu.c 12 Dec 2001 13:37:29 -0000 1.17 +++ gstcpu.c 28 Sep 2003 14:39:52 -0000 1.17.20.1 @@ -1,6 +1,7 @@ /* GStreamer * Copyright (C) 1999,2000 Erik Walthinsen <om...@cs...> * 2000 Wim Taymans <wt...@ch...> + * 2003 Colin Walters <wa...@ve...> * * gstcpu.c: CPU detection and architecture-specific routines * @@ -25,78 +26,81 @@ #include "gst_private.h" #include "gstcpu.h" -static guint32 _gst_cpu_flags; +static guint32 _gst_cpu_flags = 0; #ifdef HAVE_CPU_I386 +#define _gst_cpu_initialize_arch _gst_cpu_initialize_i386 void gst_cpuid_i386 (int, unsigned long *, unsigned long *, unsigned long *, unsigned long *); -#define gst_cpuid gst_cpuid_i386 #else -#define gst_cpuid(o,a,b,c,d) (void)(a);(void)(b);(void)(c); +#define _gst_cpu_initialize_arch _gst_cpu_initialize_none #endif -static gchar * -stringcat (gchar * a, gchar * b) +gboolean _gst_cpu_initialize_i386 (gulong *flags, GString *featurelist); + +void +_gst_cpu_initialize (gboolean opt) { - gchar *c; + GString *featurelist = g_string_new (""); + gulong flags = 0; + + if (opt) { + if (!_gst_cpu_initialize_arch (&flags, featurelist)) + g_string_append (featurelist, "NONE"); + } else + g_string_append (featurelist, "(DISABLED)"); - if (a) { - c = g_strconcat (a, b, NULL); - g_free (a); - } - else { - c = g_strdup (b); - } - return c; + GST_INFO (GST_CAT_GST_INIT, "CPU features: (%08lx) %s", flags, featurelist->str); + g_string_free (featurelist, TRUE); } +gboolean +_gst_cpu_initialize_none (gulong *flags, GString *featurelist) +{ + return FALSE; +} -void -_gst_cpu_initialize (void) +gboolean +_gst_cpu_initialize_i386 (gulong *flags, GString *featurelist) { - gchar *featurelist = NULL; gboolean AMD; - gulong eax = 0, ebx = 0, ecx = 0, edx = 0; - gst_cpuid (0, &eax, &ebx, &ecx, &edx); + gst_cpuid_i386 (0, &eax, &ebx, &ecx, &edx); AMD = (ebx == 0x68747541) && (ecx == 0x444d4163) && (edx == 0x69746e65); - gst_cpuid (1, &eax, &ebx, &ecx, &edx); + gst_cpuid_i386 (1, &eax, &ebx, &ecx, &edx); if (edx & (1 << 23)) { _gst_cpu_flags |= GST_CPU_FLAG_MMX; - featurelist = stringcat (featurelist, "MMX "); + g_string_append (featurelist, "MMX "); if (edx & (1 << 25)) { _gst_cpu_flags |= GST_CPU_FLAG_SSE; _gst_cpu_flags |= GST_CPU_FLAG_MMXEXT; - featurelist = stringcat (featurelist, "SSE "); + g_string_append (featurelist, "SSE "); } - gst_cpuid (0x80000000, &eax, &ebx, &ecx, &edx); + gst_cpuid_i386 (0x80000000, &eax, &ebx, &ecx, &edx); if (eax >= 0x80000001) { - gst_cpuid (0x80000001, &eax, &ebx, &ecx, &edx); + gst_cpuid_i386 (0x80000001, &eax, &ebx, &ecx, &edx); if (edx & (1 << 31)) { _gst_cpu_flags |= GST_CPU_FLAG_3DNOW; - featurelist = stringcat (featurelist, "3DNOW "); + g_string_append (featurelist, "3DNOW "); } if (AMD && (edx & (1 << 22))) { _gst_cpu_flags |= GST_CPU_FLAG_MMXEXT; - featurelist = stringcat (featurelist, "MMXEXT "); + g_string_append (featurelist, "MMXEXT "); } } } - - if (!_gst_cpu_flags) { - featurelist = stringcat (featurelist, "NONE"); - } - - GST_INFO (GST_CAT_GST_INIT, "CPU features: (%08lx) %s", edx, featurelist); - g_free (featurelist); + *flags = eax; + if (_gst_cpu_flags) + return TRUE; + return FALSE; } GstCPUFlags Index: gstcpu.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstcpu.h,v retrieving revision 1.7 retrieving revision 1.7.12.1 diff -u -d -r1.7 -r1.7.12.1 --- gstcpu.h 9 Jul 2002 10:27:21 -0000 1.7 +++ gstcpu.h 28 Sep 2003 14:39:52 -0000 1.7.12.1 @@ -31,7 +31,7 @@ GST_CPU_FLAG_3DNOW = (1<<3) } GstCPUFlags; -void _gst_cpu_initialize (void); +void _gst_cpu_initialize (gboolean useopt); GstCPUFlags gst_cpu_get_flags (void); Index: gsttrashstack.h =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gsttrashstack.h,v retrieving revision 1.4.6.1 retrieving revision 1.4.6.2 diff -u -d -r1.4.6.1 -r1.4.6.2 --- gsttrashstack.h 18 May 2003 22:22:13 -0000 1.4.6.1 +++ gsttrashstack.h 28 Sep 2003 14:39:52 -0000 1.4.6.2 @@ -51,7 +51,7 @@ #if defined (GST_CAN_INLINE) || defined (__GST_TRASH_STACK_C__) -#if defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 +#if defined (USE_FAST_STACK_TRASH) && defined (__i386__) && defined (__GNUC__) && __GNUC__ >= 2 #ifdef GST_CONFIG_NO_SMP #define SMP_LOCK "" |
From: Thomas V. S. <tho...@us...> - 2003-12-15 12:44:48
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Mon Dec 15 2003 04:44:47 PST Log message: implementing segfault handler for plugin loading Modified files: . : ChangeLog gst : gst.c gstplugin.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.29&r2=1.30 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.114&r2=1.115 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstplugin.c.diff?r1=1.109&r2=1.110 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- ChangeLog 2 Dec 2003 18:21:32 -0000 1.29 +++ ChangeLog 15 Dec 2003 12:44:34 -0000 1.30 @@ -1,3 +1,12 @@ +2003-12-15 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gst.c: (init_popt_callback): + * gst/gstplugin.c: (_gst_plugin_fault_handler_restore), + (_gst_plugin_fault_handler_sighandler), + (_gst_plugin_fault_handler_setup), (gst_plugin_load_file): + Implemented fault handlers for catching SIGSEGV while loading + plug-ins + 2003-12-02 Thomas Vander Stichele <thomas at apestaart dot org> * fix documentation build using docbook2..., works on fc1 and rh9 Index: gst.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.114 retrieving revision 1.115 diff -u -d -r1.114 -r1.115 --- gst.c 9 Dec 2003 02:39:30 -0000 1.114 +++ gst.c 15 Dec 2003 12:44:35 -0000 1.115 @@ -55,6 +55,9 @@ static gboolean _gst_initialization_failure = FALSE; extern gint _gst_trace_on; +/* set to TRUE when segfaults need to be left as is */ +gboolean _gst_enable_segfault = FALSE; + extern GThreadFunctions gst_thread_dummy_functions; @@ -96,6 +99,7 @@ ARG_PLUGIN_SPEW, ARG_PLUGIN_PATH, ARG_PLUGIN_LOAD, + ARG_SEGFAULT_ENABLE, ARG_SCHEDULER, ARG_REGISTRY }; @@ -122,6 +126,7 @@ {"gst-plugin-spew", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_SPEW, N_("enable verbose plugin loading diagnostics"), NULL}, {"gst-plugin-path", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH, N_("'" G_SEARCHPATH_SEPARATOR_S "'--separated path list for loading plugins"), "PATHS"}, {"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, N_("comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH"), "PLUGINS"}, + {"gst-enable-segfault",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_SEGFAULT_ENABLE,N_("enable receiving of segmentation faults during plugin loading"), NULL}, {"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, N_("scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)"), "SCHEDULER"}, {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, N_("registry to use") , "REGISTRY"}, POPT_TABLEEND @@ -699,6 +704,9 @@ break; case ARG_PLUGIN_LOAD: split_and_iterate (arg, ",", prepare_for_load_plugin_func, NULL); + break; + case ARG_SEGFAULT_ENABLE: + _gst_enable_segfault = TRUE; break; case ARG_SCHEDULER: gst_scheduler_factory_set_default_name (arg); Index: gstplugin.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstplugin.c,v retrieving revision 1.109 retrieving revision 1.110 diff -u -d -r1.109 -r1.110 --- gstplugin.c 4 Dec 2003 10:02:26 -0000 1.109 +++ gstplugin.c 15 Dec 2003 12:44:35 -0000 1.110 @@ -24,6 +24,7 @@ #include <sys/stat.h> #include <dirent.h> #include <unistd.h> +#include <signal.h> #include "gst_private.h" @@ -39,6 +40,11 @@ static GModule *main_module = NULL; static GList *_gst_plugin_static = NULL; +/* static variables for segfault handling of plugin loading */ +static char *_gst_plugin_fault_handler_filename = NULL; +extern gboolean *_gst_enable_segfault; /* see gst.c */ +static gboolean *_gst_plugin_fault_handler_is_setup = FALSE; + /* list of valid licenses. * One of these must be specified or the plugin won't be loaded * Contact gst...@li... if your license should be @@ -195,13 +201,78 @@ } /** + * _gst_plugin_fault_handler_restore: + * segfault handler restorer + */ +static void +_gst_plugin_fault_handler_restore (void) +{ + struct sigaction action; + + memset (&action, 0, sizeof (action)); + action.sa_handler = SIG_DFL; + + sigaction (SIGSEGV, &action, NULL); +} + +/** + * _gst_plugin_fault_handler_sighandler: + * segfault handler implementation + */ +static void +_gst_plugin_fault_handler_sighandler (int signum) +{ + /* We need to restore the fault handler or we'll keep getting it */ + _gst_plugin_fault_handler_restore (); + + switch (signum) + { + case SIGSEGV: + g_print ("\nERROR:"); + g_print ("Caught a segmentation fault while loading plugin file:\n"); + g_print ("%s\n\n", _gst_plugin_fault_handler_filename); + g_print ("Please either:\n"); + g_print ("- remove it and restart.\n"); + g_print ("- run with --gst-enable-segfault and debug.\n"); + exit (-1); + break; + default: + g_print ("Caught unhandled signal on plugin loading\n"); + break; + } +} + +/** + * _gst_plugin_fault_handler_setup: + * sets up the segfault handler + */ +static void +_gst_plugin_fault_handler_setup (void) +{ + struct sigaction action; + + /* if asked to leave segfaults alone, just return */ + if (_gst_enable_segfault) return; + + if (_gst_plugin_fault_handler_is_setup) return; + + memset (&action, 0, sizeof (action)); + action.sa_handler = _gst_plugin_fault_handler_sighandler; + + sigaction (SIGSEGV, &action, NULL); +} + +static void +_gst_plugin_fault_handler_setup (); + +/** * gst_plugin_load_file: * @plugin: The plugin to load * @error: Pointer to a NULL-valued GError. * * Load the given plugin. * - * Returns: a new GstPlugin or NULL, if an error occured + * Returns: a new GstPlugin or NULL, if an error occurred. */ GstPlugin * gst_plugin_load_file (const gchar *filename, GError **error) @@ -229,8 +300,8 @@ GST_PLUGIN_ERROR, GST_PLUGIN_ERROR_MODULE, "Problem opening file %s\n", - filename); - return FALSE; + filename); + return NULL; } module = g_module_open (filename, G_MODULE_BIND_LAZY); @@ -278,10 +349,19 @@ desc->name); } + /* this is where we load the actual .so, so let's trap SIGSEGV */ + _gst_plugin_fault_handler_setup (); + _gst_plugin_fault_handler_filename = plugin->filename; + if (gst_plugin_register_func (plugin, module, desc)) { + /* remove signal handler */ + _gst_plugin_fault_handler_restore (); + _gst_plugin_fault_handler_filename = NULL; GST_INFO ("plugin \"%s\" loaded", plugin->filename); return plugin; } else { + /* remove signal handler */ + _gst_plugin_fault_handler_restore (); GST_DEBUG ("gst_plugin_register_func failed for plugin \"%s\"", filename); /* plugin == NULL */ g_set_error (error, |
From: Thomas V. S. <tho...@us...> - 2003-12-16 12:21:08
|
CVS Root: /cvsroot/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Dec 16 2003 04:21:07 PST Log message: rename option as suggested to avoid bad jokes :) Modified files: . : ChangeLog gst : gst.c gstplugin.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.31&r2=1.32 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.115&r2=1.116 http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstplugin.c.diff?r1=1.110&r2=1.111 ====Begin Diffs==== Index: gst.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.115 retrieving revision 1.116 diff -u -d -r1.115 -r1.116 --- gst.c 15 Dec 2003 12:44:35 -0000 1.115 +++ gst.c 16 Dec 2003 12:20:54 -0000 1.116 @@ -56,7 +56,7 @@ extern gint _gst_trace_on; /* set to TRUE when segfaults need to be left as is */ -gboolean _gst_enable_segfault = FALSE; +gboolean _gst_disable_segtrap = FALSE; extern GThreadFunctions gst_thread_dummy_functions; @@ -99,7 +99,7 @@ ARG_PLUGIN_SPEW, ARG_PLUGIN_PATH, ARG_PLUGIN_LOAD, - ARG_SEGFAULT_ENABLE, + ARG_SEGTRAP_DISABLE, ARG_SCHEDULER, ARG_REGISTRY }; @@ -126,7 +126,7 @@ {"gst-plugin-spew", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_SPEW, N_("enable verbose plugin loading diagnostics"), NULL}, {"gst-plugin-path", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH, N_("'" G_SEARCHPATH_SEPARATOR_S "'--separated path list for loading plugins"), "PATHS"}, {"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, N_("comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH"), "PLUGINS"}, - {"gst-enable-segfault",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_SEGFAULT_ENABLE,N_("enable receiving of segmentation faults during plugin loading"), NULL}, + {"gst-disable-segtrap",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_SEGTRAP_DISABLE,N_("disable trapping of segmentation faults during plugin loading"), NULL}, {"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, N_("scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)"), "SCHEDULER"}, {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, N_("registry to use") , "REGISTRY"}, POPT_TABLEEND @@ -705,8 +705,8 @@ case ARG_PLUGIN_LOAD: split_and_iterate (arg, ",", prepare_for_load_plugin_func, NULL); break; - case ARG_SEGFAULT_ENABLE: - _gst_enable_segfault = TRUE; + case ARG_SEGTRAP_DISABLE: + _gst_disable_segtrap = TRUE; break; case ARG_SCHEDULER: gst_scheduler_factory_set_default_name (arg); Index: gstplugin.c =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/gst/gstplugin.c,v retrieving revision 1.110 retrieving revision 1.111 diff -u -d -r1.110 -r1.111 --- gstplugin.c 15 Dec 2003 12:44:35 -0000 1.110 +++ gstplugin.c 16 Dec 2003 12:20:54 -0000 1.111 @@ -42,7 +42,7 @@ /* static variables for segfault handling of plugin loading */ static char *_gst_plugin_fault_handler_filename = NULL; -extern gboolean *_gst_enable_segfault; /* see gst.c */ +extern gboolean *_gst_disable_segtrap; /* see gst.c */ static gboolean *_gst_plugin_fault_handler_is_setup = FALSE; /* list of valid licenses. @@ -228,12 +228,12 @@ switch (signum) { case SIGSEGV: - g_print ("\nERROR:"); + g_print ("\nERROR: "); g_print ("Caught a segmentation fault while loading plugin file:\n"); g_print ("%s\n\n", _gst_plugin_fault_handler_filename); g_print ("Please either:\n"); g_print ("- remove it and restart.\n"); - g_print ("- run with --gst-enable-segfault and debug.\n"); + g_print ("- run with --gst-disable-segtrap and debug.\n"); exit (-1); break; default: @@ -252,7 +252,7 @@ struct sigaction action; /* if asked to leave segfaults alone, just return */ - if (_gst_enable_segfault) return; + if (_gst_disable_segtrap) return; if (_gst_plugin_fault_handler_is_setup) return; Index: ChangeLog =================================================================== RCS file: /cvsroot/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- ChangeLog 16 Dec 2003 03:35:31 -0000 1.31 +++ ChangeLog 16 Dec 2003 12:20:54 -0000 1.32 @@ -1,2 +1,14867 @@ -GStreamer does not use changelog files. -The GStreamer developers use CVS commit messages as the replacement. +2003-12-16 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gst.c: + * gst/gstplugin.c: + rename --enable-segfault to --disable-segtrap + +2003-12-15 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gst.c: (init_popt_callback): [...14838 lines suppressed...] + gstfilter.h, gstlog.h, gstmeta.c, gstmeta.h, gstobject.c, + gstobject.h, gstpad.c, gstpad.h, gstpipeline.c, gstpipeline.h, + gstplugin.c, gstplugin.h, gstsink.c, gstsink.h, gstsrc.c, gstsrc.h, + gsttee.c, gsttee.h, gstthread.c, gstthread.h, gsttrace.c, + gsttrace.h, gsttype.c, gsttype.h, gsttypefind.c, gsttypefind.h, + gstutils.c, gstutils.h, gstxml.c, gstxml.h, plugin.c, plugin.h, + Makefile.am: initial checkin + +2000-01-30 08:51 omegahacker + + * AUTHORS, COPYING, COPYING.LIB, ChangeLog, INSTALL, Makefile.am, + NEWS, README, acconfig.h, autogen.sh, config.h.in, configure.in, + install-sh, missing, mkinstalldirs, stamp.h.in: initial checkin + +Fri Jan 12 21:52:09 CET 2001 Wim Taymans <wim...@ch...> + + * PPC compilation fixes (thanks to hadess) + * add eos2 and eos3 proposals + + |
From: Thomas V. S. <tho...@pd...> - 2003-12-24 12:54:30
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Wed Dec 24 2003 04:55:12 PST Log message: remove trailing comma for gtk-doc Modified files: . : ChangeLog gst : gstformat.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.49&r2=1.50 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstformat.h.diff?r1=1.20&r2=1.21 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- ChangeLog 24 Dec 2003 07:42:43 -0000 1.49 +++ ChangeLog 24 Dec 2003 12:55:00 -0000 1.50 @@ -1,3 +1,7 @@ +2003-12-24 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gstformat.h: remove trailing whitespace from enum for gtk-doc + 2003-12-24 Colin Walters <wa...@ve...> * gst/elements/gsttypefindelement.c: Index: gstformat.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstformat.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- gstformat.h 29 Nov 2003 06:34:04 -0000 1.20 +++ gstformat.h 24 Dec 2003 12:55:00 -0000 1.21 @@ -35,7 +35,7 @@ GST_FORMAT_BYTES = 2, GST_FORMAT_TIME = 3, GST_FORMAT_BUFFERS = 4, - GST_FORMAT_PERCENT = 5, + GST_FORMAT_PERCENT = 5 } GstFormat; /* a percentage is always relative to 1000000 */ |
From: Thomas V. S. <tho...@pd...> - 2003-12-24 14:35:35
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Wed Dec 24 2003 06:36:17 PST Log message: whitespace and doc style fixes Modified files: . : ChangeLog gst : gst.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.50&r2=1.51 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.117&r2=1.118 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- ChangeLog 24 Dec 2003 12:55:00 -0000 1.50 +++ ChangeLog 24 Dec 2003 14:36:03 -0000 1.51 @@ -1,5 +1,9 @@ 2003-12-24 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gst.c: whitespace and doc style fixes + +2003-12-24 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gstformat.h: remove trailing whitespace from enum for gtk-doc 2003-12-24 Colin Walters <wa...@ve...> Index: gst.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- gst.c 22 Dec 2003 01:39:34 -0000 1.117 +++ gst.c 24 Dec 2003 14:36:03 -0000 1.118 @@ -88,7 +88,7 @@ enum { ARG_VERSION=1, ARG_FATAL_WARNINGS, -#ifndef GST_DISABLE_GST_DEBUG +#ifndef GST_DISABLE_GST_DEBUG ARG_DEBUG_LEVEL, ARG_DEBUG, ARG_DEBUG_DISABLE, @@ -115,7 +115,7 @@ {NULL, NUL, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, (void *) &init_popt_callback, 0, NULL, NULL}, {"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, N_("Print the GStreamer version"), NULL}, {"gst-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, N_("Make all warnings fatal"), NULL}, -#ifndef GST_DISABLE_GST_DEBUG +#ifndef GST_DISABLE_GST_DEBUG {"gst-debug-level", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_LEVEL, N_("default debug level from 1 (only error) to 5 (anything) or 0 for no output"), "LEVEL"}, {"gst-debug", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG, N_("colon-seperated list of category_name=level pairs to set specific levels for the individual categories.\nExample:GST_AUTOPLUG=5:GST_ELEMENT_*=3"), "CATEGORIES"}, {"gst-debug-no-color", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_NO_COLOR, N_("disable color debugging output"), NULL}, @@ -137,7 +137,7 @@ * * Returns a popt option table with GStreamer's argument specifications. The * table is set up to use popt's callback method, so whenever the parsing is - * actually performed (via a poptGetContext()), the GStreamer libraries will + * actually performed (via poptGetContext), the GStreamer libraries will * be initialized. * * Returns: a pointer to the static GStreamer option table. @@ -161,7 +161,7 @@ * for some reason. If you want your program to fail fatally, * use gst_init() instead. * - * Returns: TRUE if GStreamer coul be initialized + * Returns: %TRUE if GStreamer could be initialized. */ gboolean gst_init_check (int *argc, char **argv[]) @@ -220,7 +220,7 @@ * setting up internal path lists, * registering built-in elements, and loading standard plugins. * - * Returns: TRUE if GStreamer coul be initialized + * Returns: %TRUE if GStreamer could be initialized. */ gboolean gst_init_check_with_popt_table (int *argc, char **argv[], @@ -283,24 +283,24 @@ } *argc = poptStrippedArgv (context, *argc, *argv); - + poptFreeContext (context); return TRUE; } #ifndef GST_DISABLE_REGISTRY -static void +static void add_path_func (gpointer data, gpointer user_data) { GstRegistry *registry = GST_REGISTRY (user_data); - + GST_INFO ("Adding plugin path: \"%s\"", (gchar *) data); gst_registry_add_path (registry, (gchar *)data); } #endif -static void +static void prepare_for_load_plugin_func (gpointer data, gpointer user_data) { preload_plugins = g_slist_prepend (preload_plugins, data); @@ -334,7 +334,7 @@ } g_strfreev (split); } -static void +static void load_plugin_func (gpointer data, gpointer user_data) { GstPlugin *plugin; @@ -356,7 +356,7 @@ } static void -split_and_iterate (const gchar *stringlist, gchar *separator, GFunc iterator, gpointer user_data) +split_and_iterate (const gchar *stringlist, gchar *separator, GFunc iterator, gpointer user_data) { gchar **strings; gint j = 0; @@ -371,7 +371,7 @@ iterator (strings[j], user_data); if (++j == MAX_PATH_SPLIT) { lastlist = g_strdup (strings[j]); - g_strfreev (strings); + g_strfreev (strings); j=0; break; } @@ -406,7 +406,7 @@ #ifndef GST_DISABLE_REGISTRY { const gchar *debug_list; - + debug_list = g_getenv ("GST_DEBUG"); if (debug_list) { parse_debug_list (debug_list); @@ -464,8 +464,8 @@ } static GstPluginDesc plugin_desc = { - GST_VERSION_MAJOR, - GST_VERSION_MINOR, + GST_VERSION_MAJOR, + GST_VERSION_MINOR, "gst_core_elements", "core elements of the GStreamer library", gst_register_core_elements, @@ -476,7 +476,7 @@ GST_ORIGIN, GST_PADDING_INIT -}; +}; /* * this bit handles: @@ -500,10 +500,10 @@ llf = G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL; g_log_set_handler (g_log_domain_gstreamer, llf, debug_log_handler, NULL); - + GST_INFO ("Initializing GStreamer Core Library version %s %s", VERSION, _gst_use_threads ? "" : "(no threads)"); - + _gst_format_initialize (); _gst_query_type_initialize (); gst_object_get_type (); @@ -529,7 +529,7 @@ /* register core plugins */ _gst_plugin_register_static (&plugin_desc); - + _gst_cpu_initialize (_gst_enable_cpu_opt); _gst_structure_initialize (); _gst_value_initialize (); @@ -589,21 +589,21 @@ gst_debug_category_get_name ((GstDebugCategory *) b)); } static void -gst_debug_help (void) +gst_debug_help (void) { GSList *list, *walk; GList *list2, *walk2; - + if (!init_post ()) exit (1); - + walk2 = list2 = gst_registry_pool_plugin_list (); while (walk2) { GstPlugin *plugin = GST_PLUGIN (walk2->data); walk2 = g_list_next (walk2); - + if (!gst_plugin_is_loaded (plugin)) { -#ifndef GST_DISABLE_REGISTRY +#ifndef GST_DISABLE_REGISTRY if (GST_IS_REGISTRY (plugin->manager)) { GST_CAT_LOG (GST_CAT_PLUGIN_LOADING, "loading plugin %s", plugin->desc.name); if (gst_registry_load_plugin (GST_REGISTRY (plugin->manager), plugin) != GST_REGISTRY_OK) @@ -613,43 +613,43 @@ } } g_list_free (list2); - + list = gst_debug_get_all_categories (); walk = list = g_slist_sort (list, sort_by_category_name); - + g_print ("\n"); g_print ("name level description\n"); g_print ("---------------------+--------+--------------------------------\n"); while (walk) { GstDebugCategory *cat = (GstDebugCategory *) walk->data; - + if (gst_debug_is_colored ()) { gchar *color = gst_debug_construct_term_color (cat->color); - g_print ("%s%-20s\033[00m %1d %s %s%s\033[00m\n", + g_print ("%s%-20s\033[00m %1d %s %s%s\033[00m\n", color, - gst_debug_category_get_name (cat), + gst_debug_category_get_name (cat), gst_debug_category_get_threshold (cat), - gst_debug_level_get_name (gst_debug_category_get_threshold (cat)), - color, + gst_debug_level_get_name (gst_debug_category_get_threshold (cat)), + color, gst_debug_category_get_description (cat)); g_free (color); } else { - g_print ("%-20s %1d %s %s\n", gst_debug_category_get_name (cat), + g_print ("%-20s %1d %s %s\n", gst_debug_category_get_name (cat), gst_debug_category_get_threshold (cat), - gst_debug_level_get_name (gst_debug_category_get_threshold (cat)), - gst_debug_category_get_description (cat)); + gst_debug_level_get_name (gst_debug_category_get_threshold (cat)), + gst_debug_category_get_description (cat)); } walk = g_slist_next (walk); - } + } g_slist_free (list); g_print ("\n"); } -#endif +#endif static void init_popt_callback (poptContext context, enum poptCallbackReason reason, - const struct poptOption *option, const char *arg, void *data) + const struct poptOption *option, const char *arg, void *data) { GLogLevelFlags fatal_mask; @@ -669,7 +669,7 @@ fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL; g_log_set_always_fatal (fatal_mask); break; -#ifndef GST_DISABLE_GST_DEBUG +#ifndef GST_DISABLE_GST_DEBUG case ARG_DEBUG_LEVEL: { gint tmp = 0; tmp = strtol (arg, NULL, 0); @@ -730,7 +730,7 @@ /** * gst_use_threads: - * @use_threads: flag indicating threads should be used + * @use_threads: a #gboolean indicating whether threads should be used * * Instructs the core to turn on/off threading. When threading * is turned off, all thread operations such as mutexes and conditionals @@ -752,10 +752,10 @@ /** * gst_has_threads: - * - * Query if GStreamer has threads enabled. * - * Returns: TRUE if threads are enabled. + * Queries if GStreamer has threads enabled. + * + * Returns: %TRUE if threads are enabled. */ gboolean gst_has_threads (void) @@ -769,10 +769,10 @@ /** * gst_main: * - * Enter the main GStreamer processing loop + * Enters the main GStreamer processing loop. */ -void -gst_main (void) +void +gst_main (void) { GMainLoop *loop; @@ -785,10 +785,10 @@ /** * gst_main_quit: * - * Exits the main GStreamer processing loop + * Exits the main GStreamer processing loop. */ -void -gst_main_quit (void) +void +gst_main_quit (void) { if (!mainloops) g_error ("Quit more loops than there are"); @@ -806,9 +806,9 @@ * @minor: pointer to a guint to store the minor version number * @micro: pointer to a guint to store the micro version number * - * Gets the version number of the GStreamer library + * Gets the version number of the GStreamer library. */ -void +void gst_version (guint *major, guint *minor, guint *micro) { g_return_if_fail (major); |
From: Thomas V. S. <tho...@pd...> - 2003-12-25 09:42:25
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Thu Dec 25 2003 01:43:08 PST Log message: fix GST_DEBUG_CATEGORY_INIT description Modified files: . : ChangeLog gst : gstinfo.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.54&r2=1.55 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstinfo.h.diff?r1=1.57&r2=1.58 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- ChangeLog 25 Dec 2003 09:36:00 -0000 1.54 +++ ChangeLog 25 Dec 2003 09:42:56 -0000 1.55 @@ -1,6 +1,8 @@ 2003-12-25 Thomas Vander Stichele <thomas at apestaart dot org> - * docs/gst/tmpl/gstreamer-unused.sgml: + * gst/gstinfo.h: + fix GST_DEBUG_CATEGORY_INIT gtk-doc description + * docs/gst/tmpl/gstreamer-unused.sgml: removed all traces of cvs conflicts 2003-12-24 Thomas Vander Stichele <thomas at apestaart dot org> Index: gstinfo.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstinfo.h,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- gstinfo.h 22 Dec 2003 10:37:31 -0000 1.57 +++ gstinfo.h 25 Dec 2003 09:42:56 -0000 1.58 @@ -235,8 +235,9 @@ * @color: the colors to use for a color representation or 0 for no color. * @description: optional description of the category. * - * Returns: a new #GstDebugCategory with the given properties and set to + * Initializes a new #GstDebugCategory with the given properties and set to * the default threshold. + * * <note> * <para> * This macro expands to nothing if debugging is disabled. |
From: Thomas V. S. <tho...@pd...> - 2004-01-13 11:03:30
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Jan 13 2004 03:04:37 PST Log message: fix some marked strings Modified files: . : ChangeLog gst : gsttag.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.88&r2=1.89 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gsttag.c.diff?r1=1.6&r2=1.7 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- ChangeLog 13 Jan 2004 01:34:32 -0000 1.88 +++ ChangeLog 13 Jan 2004 11:04:25 -0000 1.89 @@ -1,3 +1,7 @@ +2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gsttag.c: fix some strings marked for translation + 2004-01-13 Iain <ia...@pr...> * gst/schedulers/gstoptimalscheduler.c (add_to_group): Reference the Index: gsttag.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gsttag.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- gsttag.c 23 Dec 2003 04:50:01 -0000 1.6 +++ gsttag.c 13 Jan 2004 11:04:25 -0000 1.7 @@ -24,6 +24,7 @@ #endif #include "gst_private.h" +#include "gst-i18n-lib.h" #include "gsttag.h" #include "gstinfo.h" #include "gstvalue.h" @@ -63,7 +64,7 @@ gst_tag_register (GST_TAG_ARTIST, G_TYPE_STRING, _("artist"), - _("person(s) resposible for the recording"), + _("person(s) responsible for the recording"), gst_tag_merge_strings_with_comma); gst_tag_register (GST_TAG_ALBUM, G_TYPE_STRING, @@ -73,7 +74,7 @@ gst_tag_register (GST_TAG_DATE, G_TYPE_UINT, /* FIXME: own data type for dates? */ _("date"), - _("date the data was created in julien days"), + _("date the data was created (in Julian calendar days)"), NULL); gst_tag_register (GST_TAG_GENRE, G_TYPE_STRING, @@ -97,7 +98,7 @@ gst_tag_merge_use_first); gst_tag_register (GST_TAG_LOCATION, G_TYPE_STRING, - _("loccation"), + _("location"), _("original location of file as a URI"), gst_tag_merge_strings_with_comma); gst_tag_register (GST_TAG_DESCRIPTION, |
From: Thomas V. S. <tho...@pd...> - 2004-01-13 12:45:51
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Jan 13 2004 04:46:59 PST Log message: capitalize popt options Modified files: . : ChangeLog gst : gst-i18n-app.h gst.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.91&r2=1.92 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst-i18n-app.h.diff?r1=1.1&r2=1.2 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.120&r2=1.121 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.91 retrieving revision 1.92 diff -u -d -r1.91 -r1.92 --- ChangeLog 13 Jan 2004 11:39:06 -0000 1.91 +++ ChangeLog 13 Jan 2004 12:46:47 -0000 1.92 @@ -1,5 +1,9 @@ 2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gst.c: capitalize beginnings of popt options + +2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org> + * po/README: add some notes on how to update translations 2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org> Index: gst-i18n-app.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gst-i18n-app.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gst-i18n-app.h 13 Jan 2004 11:29:59 -0000 1.1 +++ gst-i18n-app.h 13 Jan 2004 12:46:47 -0000 1.2 @@ -30,6 +30,7 @@ #include "gettext.h" /* included with gettext distribution and copied */ /* we want to use shorthand _() for translating and N_() for marking */ +//#define _(String) gettext (String) #define _(String) gettext (String) #define N_(String) gettext_noop (String) /* FIXME: if we need it, we can add Q_ as well, like in glib */ Index: gst.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.120 retrieving revision 1.121 diff -u -d -r1.120 -r1.121 --- gst.c 13 Jan 2004 11:46:12 -0000 1.120 +++ gst.c 13 Jan 2004 12:46:47 -0000 1.121 @@ -118,19 +118,19 @@ {"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, N_("Print the GStreamer version"), NULL}, {"gst-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, N_("Make all warnings fatal"), NULL}, #ifndef GST_DISABLE_GST_DEBUG - {"gst-debug-level", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_LEVEL, N_("default debug level from 1 (only error) to 5 (anything) or 0 for no output"), "LEVEL"}, - {"gst-debug", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG, N_("colon-seperated list of category_name=level pairs to set specific levels for the individual categories.\nExample:GST_AUTOPLUG=5:GST_ELEMENT_*=3"), "CATEGORIES"}, - {"gst-debug-no-color", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_NO_COLOR, N_("disable color debugging output"), NULL}, - {"gst-disable-debug", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_DISABLE, N_("disable debugging")}, - {"gst-debug-help", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_HELP, N_("print available debug categories and exit"), NULL}, + {"gst-debug-level", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_LEVEL, N_("Default debug level from 1 (only error) to 5 (anything) or 0 for no output"), "LEVEL"}, + {"gst-debug", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG, N_("Colon-seperated list of category_name=level pairs to set specific levels for the individual categories.\nExample:GST_AUTOPLUG=5:GST_ELEMENT_*=3"), "CATEGORIES"}, + {"gst-debug-no-color", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_NO_COLOR, N_("Disable color debugging output"), NULL}, + {"gst-disable-debug", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_DISABLE, N_("Disable debugging")}, + {"gst-debug-help", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_HELP, N_("Print available debug categories and exit"), NULL}, #endif {"gst-disable-cpu-opt",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DISABLE_CPU_OPT,N_("Disable accelerated CPU instructions"), NULL}, - {"gst-plugin-spew", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_SPEW, N_("enable verbose plugin loading diagnostics"), NULL}, + {"gst-plugin-spew", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_SPEW, N_("Enable verbose plugin loading diagnostics"), NULL}, {"gst-plugin-path", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH, N_("'" G_SEARCHPATH_SEPARATOR_S "'--separated path list for loading plugins"), "PATHS"}, - {"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, N_("comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH"), "PLUGINS"}, - {"gst-disable-segtrap",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_SEGTRAP_DISABLE,N_("disable trapping of segmentation faults during plugin loading"), NULL}, - {"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, N_("scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)"), "SCHEDULER"}, - {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, N_("registry to use") , "REGISTRY"}, + {"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, N_("Comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH"), "PLUGINS"}, + {"gst-disable-segtrap",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_SEGTRAP_DISABLE,N_("Disable trapping of segmentation faults during plugin loading"), NULL}, + {"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, N_("Scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)"), "SCHEDULER"}, + {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, N_("Registry to use") , "REGISTRY"}, POPT_TABLEEND }; |
From: Thomas V. S. <tho...@pd...> - 2004-01-13 13:02:28
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Jan 13 2004 05:03:36 PST Log message: fix translations change --gst-debug format Modified files: . : ChangeLog gst : gst.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.92&r2=1.93 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst.c.diff?r1=1.121&r2=1.122 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- ChangeLog 13 Jan 2004 12:46:47 -0000 1.92 +++ ChangeLog 13 Jan 2004 13:03:24 -0000 1.93 @@ -1,6 +1,9 @@ 2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org> - * gst/gst.c: capitalize beginnings of popt options + * gst/gst.c: + - capitalize beginnings of popt options + - fix strings for translation + - change gst-debug format from =N1=V1:N2=V2 to =N1:V1,N2:V2 2004-01-13 Thomas Vander Stichele <thomas at apestaart dot org> Index: gst.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gst.c,v retrieving revision 1.121 retrieving revision 1.122 diff -u -d -r1.121 -r1.122 --- gst.c 13 Jan 2004 12:46:47 -0000 1.121 +++ gst.c 13 Jan 2004 13:03:24 -0000 1.122 @@ -118,19 +118,19 @@ {"gst-version", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_VERSION, N_("Print the GStreamer version"), NULL}, {"gst-fatal-warnings", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_FATAL_WARNINGS, N_("Make all warnings fatal"), NULL}, #ifndef GST_DISABLE_GST_DEBUG - {"gst-debug-level", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_LEVEL, N_("Default debug level from 1 (only error) to 5 (anything) or 0 for no output"), "LEVEL"}, - {"gst-debug", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG, N_("Colon-seperated list of category_name=level pairs to set specific levels for the individual categories.\nExample:GST_AUTOPLUG=5:GST_ELEMENT_*=3"), "CATEGORIES"}, + {"gst-debug-level", NUL, POPT_ARG_INT|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_LEVEL, N_("Default debug level from 1 (only error) to 5 (anything) or 0 for no output"), N_("LEVEL")}, + {"gst-debug", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG, N_("Comma-separated list of category_name:level pairs to set specific levels for the individual categories.\nExample: GST_AUTOPLUG:5,GST_ELEMENT_*:3"), N_("CATEGORIES")}, {"gst-debug-no-color", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_NO_COLOR, N_("Disable color debugging output"), NULL}, {"gst-disable-debug", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_DISABLE, N_("Disable debugging")}, {"gst-debug-help", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DEBUG_HELP, N_("Print available debug categories and exit"), NULL}, #endif {"gst-disable-cpu-opt",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_DISABLE_CPU_OPT,N_("Disable accelerated CPU instructions"), NULL}, {"gst-plugin-spew", NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_SPEW, N_("Enable verbose plugin loading diagnostics"), NULL}, - {"gst-plugin-path", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH, N_("'" G_SEARCHPATH_SEPARATOR_S "'--separated path list for loading plugins"), "PATHS"}, - {"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, N_("Comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH"), "PLUGINS"}, + {"gst-plugin-path", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_PATH, N_("path list for loading plugins (separated by '" G_SEARCHPATH_SEPARATOR_S "')"),N_("PATHS")}, + {"gst-plugin-load", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_PLUGIN_LOAD, N_("Comma-separated list of plugins to preload in addition to the list stored in env variable GST_PLUGIN_PATH"), N_("PLUGINS")}, {"gst-disable-segtrap",NUL, POPT_ARG_NONE|POPT_ARGFLAG_STRIP, NULL, ARG_SEGTRAP_DISABLE,N_("Disable trapping of segmentation faults during plugin loading"), NULL}, - {"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, N_("Scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)"), "SCHEDULER"}, - {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, N_("Registry to use") , "REGISTRY"}, + {"gst-scheduler", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_SCHEDULER, N_("Scheduler to use ('"GST_SCHEDULER_DEFAULT_NAME"' is the default)"), N_("SCHEDULER")}, + {"gst-registry", NUL, POPT_ARG_STRING|POPT_ARGFLAG_STRIP, NULL, ARG_REGISTRY, N_("Registry to use") , N_("REGISTRY")}, POPT_TABLEEND }; @@ -316,10 +316,10 @@ g_return_if_fail (list != NULL); - walk = split = g_strsplit (list, ":", 0); + walk = split = g_strsplit (list, ",", 0); while (walk[0]) { - gchar **values = g_strsplit ( walk[0], "=", 2); + gchar **values = g_strsplit ( walk[0], ":", 2); if (values[0] && values[1]) { gint level = 0; g_strstrip (values[0]); |
From: Thomas V. S. <tho...@pd...> - 2004-01-19 09:57:25
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Mon Jan 19 2004 01:58:41 PST Log message: add G_STMT macros Modified files: . : ChangeLog gst : gstelement.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.111&r2=1.112 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.h.diff?r1=1.148&r2=1.149 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.111 retrieving revision 1.112 diff -u -d -r1.111 -r1.112 --- ChangeLog 18 Jan 2004 21:36:19 -0000 1.111 +++ ChangeLog 19 Jan 2004 09:58:29 -0000 1.112 @@ -1,3 +1,9 @@ +2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gstelement.h: + add G_STMT macros to gst_element_error, which isn't strictly + necessary but people tell me to anyway. + 2004-01-18 Thomas Vander Stichele <thomas at apestaart dot org> * gst/Makefile.am: Index: gstelement.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.h,v retrieving revision 1.148 retrieving revision 1.149 diff -u -d -r1.148 -r1.149 --- gstelement.h 18 Jan 2004 21:36:19 -0000 1.148 +++ gstelement.h 19 Jan 2004 09:58:29 -0000 1.149 @@ -139,12 +139,12 @@ #define GST_ELEMENT_CLOCK(obj) (((GstElement*)(obj))->clock) #define GST_ELEMENT_PADS(obj) ((obj)->pads) -#define gst_element_error(el, domain, code, message, debug) \ +#define gst_element_error(el, domain, code, message, debug) G_STMT_START { \ gst_element_error_extended (GST_ELEMENT(el), \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ g_strdup_printf message, \ g_strdup_printf debug, \ - __FILE__, GST_FUNCTION, __LINE__) + __FILE__, GST_FUNCTION, __LINE__); } G_STMT_END typedef struct _GstElementFactory GstElementFactory; typedef struct _GstElementFactoryClass GstElementFactoryClass; |
From: Thomas V. S. <tho...@pd...> - 2004-01-19 11:31:31
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Mon Jan 19 2004 03:32:47 PST Log message: adding a helper printf function for gst_element_error Modified files: . : ChangeLog gst : gstelement.c gstelement.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.112&r2=1.113 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.237&r2=1.238 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.h.diff?r1=1.149&r2=1.150 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 --- ChangeLog 19 Jan 2004 09:58:29 -0000 1.112 +++ ChangeLog 19 Jan 2004 11:32:35 -0000 1.113 @@ -1,5 +1,12 @@ 2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gstelement.c: (gst_element_error_printf), + (gst_element_error_extended): + * gst/gstelement.h: + add a helper printf function so we can have NULL values passed. + +2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gstelement.h: add G_STMT macros to gst_element_error, which isn't strictly necessary but people tell me to anyway. Index: gstelement.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.237 retrieving revision 1.238 diff -u -d -r1.237 -r1.238 --- gstelement.c 18 Jan 2004 21:36:19 -0000 1.237 +++ gstelement.c 19 Jan 2004 11:32:35 -0000 1.238 @@ -2350,6 +2350,29 @@ } /** + * gst_element_error_printf: + * @format: the printf-like format to use, or NULL + * + * This function is only used internally by the #gst_element_error macro. + * + * Returns: a newly allocated string, or NULL if the format was NULL or "" + */ +gchar * +gst_element_error_printf (const gchar *format, ...) +{ + va_list args; + gchar *buffer; + + if (format == NULL) return NULL; + if (format[0] == 0) return NULL; + + va_start (args, format); + buffer = g_strdup_vprintf (format, args); + va_end (args); + return buffer; +} + +/** * gst_element_error_extended: * @element: a #GstElement with the error. * @domain: the GStreamer error domain this error belongs to. @@ -2361,7 +2384,7 @@ * * signals an error condition on an element. * This function is used internally by elements. - * It results in the "error_2" signal. + * It results in the "error" signal. */ void gst_element_error_extended @@ -2378,13 +2401,20 @@ /* check if we send the given message or the default error message */ if ((message == NULL) || (message[0] == 0)) { - /* we got this message from g_strdup_printf (NULL); */ + /* we got this message from g_strdup_printf (""); */ g_free (message); sent_message = gst_error_get_message (domain, code); } else sent_message = message; + if ((debug == NULL) || (debug[0] == 0)) + { + /* we got this debug from g_strdup_printf (""); */ + g_free (debug); + debug = NULL; + } + /* create error message */ GST_CAT_INFO (GST_CAT_ERROR_SYSTEM, "signaling error in %s: %s", GST_ELEMENT_NAME (element), Index: gstelement.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.h,v retrieving revision 1.149 retrieving revision 1.150 diff -u -d -r1.149 -r1.150 --- gstelement.h 19 Jan 2004 09:58:29 -0000 1.149 +++ gstelement.h 19 Jan 2004 11:32:35 -0000 1.150 @@ -142,8 +142,8 @@ #define gst_element_error(el, domain, code, message, debug) G_STMT_START { \ gst_element_error_extended (GST_ELEMENT(el), \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ - g_strdup_printf message, \ - g_strdup_printf debug, \ + gst_element_error_printf message, \ + gst_element_error_printf debug, \ __FILE__, GST_FUNCTION, __LINE__); } G_STMT_END typedef struct _GstElementFactory GstElementFactory; @@ -365,6 +365,7 @@ void gst_element_set_eos (GstElement *element); +gchar * gst_element_error_printf (const gchar *format, ...); void gst_element_error_extended (GstElement *element, GQuark domain, gint code, gchar *message, gchar *debug, const gchar *file, const gchar *function, gint line); gboolean gst_element_is_locked_state (GstElement *element); |
From: Thomas V. S. <tho...@pd...> - 2004-01-19 15:48:50
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Mon Jan 19 2004 07:50:04 PST Log message: add gstelement.c for translation remove config.h from i18n headers Modified files: . : ChangeLog gst : gst-i18n-app.h gst-i18n-lib.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.116&r2=1.117 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst-i18n-app.h.diff?r1=1.3&r2=1.4 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gst-i18n-lib.h.diff?r1=1.1&r2=1.2 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.116 retrieving revision 1.117 diff -u -d -r1.116 -r1.117 --- ChangeLog 19 Jan 2004 15:21:33 -0000 1.116 +++ ChangeLog 19 Jan 2004 15:49:52 -0000 1.117 @@ -1,12 +1,15 @@ 2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gst-i18n-app.h: + * gst/gst-i18n-lib.h: + remove inclusion of config.h * po/POTFILES.in: * po/nl.po: add gst/gstelement.c 2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> - * po/nl.po: updated Dutch translation + * po/nl.po: updated Dutch translation 2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> Index: gst-i18n-app.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gst-i18n-app.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gst-i18n-app.h 13 Jan 2004 13:25:03 -0000 1.3 +++ gst-i18n-app.h 19 Jan 2004 15:49:52 -0000 1.4 @@ -23,10 +23,6 @@ #ifndef __GST_I18N_APP_H__ #define __GST_I18N_APP_H__ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - #include "gettext.h" /* included with gettext distribution and copied */ /* we want to use shorthand _() for translating and N_() for marking */ Index: gst-i18n-lib.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gst-i18n-lib.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gst-i18n-lib.h 13 Jan 2004 11:29:59 -0000 1.1 +++ gst-i18n-lib.h 19 Jan 2004 15:49:52 -0000 1.2 @@ -25,10 +25,6 @@ #include "gettext.h" /* included with gettext distribution and copied */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - #ifndef GETTEXT_PACKAGE #error You must define GETTEXT_PACKAGE before including this header. #endif |
From: Thomas V. S. <tho...@pd...> - 2004-01-19 18:22:14
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Mon Jan 19 2004 10:23:31 PST Log message: privatise Modified files: . : ChangeLog gst : gstelement.c gstelement.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.118&r2=1.119 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.238&r2=1.239 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.h.diff?r1=1.150&r2=1.151 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- ChangeLog 19 Jan 2004 18:00:43 -0000 1.118 +++ ChangeLog 19 Jan 2004 18:23:19 -0000 1.119 @@ -1,5 +1,11 @@ 2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gstelement.c: (_gst_element_error_printf): + * gst/gstelement.h: + privatise function + +2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> + * docs/random/error: doc explaining error system * gst/elements/gstfilesrc.c: (gst_filesrc_open_file): Index: gstelement.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.238 retrieving revision 1.239 diff -u -d -r1.238 -r1.239 --- gstelement.c 19 Jan 2004 11:32:35 -0000 1.238 +++ gstelement.c 19 Jan 2004 18:23:19 -0000 1.239 @@ -2350,7 +2350,7 @@ } /** - * gst_element_error_printf: + * _gst_element_error_printf: * @format: the printf-like format to use, or NULL * * This function is only used internally by the #gst_element_error macro. @@ -2358,7 +2358,7 @@ * Returns: a newly allocated string, or NULL if the format was NULL or "" */ gchar * -gst_element_error_printf (const gchar *format, ...) +_gst_element_error_printf (const gchar *format, ...) { va_list args; gchar *buffer; Index: gstelement.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.h,v retrieving revision 1.150 retrieving revision 1.151 diff -u -d -r1.150 -r1.151 --- gstelement.h 19 Jan 2004 11:32:35 -0000 1.150 +++ gstelement.h 19 Jan 2004 18:23:19 -0000 1.151 @@ -142,8 +142,8 @@ #define gst_element_error(el, domain, code, message, debug) G_STMT_START { \ gst_element_error_extended (GST_ELEMENT(el), \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ - gst_element_error_printf message, \ - gst_element_error_printf debug, \ + _gst_element_error_printf message, \ + _gst_element_error_printf debug, \ __FILE__, GST_FUNCTION, __LINE__); } G_STMT_END typedef struct _GstElementFactory GstElementFactory; |
From: Thomas V. S. <tho...@pd...> - 2004-01-20 10:31:33
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Jan 20 2004 02:32:51 PST Log message: fix _gst_element_error_printf prototype Modified files: . : ChangeLog gst : gstelement.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.122&r2=1.123 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.h.diff?r1=1.152&r2=1.153 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- ChangeLog 20 Jan 2004 09:14:25 -0000 1.122 +++ ChangeLog 20 Jan 2004 10:32:38 -0000 1.123 @@ -1,3 +1,7 @@ +2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gstelement.h: fix _gst_element_error_printf prototype + 2004-01-20 David Schleef <ds...@sc...> * gst/gststructure.c: (gst_structure_to_string): @@ -17,12 +21,6 @@ we want to keep that one in the future or change xvidenc.c to use another error. -2004-01-19 Julien MOUTTE <ju...@mo...> - - * gst/gstelement.h: Temporary fixing core build breakage due to - _gst_element_error_printf being undeclared before the macro. Thomas - please fix that soon ! - 2004-01-19 Thomas Vander Stichele <thomas at apestaart dot org> * gst/gstelement.c: (_gst_element_error_printf): Index: gstelement.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.h,v retrieving revision 1.152 retrieving revision 1.153 diff -u -d -r1.152 -r1.153 --- gstelement.h 19 Jan 2004 22:33:34 -0000 1.152 +++ gstelement.h 20 Jan 2004 10:32:38 -0000 1.153 @@ -139,8 +139,6 @@ #define GST_ELEMENT_CLOCK(obj) (((GstElement*)(obj))->clock) #define GST_ELEMENT_PADS(obj) ((obj)->pads) -gchar * _gst_element_error_printf (const gchar *format, ...); - #define gst_element_error(el, domain, code, message, debug) G_STMT_START { \ gst_element_error_extended (GST_ELEMENT(el), \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ @@ -367,7 +365,7 @@ void gst_element_set_eos (GstElement *element); -gchar * gst_element_error_printf (const gchar *format, ...); +gchar * _gst_element_error_printf (const gchar *format, ...); void gst_element_error_extended (GstElement *element, GQuark domain, gint code, gchar *message, gchar *debug, const gchar *file, const gchar *function, gint line); gboolean gst_element_is_locked_state (GstElement *element); |
From: Thomas V. S. <tho...@pd...> - 2004-01-20 10:52:14
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Jan 20 2004 02:53:32 PST Log message: changed _extended to _full Modified files: . : ChangeLog gst : gstelement.c gstelement.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.123&r2=1.124 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.239&r2=1.240 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.h.diff?r1=1.153&r2=1.154 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.123 retrieving revision 1.124 diff -u -d -r1.123 -r1.124 --- ChangeLog 20 Jan 2004 10:32:38 -0000 1.123 +++ ChangeLog 20 Jan 2004 10:53:20 -0000 1.124 @@ -1,5 +1,24 @@ 2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gstelement.c: (gst_element_error_full): + * gst/gstelement.h: + change _extended to _full + +2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org> + + reviewed by: <delete if not using a buddy> + + * docs/gst/tmpl/gst.sgml: + * docs/gst/tmpl/gstbuffer.sgml: + * docs/gst/tmpl/gstclock.sgml: + * docs/gst/tmpl/gstelement.sgml: + * docs/gst/tmpl/gstreamer-unused.sgml: + * docs/gst/tmpl/gstxml.sgml: + * gst/gstelement.c: (gst_element_error_full): + * gst/gstelement.h: + +2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gstelement.h: fix _gst_element_error_printf prototype 2004-01-20 David Schleef <ds...@sc...> Index: gstelement.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.239 retrieving revision 1.240 diff -u -d -r1.239 -r1.240 --- gstelement.c 19 Jan 2004 18:23:19 -0000 1.239 +++ gstelement.c 20 Jan 2004 10:53:20 -0000 1.240 @@ -2373,7 +2373,7 @@ } /** - * gst_element_error_extended: + * gst_element_error_full: * @element: a #GstElement with the error. * @domain: the GStreamer error domain this error belongs to. * @code: the error code belonging to the domain @@ -2382,12 +2382,12 @@ * debug: an allocated debug message to be used as a replacement for the * default debugging information, or NULL * - * signals an error condition on an element. + * Signals an error condition on an element. * This function is used internally by elements. * It results in the "error" signal. */ void -gst_element_error_extended +gst_element_error_full (GstElement *element, GQuark domain, gint code, gchar *message, gchar *debug, const gchar *file, const gchar *function, gint line) { Index: gstelement.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.h,v retrieving revision 1.153 retrieving revision 1.154 diff -u -d -r1.153 -r1.154 --- gstelement.h 20 Jan 2004 10:32:38 -0000 1.153 +++ gstelement.h 20 Jan 2004 10:53:20 -0000 1.154 @@ -140,7 +140,7 @@ #define GST_ELEMENT_PADS(obj) ((obj)->pads) #define gst_element_error(el, domain, code, message, debug) G_STMT_START { \ - gst_element_error_extended (GST_ELEMENT(el), \ + gst_element_error_full (GST_ELEMENT(el), \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ _gst_element_error_printf message, \ _gst_element_error_printf debug, \ @@ -365,8 +365,8 @@ void gst_element_set_eos (GstElement *element); -gchar * _gst_element_error_printf (const gchar *format, ...); -void gst_element_error_extended (GstElement *element, GQuark domain, gint code, gchar *message, gchar *debug, const gchar *file, const gchar *function, gint line); +gchar * _gst_element_error_printf (const gchar *format, ...); +void gst_element_error_full (GstElement *element, GQuark domain, gint code, gchar *message, gchar *debug, const gchar *file, const gchar *function, gint line); gboolean gst_element_is_locked_state (GstElement *element); void gst_element_set_locked_state (GstElement *element, gboolean locked_state); |
From: Thomas V. S. <tho...@pd...> - 2004-01-20 12:41:51
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Jan 20 2004 04:43:08 PST Log message: fix LIBRARY_ERROR_ENCODE Modified files: . : ChangeLog gst : gsterror.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.124&r2=1.125 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gsterror.h.diff?r1=1.2&r2=1.3 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 --- ChangeLog 20 Jan 2004 10:53:20 -0000 1.124 +++ ChangeLog 20 Jan 2004 12:42:56 -0000 1.125 @@ -1,5 +1,10 @@ 2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gsterror.h: + fix wrong GST_LIBRARY_ERROR_ENCODE addition + +2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gstelement.c: (gst_element_error_full): * gst/gstelement.h: change _extended to _full Index: gsterror.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gsterror.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gsterror.h 19 Jan 2004 23:02:55 -0000 1.2 +++ gsterror.h 20 Jan 2004 12:42:56 -0000 1.3 @@ -64,8 +64,8 @@ GST_LIBRARY_ERROR_INIT, GST_LIBRARY_ERROR_SHUTDOWN, GST_LIBRARY_ERROR_SETTINGS, - GST_LIBRARY_ERROR_NUM_ERRORS, - GST_LIBRARY_ERROR_ENCODE + GST_LIBRARY_ERROR_ENCODE, + GST_LIBRARY_ERROR_NUM_ERRORS } GstLibraryError; |
From: Thomas V. S. <tho...@pd...> - 2004-01-20 13:36:04
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Tue Jan 20 2004 05:37:22 PST Log message: adding vorbis tags fixing replaygain tag names Modified files: . : ChangeLog gst : gsttag.c gsttag.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.125&r2=1.126 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gsttag.c.diff?r1=1.9&r2=1.10 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gsttag.h.diff?r1=1.4&r2=1.5 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- ChangeLog 20 Jan 2004 12:42:56 -0000 1.125 +++ ChangeLog 20 Jan 2004 13:37:10 -0000 1.126 @@ -1,5 +1,12 @@ 2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gsttag.c: (_gst_tag_initialize), (gst_tag_list_add_valist): + * gst/gsttag.h: + add some tags used in ogg as well + fix _ in replaygain tags + +2004-01-20 Thomas Vander Stichele <thomas at apestaart dot org> + * gst/gsterror.h: fix wrong GST_LIBRARY_ERROR_ENCODE addition Index: gsttag.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gsttag.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- gsttag.c 18 Jan 2004 21:03:43 -0000 1.9 +++ gsttag.c 20 Jan 2004 13:37:10 -0000 1.10 @@ -151,21 +151,36 @@ _("codec"), _("codec the data is stored in"), gst_tag_merge_strings_with_comma); - gst_tag_register (GST_TAG_MINIMUM_BITRATE, - G_TYPE_UINT, - _("minimum bitrate"), - _("minimum bitrate in bits/s"), - NULL); gst_tag_register (GST_TAG_BITRATE, G_TYPE_UINT, _("bitrate"), _("exact or average bitrate in bits/s"), NULL); + gst_tag_register (GST_TAG_NOMINAL_BITRATE, + G_TYPE_UINT, + _("nominal bitrate"), + _("nominal bitrate in bits/s"), + NULL); + gst_tag_register (GST_TAG_MINIMUM_BITRATE, + G_TYPE_UINT, + _("minimum bitrate"), + _("minimum bitrate in bits/s"), + NULL); gst_tag_register (GST_TAG_MAXIMUM_BITRATE, G_TYPE_UINT, _("maximum bitrate"), _("maximum bitrate in bits/s"), NULL); + gst_tag_register (GST_TAG_ENCODER_VERSION, + G_TYPE_UINT, + _("encoder version"), + _("version of the encoder used to encode this stream"), + NULL); + gst_tag_register (GST_TAG_SERIAL, + G_TYPE_UINT, + _("serial"), + _("serial number of track"), + NULL); gst_tag_register (GST_TAG_TRACK_GAIN, G_TYPE_DOUBLE, _("replaygain track gain"), @@ -643,6 +658,8 @@ GValue value = { 0, }; quark = g_quark_from_string (tag); info = gst_tag_lookup (quark); + if (info == NULL) + g_warning ("no GstTag for %s", tag); g_return_if_fail (info != NULL); g_value_init (&value, info->type); G_VALUE_COLLECT (&value, var_args, 0, &error); Index: gsttag.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gsttag.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gsttag.h 18 Jan 2004 21:03:43 -0000 1.4 +++ gsttag.h 20 Jan 2004 13:37:10 -0000 1.5 @@ -233,12 +233,15 @@ #define GST_TAG_DURATION "duration" #define GST_TAG_CODEC "codec" #define GST_TAG_BITRATE "bitrate" +#define GST_TAG_NOMINAL_BITRATE "nominal-bitrate" #define GST_TAG_MINIMUM_BITRATE "minimum-bitrate" #define GST_TAG_MAXIMUM_BITRATE "maximum-bitrate" -#define GST_TAG_TRACK_GAIN "replaygain_track_gain" -#define GST_TAG_TRACK_PEAK "replaygain_track_peak" -#define GST_TAG_ALBUM_GAIN "replaygain_album_gain" -#define GST_TAG_ALBUM_PEAK "replaygain_album_peak" +#define GST_TAG_SERIAL "serial" +#define GST_TAG_ENCODER_VERSION "encoder-version" +#define GST_TAG_TRACK_GAIN "replaygain-track-gain" +#define GST_TAG_TRACK_PEAK "replaygain-track-peak" +#define GST_TAG_ALBUM_GAIN "replaygain-album-gain" +#define GST_TAG_ALBUM_PEAK "replaygain-album-peak" G_END_DECLS |
From: Thomas V. S. <tho...@pd...> - 2004-01-26 09:44:42
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Mon Jan 26 2004 01:46:08 PST Log message: reinstate LIBRARY_ENCODE Modified files: . : ChangeLog gst : gsterror.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.136&r2=1.137 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gsterror.h.diff?r1=1.4&r2=1.5 ====Begin Diffs==== Index: gsterror.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gsterror.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gsterror.h 26 Jan 2004 03:44:14 -0000 1.4 +++ gsterror.h 26 Jan 2004 09:45:55 -0000 1.5 @@ -64,6 +64,7 @@ GST_LIBRARY_ERROR_INIT, GST_LIBRARY_ERROR_SHUTDOWN, GST_LIBRARY_ERROR_SETTINGS, + GST_LIBRARY_ERROR_ENCODE, GST_LIBRARY_ERROR_NUM_ERRORS } GstLibraryError; Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.136 retrieving revision 1.137 diff -u -d -r1.136 -r1.137 --- ChangeLog 26 Jan 2004 03:44:13 -0000 1.136 +++ ChangeLog 26 Jan 2004 09:45:55 -0000 1.137 @@ -1,3 +1,8 @@ +2004-01-26 Thomas Vander Stichele <thomas at apestaart dot org> + + * gst/gsterror.h: reinstate GST_LIBRARY_ERROR_ENCODE until + policy is set + 2004-01-26 Benjamin Otte <in...@pu...> * gst/gstelement.h: |
From: Thomas V. S. <tho...@pd...> - 2004-01-31 19:08:18
|
CVS Root: /home/cvs/gstreamer Module: gstreamer Changes by: thomasvs Date: Sat Jan 31 2004 11:09:50 PST Log message: add path for element throwing error Modified files: . : ChangeLog gst : gstelement.c gstelement.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.179&r2=1.180 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.c.diff?r1=1.243&r2=1.244 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/gstelement.h.diff?r1=1.161&r2=1.162 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.179 retrieving revision 1.180 diff -u -d -r1.179 -r1.180 --- ChangeLog 31 Jan 2004 11:17:43 -0000 1.179 +++ ChangeLog 31 Jan 2004 19:09:37 -0000 1.180 @@ -1,3 +1,10 @@ +2004-01-31 Thomas Vander Stichele <thomas at apestaart dot org> + + * docs/gst/tmpl/gstelement.sgml: + * docs/gst/tmpl/gstxml.sgml: + * gst/gstelement.c: (gst_element_error_full): + add element path to error + 2004-01-31 Benjamin Otte <in...@pu...> * docs/random/mimetypes: Index: gstelement.c =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.c,v retrieving revision 1.243 retrieving revision 1.244 diff -u -d -r1.243 -r1.244 --- gstelement.c 30 Jan 2004 20:48:13 -0000 1.243 +++ gstelement.c 31 Jan 2004 19:09:38 -0000 1.244 @@ -2393,6 +2393,7 @@ const gchar *file, const gchar *function, gint line) { GError *error = NULL; + gchar *name; gchar *sent_message; gchar *sent_debug; @@ -2435,13 +2436,15 @@ /* emit the signal, make sure the element stays available */ gst_object_ref (GST_OBJECT (element)); + name = gst_object_get_path_string (GST_OBJECT (element)); if (debug) - sent_debug = g_strdup_printf ("%s(%d):%s:\n%s", - file, line, function, + sent_debug = g_strdup_printf ("%s(%d): %s: %s:\n%s", + file, line, function, name, debug ? debug : ""); else sent_debug = NULL; g_free (debug); + g_free (name); g_signal_emit (G_OBJECT (element), gst_element_signals[ERROR], 0, element, error, sent_debug); GST_CAT_INFO (GST_CAT_ERROR_SYSTEM, "signalled error in %s: %s", Index: gstelement.h =================================================================== RCS file: /home/cvs/gstreamer/gstreamer/gst/gstelement.h,v retrieving revision 1.161 retrieving revision 1.162 diff -u -d -r1.161 -r1.162 --- gstelement.h 30 Jan 2004 07:58:54 -0000 1.161 +++ gstelement.h 31 Jan 2004 19:09:38 -0000 1.162 @@ -142,7 +142,6 @@ #define GST_ELEMENT_ERROR(el, domain, code, message, debug) G_STMT_START { \ gchar *__msg = _gst_element_error_printf message; \ gchar *__dbg = _gst_element_error_printf debug; \ - GST_ERROR_OBJECT (el, "%s", __dbg); \ gst_element_error_full (GST_ELEMENT(el), \ GST_ ## domain ## _ERROR, GST_ ## domain ## _ERROR_ ## code, \ __msg, __dbg, __FILE__, GST_FUNCTION, __LINE__); \ |