From b848c8be0a508825ca9382338596fef672771764 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Mon, 10 Jan 2005 17:23:42 +0000 Subject: [PATCH] docs/random/release: updates Original commit message from CVS: * docs/random/release: updates * gst/gst_private.h: * gst/gstinfo.c: * gst/gstobject.c: move deep_notify logging to a new category * gst/gstprobe.c: * gst/gstprobe.h: add stuff so bindings can wrap probes --- ChangeLog | 12 ++++++++++++ docs/random/release | 1 + gst/gst_private.h | 2 ++ gst/gstinfo.c | 8 ++++++-- gst/gstobject.c | 2 +- gst/gstprobe.c | 22 ++++++++++++++++++++-- gst/gstprobe.h | 34 +++++++++++++++++++--------------- 7 files changed, 61 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index 31e011b..febaf38 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2005-01-10 Thomas Vander Stichele + + * docs/random/release: + updates + * gst/gst_private.h: + * gst/gstinfo.c: + * gst/gstobject.c: + move deep_notify logging to a new category + * gst/gstprobe.c: + * gst/gstprobe.h: + add stuff so bindings can wrap probes + 2005-01-09 Stephane LOEUILLET * gst/gstplugin.c: (gst_plugin_load): diff --git a/docs/random/release b/docs/random/release index cdebf0e..daf346c 100644 --- a/docs/random/release +++ b/docs/random/release @@ -79,6 +79,7 @@ TODO : - media tests should be done - source tarball should be installed and tested - rpms should be installed and tested + - .2 tarball should be submitted to translation project - put up tarball for a day } diff --git a/gst/gst_private.h b/gst/gst_private.h index a892bd9..7350c1f 100644 --- a/gst/gst_private.h +++ b/gst/gst_private.h @@ -71,6 +71,7 @@ extern GstDebugCategory *GST_CAT_ERROR_SYSTEM; extern GstDebugCategory *GST_CAT_EVENT; extern GstDebugCategory *GST_CAT_PARAMS; extern GstDebugCategory *GST_CAT_CALL_TRACE; +extern GstDebugCategory *GST_CAT_SIGNAL; #else @@ -101,6 +102,7 @@ extern GstDebugCategory *GST_CAT_CALL_TRACE; #define GST_CAT_EVENT NULL #define GST_CAT_PARAMS NULL #define GST_CAT_CALL_TRACE NULL +#define GST_CAT_SIGNAL NULL #endif diff --git a/gst/gstinfo.c b/gst/gstinfo.c index e017ba7..2276aa4 100644 --- a/gst/gstinfo.c +++ b/gst/gstinfo.c @@ -156,6 +156,7 @@ GstDebugCategory *GST_CAT_EVENT = NULL; GstDebugCategory *GST_CAT_PARAMS = NULL; GstDebugCategory *GST_CAT_CALL_TRACE = NULL; GstDebugCategory *GST_CAT_SEEK = NULL; +GstDebugCategory *GST_CAT_SIGNAL = NULL; /* FIXME: export this? */ gboolean @@ -238,7 +239,7 @@ _gst_debug_init (void) GST_DEBUG_BOLD | GST_DEBUG_FG_MAGENTA, NULL); /* FIXME: remove GST_CAT_DATAFLOW in 0.9 */ GST_CAT_DATAFLOW = _gst_debug_category_new ("GST_DATAFLOW", - GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, NULL); + GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, "dataflow inside pads"); GST_CAT_BUFFER = _gst_debug_category_new ("GST_BUFFER", GST_DEBUG_BOLD | GST_DEBUG_FG_GREEN, NULL); GST_CAT_CAPS = _gst_debug_category_new ("GST_CAPS", @@ -271,13 +272,16 @@ _gst_debug_init (void) GST_DEBUG_BOLD | GST_DEBUG_FG_RED | GST_DEBUG_BG_WHITE, NULL); GST_CAT_EVENT = _gst_debug_category_new ("GST_EVENT", + GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, NULL); + GST_CAT_SIGNAL = _gst_debug_category_new ("GST_SIGNAL", GST_DEBUG_BOLD | GST_DEBUG_FG_WHITE | GST_DEBUG_BG_RED, NULL); GST_CAT_PARAMS = _gst_debug_category_new ("GST_PARAMS", GST_DEBUG_BOLD | GST_DEBUG_FG_BLACK | GST_DEBUG_BG_YELLOW, NULL); GST_CAT_CALL_TRACE = _gst_debug_category_new ("GST_CALL_TRACE", GST_DEBUG_BOLD, NULL); + /* FIXME: fold back to GST_CAT_EVENT in 0.9 */ GST_CAT_SEEK = _gst_debug_category_new ("GST_SEEK", - 0, "plugins reacting to seek events"); + GST_DEBUG_BOLD | GST_DEBUG_FG_BLUE, "plugins reacting to seek events"); /* print out the valgrind message if we're in valgrind */ __gst_in_valgrind (); diff --git a/gst/gstobject.c b/gst/gstobject.c index 536c6f4..62396d7 100644 --- a/gst/gstobject.c +++ b/gst/gstobject.c @@ -363,7 +363,7 @@ gst_object_dispatch_properties_changed (GObject * object, while (gst_object) { /* need own category? */ for (i = 0; i < n_pspecs; i++) { - GST_CAT_LOG (GST_CAT_EVENT, "deep notification from %s to %s (%s)", + GST_CAT_LOG (GST_CAT_SIGNAL, "deep notification from %s to %s (%s)", GST_OBJECT_NAME (object) ? GST_OBJECT_NAME (object) : "(null)", GST_OBJECT_NAME (gst_object) ? GST_OBJECT_NAME (gst_object) : "(null)", pspecs[i]->name); diff --git a/gst/gstprobe.c b/gst/gstprobe.c index 67536e2..7402938 100644 --- a/gst/gstprobe.c +++ b/gst/gstprobe.c @@ -20,10 +20,28 @@ * Boston, MA 02111-1307, USA. */ - #include "gst_private.h" #include "gstprobe.h" +static GstProbe * +_gst_probe_copy (const GstProbe * src) +{ + return gst_probe_new (src->single_shot, src->callback, src->user_data); +} + +GType +gst_probe_get_type (void) +{ + static GType gst_probe_type = 0; + + if (!gst_probe_type) { + gst_probe_type = g_boxed_type_register_static ("GstProbe", + (GBoxedCopyFunc) _gst_probe_copy, (GBoxedFreeFunc) gst_probe_destroy); + } + + return gst_probe_type; +} + /** * gst_probe_new: * @single_shot: TRUE if a single shot probe is required @@ -55,7 +73,7 @@ gst_probe_new (gboolean single_shot, * gst_probe_destroy: * @probe: The probe to destroy * - * Free the memeory associated with the probe. + * Free the memory associated with the probe. */ void gst_probe_destroy (GstProbe * probe) diff --git a/gst/gstprobe.h b/gst/gstprobe.h index 1be6c26..326fe96 100644 --- a/gst/gstprobe.h +++ b/gst/gstprobe.h @@ -29,39 +29,44 @@ G_BEGIN_DECLS +#define GST_TYPE_PROBE (gst_probe_get_type()) +#define GST_PROBE(object) ((GstProbe *) object) + typedef struct _GstProbe GstProbe; +GType gst_probe_get_type (void) G_GNUC_CONST; + /* the callback should return FALSE if the data should be discarded */ -typedef gboolean (*GstProbeCallback) (GstProbe *probe, - GstData **data, - gpointer user_data); +typedef gboolean (*GstProbeCallback) (GstProbe *probe, + GstData **data, + gpointer user_data); struct _GstProbe { gboolean single_shot; - - GstProbeCallback callback; - gpointer user_data; + + GstProbeCallback callback; + gpointer user_data; }; -GstProbe* gst_probe_new (gboolean single_shot, - GstProbeCallback callback, +GstProbe* gst_probe_new (gboolean single_shot, + GstProbeCallback callback, gpointer user_data); void gst_probe_destroy (GstProbe *probe); -gboolean gst_probe_perform (GstProbe *probe, GstData **data); +gboolean gst_probe_perform (GstProbe *probe, GstData **data); typedef struct _GstProbeDispatcher GstProbeDispatcher; struct _GstProbeDispatcher { gboolean active; - + GSList *probes; }; -GstProbeDispatcher* gst_probe_dispatcher_new (void); -void gst_probe_dispatcher_destroy (GstProbeDispatcher *disp); -void gst_probe_dispatcher_init (GstProbeDispatcher *disp); +GstProbeDispatcher* gst_probe_dispatcher_new (void); +void gst_probe_dispatcher_destroy (GstProbeDispatcher *disp); +void gst_probe_dispatcher_init (GstProbeDispatcher *disp); void gst_probe_dispatcher_set_active (GstProbeDispatcher *disp, gboolean active); void gst_probe_dispatcher_add_probe (GstProbeDispatcher *disp, GstProbe *probe); @@ -71,6 +76,5 @@ gboolean gst_probe_dispatcher_dispatch (GstProbeDispatcher *disp, GstData **da G_END_DECLS - -#endif /* __GST_PAD_H__ */ +#endif /* __GST_PROBE_H__ */ -- 2.7.4