From 860ada25b1df103574a72666dd2857f427ae11f2 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 30 Dec 2000 17:42:15 +0000 Subject: [PATCH] Fixed MPEG2 autoplugging Original commit message from CVS: Fixed MPEG2 autoplugging Added some more INFO to gstthread --- gst/gst.c | 2 +- gst/gstautoplug.c | 4 ++-- gst/gstcaps.c | 2 +- gst/gstplugin.c | 2 +- gst/gstprops.c | 2 +- gst/gstthread.c | 34 +++++++++++++++++----------------- 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/gst/gst.c b/gst/gst.c index 450c6e9d9d..0399f33e7b 100644 --- a/gst/gst.c +++ b/gst/gst.c @@ -52,7 +52,7 @@ gst_init (int *argc, char **argv[]) { GstTrace *gst_trace; - INFO (GST_INFO_GST_INIT, "Initializing GStreamer Core Library\n"); + INFO (GST_INFO_GST_INIT, "Initializing GStreamer Core Library"); if (!g_thread_supported ()) g_thread_init (NULL); diff --git a/gst/gstautoplug.c b/gst/gstautoplug.c index 618b93f82f..505c13f83b 100644 --- a/gst/gstautoplug.c +++ b/gst/gstautoplug.c @@ -127,11 +127,11 @@ gst_autoplug_caps_find_cost (gpointer src, gpointer dest, gpointer data) } else if (IS_CAPS (src)) { res = gst_elementfactory_can_sink_caps ((GstElementFactory *)dest, src); - INFO (0,"factory %s to sink caps %d %d", ((GstElementFactory *)dest)->name, ((GstCaps *)src)->id, res); + INFO (0,"factory %s to src caps %d %d", ((GstElementFactory *)dest)->name, ((GstCaps *)src)->id, res); } else if (IS_CAPS (dest)) { res = gst_elementfactory_can_src_caps ((GstElementFactory *)src, dest); - INFO (0,"factory %s to src caps %d %d", ((GstElementFactory *)src)->name, ((GstCaps *)dest)->id, res); + INFO (0,"factory %s to sink caps %d %d", ((GstElementFactory *)src)->name, ((GstCaps *)dest)->id, res); } else { res = gst_autoplug_can_match ((GstElementFactory *)src, (GstElementFactory *)dest); diff --git a/gst/gstcaps.c b/gst/gstcaps.c index 811e610e31..319a1f462d 100644 --- a/gst/gstcaps.c +++ b/gst/gstcaps.c @@ -20,7 +20,7 @@ * Boston, MA 02111-1307, USA. */ -//#define GST_DEBUG_ENABLED +#define GST_DEBUG_ENABLED #include "gst_private.h" #include "gstcaps.h" diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 3f29ca789c..7e0d8bb700 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -465,7 +465,7 @@ gst_plugin_load_typefactory (gchar *mime) g_free (filename); g_free (pluginname); } - return; + //return; } factories = g_list_next(factories); } diff --git a/gst/gstprops.c b/gst/gstprops.c index eaaf50fa13..766b0e4315 100644 --- a/gst/gstprops.c +++ b/gst/gstprops.c @@ -20,7 +20,7 @@ * Boston, MA 02111-1307, USA. */ -//#define GST_DEBUG_ENABLED +#define GST_DEBUG_ENABLED #include "gst_private.h" #include "gstprops.h" diff --git a/gst/gstthread.c b/gst/gstthread.c index be867edcb8..2625709999 100644 --- a/gst/gstthread.c +++ b/gst/gstthread.c @@ -142,7 +142,7 @@ gst_thread_create_plan_dummy (GstBin *bin) g_return_if_fail (GST_IS_THREAD (bin)); if (!GST_FLAG_IS_SET (GST_THREAD (bin), GST_THREAD_STATE_SPINNING)) - gst_info("gstthread: create plan delayed until thread starts\n"); + INFO(GST_INFO_THREAD,"gstthread: create plan delayed until thread starts"); } static void @@ -156,13 +156,13 @@ gst_thread_set_arg (GtkObject *object, switch(id) { case ARG_CREATE_THREAD: if (GTK_VALUE_BOOL (*arg)) { - gst_info("gstthread: turning ON the creation of the thread\n"); + INFO(GST_INFO_THREAD,"gstthread: turning ON the creation of the thread"); GST_FLAG_SET (object, GST_THREAD_CREATE); - gst_info("gstthread: flags are 0x%08x\n", GST_FLAGS (object)); + DEBUG("gstthread: flags are 0x%08x\n", GST_FLAGS (object)); } else { - gst_info("gstthread: turning OFF the creation of the thread\n"); + INFO(GST_INFO_THREAD,"gstthread: turning OFF the creation of the thread"); GST_FLAG_UNSET (object, GST_THREAD_CREATE); - gst_info("gstthread: flags are 0x%08x\n", GST_FLAGS (object)); + DEBUG("gstthread: flags are 0x%08x\n", GST_FLAGS (object)); } break; default: @@ -216,7 +216,7 @@ gst_thread_change_state (GstElement *element) thread = GST_THREAD (element); - gst_info("gstthread: thread \"%s\" change state %d\n", + INFO (GST_INFO_THREAD,"gstthread: thread \"%s\" change state %d", gst_element_get_name (GST_ELEMENT (element)), GST_STATE_PENDING (element)); @@ -230,23 +230,23 @@ gst_thread_change_state (GstElement *element) if (GST_ELEMENT_CLASS (parent_class)->change_state) stateset = GST_ELEMENT_CLASS (parent_class)->change_state (element); - gst_info("gstthread: stateset %d %d %d %02x\n", GST_STATE (element), stateset, + INFO (GST_INFO_THREAD, "gstthread: stateset %d %d %d %02x", GST_STATE (element), stateset, GST_STATE_PENDING (element), GST_STATE_TRANSITION (element)); switch (transition) { case GST_STATE_NULL_TO_READY: // if (!stateset) return FALSE; // we want to prepare our internal state for doing the iterations - gst_info("gstthread: preparing thread \"%s\" for iterations:\n", + INFO(GST_INFO_THREAD, "gstthread: preparing thread \"%s\" for iterations:", gst_element_get_name (GST_ELEMENT (element))); // set the state to idle GST_FLAG_UNSET (thread, GST_THREAD_STATE_SPINNING); // create the thread if that's what we're supposed to do - gst_info("gstthread: flags are 0x%08x\n", GST_FLAGS (thread)); + INFO(GST_INFO_THREAD, "gstthread: flags are 0x%08x", GST_FLAGS (thread)); if (GST_FLAG_IS_SET (thread, GST_THREAD_CREATE)) { - gst_info("gstthread: starting thread \"%s\"\n", + INFO(GST_INFO_THREAD, "gstthread: starting thread \"%s\"", gst_element_get_name (GST_ELEMENT (element))); // create the thread @@ -256,28 +256,28 @@ gst_thread_change_state (GstElement *element) // wait for it to 'spin up' // gst_thread_wait_thread (thread); } else { - gst_info("gstthread: NOT starting thread \"%s\"\n", + INFO(GST_INFO_THREAD, "gstthread: NOT starting thread \"%s\"", gst_element_get_name (GST_ELEMENT (element))); } break; case GST_STATE_PAUSED_TO_PLAYING: case GST_STATE_READY_TO_PLAYING: if (!stateset) return FALSE; - gst_info("gstthread: starting thread \"%s\"\n", + INFO(GST_INFO_THREAD, "gstthread: starting thread \"%s\"", gst_element_get_name (GST_ELEMENT (element))); GST_FLAG_SET (thread, GST_THREAD_STATE_SPINNING); gst_thread_signal_thread (thread); break; case GST_STATE_PLAYING_TO_PAUSED: - gst_info("gstthread: pausing thread \"%s\"\n", + INFO(GST_INFO_THREAD,"gstthread: pausing thread \"%s\"", gst_element_get_name (GST_ELEMENT (element))); //GST_FLAG_UNSET(thread,GST_THREAD_STATE_SPINNING); gst_thread_signal_thread (thread); break; case GST_STATE_READY_TO_NULL: - gst_info("gstthread: stopping thread \"%s\"\n", + INFO(GST_INFO_THREAD,"gstthread: stopping thread \"%s\"", gst_element_get_name (GST_ELEMENT (element))); GST_FLAG_SET (thread, GST_THREAD_STATE_REAPING); @@ -302,7 +302,7 @@ gst_thread_main_loop (void *arg) { GstThread *thread = GST_THREAD (arg); - gst_info("gstthread: thread \"%s\" is running with PID %d\n", + INFO(GST_INFO_THREAD,"gstthread: thread \"%s\" is running with PID %d", gst_element_get_name (GST_ELEMENT (thread)), getpid ()); // construct the plan and signal back @@ -321,7 +321,7 @@ gst_thread_main_loop (void *arg) GST_FLAG_UNSET (thread, GST_THREAD_STATE_REAPING); // pthread_join (thread->thread_id, 0); - gst_info("gstthread: thread \"%s\" is stopped\n", + INFO(GST_INFO_THREAD, "gstthread: thread \"%s\" is stopped", gst_element_get_name (GST_ELEMENT (thread))); return NULL; } @@ -350,7 +350,7 @@ gst_thread_restore_thyself (GstElement *element, xmlNodePtr parent, GHashTable *elements) { - g_print("gstthread: restore\n"); + DEBUG("gstthread: restore\n"); if (GST_ELEMENT_CLASS (parent_class)->restore_thyself) GST_ELEMENT_CLASS (parent_class)->restore_thyself (element,parent, elements);