From: Wim Taymans Date: Fri, 25 May 2001 21:39:54 +0000 (+0000) Subject: Some cleanups. X-Git-Tag: BRANCH-GOBJECT1-ROOT~131 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9401162a8a237245116796c190da3d2f0f7cc871;p=platform%2Fupstream%2Fgstreamer.git Some cleanups. Original commit message from CVS: Some cleanups. Removed some bogus code from element and pipeline elements. Fixed a typo. --- diff --git a/gst/gstbuffer.h b/gst/gstbuffer.h index 375c27f..54479e5 100644 --- a/gst/gstbuffer.h +++ b/gst/gstbuffer.h @@ -156,7 +156,7 @@ void gst_buffer_destroy (GstBuffer *buffer); GstBuffer* gst_buffer_copy (GstBuffer *buffer); /* add, retrieve, and remove metadata from the buffer */ -/* DEPRACATED!!! +/* DEPRECATED!!! void gst_buffer_add_meta (GstBuffer *buffer, GstMeta *meta); void gst_buffer_remove_meta (GstBuffer *buffer, GstMeta *meta); GstMeta* gst_buffer_get_first_meta (GstBuffer *buffer); diff --git a/gst/gstelement.c b/gst/gstelement.c index 79750fa..d728d58 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -660,7 +660,6 @@ gst_element_connect (GstElement *src, const gchar *srcpadname, GstElement *dest, const gchar *destpadname) { GstPad *srcpad,*destpad; - GstObject *srcparent,*destparent; g_return_if_fail (src != NULL); g_return_if_fail (GST_IS_ELEMENT(src)); @@ -681,19 +680,6 @@ gst_element_connect (GstElement *src, const gchar *srcpadname, return; } - /* find the parent elements of each element */ - srcparent = gst_object_get_parent (GST_OBJECT (src)); - destparent = gst_object_get_parent (GST_OBJECT (dest)); - - /* have to make sure that they have the same parents... */ - /* - if (srcparent != destparent) { - GST_ERROR_OBJECT(srcparent,destparent,"%s and %s have different parents", - GST_ELEMENT_NAME (src),GST_ELEMENT_NAME (dest)); - return; - } - */ - /* we're satisified they can be connected, let's do it */ gst_pad_connect(srcpad,destpad); } diff --git a/gst/gstpipeline.c b/gst/gstpipeline.c index f967add..17b4959 100644 --- a/gst/gstpipeline.c +++ b/gst/gstpipeline.c @@ -57,9 +57,6 @@ static void gst_pipeline_init (GstPipeline *pipeline); static GstElementStateReturn gst_pipeline_change_state (GstElement *element); -static void gst_pipeline_prepare (GstPipeline *pipeline); - - static GstBinClass *parent_class = NULL; //static guint gst_pipeline_signals[LAST_SIGNAL] = { 0 }; @@ -103,7 +100,6 @@ gst_pipeline_init (GstPipeline *pipeline) GST_ELEMENT_SCHED(pipeline) = gst_schedule_new(GST_ELEMENT(pipeline)); GST_DEBUG(GST_CAT_PIPELINE, "pipeline's scheduler is %p\n",GST_ELEMENT_SCHED(pipeline)); -// gst_element_set_manager(GST_ELEMENT(pipeline),GST_ELEMENT(pipeline)); } @@ -121,46 +117,12 @@ gst_pipeline_new (const guchar *name) return gst_elementfactory_make ("pipeline", name); } -static void -gst_pipeline_prepare (GstPipeline *pipeline) -{ - GST_DEBUG (GST_CAT_PIPELINE,"preparing pipeline \"%s\" for playing (DEPRACATED!!)\n", - GST_ELEMENT_NAME(GST_ELEMENT(pipeline))); -} - static GstElementStateReturn gst_pipeline_change_state (GstElement *element) { - GstPipeline *pipeline; - - g_return_val_if_fail (GST_IS_PIPELINE (element), FALSE); - - pipeline = GST_PIPELINE (element); - - switch (GST_STATE_TRANSITION (pipeline)) { - case GST_STATE_NULL_TO_READY: - // we need to set up internal state - gst_pipeline_prepare (pipeline); - break; - default: - break; - } - if (GST_ELEMENT_CLASS (parent_class)->change_state) return GST_ELEMENT_CLASS (parent_class)->change_state (element); return GST_STATE_SUCCESS; } -/** - * gst_pipeline_iterate: - * @pipeline: #GstPipeline to iterate - * - * Cause the pipeline's contents to be run through one full 'iteration'. - */ -void -gst_pipeline_iterate (GstPipeline *pipeline) -{ - g_return_if_fail (pipeline != NULL); - g_return_if_fail (GST_IS_PIPELINE(pipeline)); -} diff --git a/gst/gstplugin.c b/gst/gstplugin.c index 4b6abaf..d0a2ca0 100644 --- a/gst/gstplugin.c +++ b/gst/gstplugin.c @@ -352,13 +352,15 @@ gst_plugin_load_absolute (const gchar *name) GstPlugin *plugin; struct stat file_status; + GST_INFO (GST_CAT_PLUGIN_LOADING,"plugin \"%s\" loading", name); + if (g_module_supported() == FALSE) { g_warning("gstplugin: wow, you built this on a platform without dynamic loading???\n"); return FALSE; } if (stat(name,&file_status)) { -// g_print("problem opening file %s\n",name); + g_print("problem opening file %s\n",name); return FALSE; } @@ -395,6 +397,9 @@ gst_plugin_load_absolute (const gchar *name) // FIXME this should be some standard gst mechanism!!! g_printerr ("error loading plugin %s, reason: %s\n", name, g_module_error()); } + else { + GST_INFO (GST_CAT_PLUGIN_LOADING, "error loading plugin %s, reason: %s\n", name, g_module_error()); + } return FALSE; }