diff --git a/ChangeLog b/ChangeLog index 31e011b57f..febaf38f09 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 cdebf0e057..daf346c454 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 a892bd9c53..7350c1f931 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 e017ba7031..2276aa49fb 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 536c6f4c4b..62396d7cd9 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 67536e2640..74029383b8 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 1be6c26802..326fe96154 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__ */