mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
Some cleanups.
Original commit message from CVS: Some cleanups. Removed some bogus code from element and pipeline elements. Fixed a typo.
This commit is contained in:
parent
dfc62bcbce
commit
9401162a8a
4 changed files with 7 additions and 54 deletions
|
@ -156,7 +156,7 @@ void gst_buffer_destroy (GstBuffer *buffer);
|
||||||
GstBuffer* gst_buffer_copy (GstBuffer *buffer);
|
GstBuffer* gst_buffer_copy (GstBuffer *buffer);
|
||||||
|
|
||||||
/* add, retrieve, and remove metadata from the buffer */
|
/* add, retrieve, and remove metadata from the buffer */
|
||||||
/* DEPRACATED!!!
|
/* DEPRECATED!!!
|
||||||
void gst_buffer_add_meta (GstBuffer *buffer, GstMeta *meta);
|
void gst_buffer_add_meta (GstBuffer *buffer, GstMeta *meta);
|
||||||
void gst_buffer_remove_meta (GstBuffer *buffer, GstMeta *meta);
|
void gst_buffer_remove_meta (GstBuffer *buffer, GstMeta *meta);
|
||||||
GstMeta* gst_buffer_get_first_meta (GstBuffer *buffer);
|
GstMeta* gst_buffer_get_first_meta (GstBuffer *buffer);
|
||||||
|
|
|
@ -660,7 +660,6 @@ gst_element_connect (GstElement *src, const gchar *srcpadname,
|
||||||
GstElement *dest, const gchar *destpadname)
|
GstElement *dest, const gchar *destpadname)
|
||||||
{
|
{
|
||||||
GstPad *srcpad,*destpad;
|
GstPad *srcpad,*destpad;
|
||||||
GstObject *srcparent,*destparent;
|
|
||||||
|
|
||||||
g_return_if_fail (src != NULL);
|
g_return_if_fail (src != NULL);
|
||||||
g_return_if_fail (GST_IS_ELEMENT(src));
|
g_return_if_fail (GST_IS_ELEMENT(src));
|
||||||
|
@ -681,19 +680,6 @@ gst_element_connect (GstElement *src, const gchar *srcpadname,
|
||||||
return;
|
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 */
|
/* we're satisified they can be connected, let's do it */
|
||||||
gst_pad_connect(srcpad,destpad);
|
gst_pad_connect(srcpad,destpad);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,9 +57,6 @@ static void gst_pipeline_init (GstPipeline *pipeline);
|
||||||
|
|
||||||
static GstElementStateReturn gst_pipeline_change_state (GstElement *element);
|
static GstElementStateReturn gst_pipeline_change_state (GstElement *element);
|
||||||
|
|
||||||
static void gst_pipeline_prepare (GstPipeline *pipeline);
|
|
||||||
|
|
||||||
|
|
||||||
static GstBinClass *parent_class = NULL;
|
static GstBinClass *parent_class = NULL;
|
||||||
//static guint gst_pipeline_signals[LAST_SIGNAL] = { 0 };
|
//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_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_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);
|
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
|
static GstElementStateReturn
|
||||||
gst_pipeline_change_state (GstElement *element)
|
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)
|
if (GST_ELEMENT_CLASS (parent_class)->change_state)
|
||||||
return GST_ELEMENT_CLASS (parent_class)->change_state (element);
|
return GST_ELEMENT_CLASS (parent_class)->change_state (element);
|
||||||
|
|
||||||
return GST_STATE_SUCCESS;
|
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));
|
|
||||||
}
|
|
||||||
|
|
|
@ -352,13 +352,15 @@ gst_plugin_load_absolute (const gchar *name)
|
||||||
GstPlugin *plugin;
|
GstPlugin *plugin;
|
||||||
struct stat file_status;
|
struct stat file_status;
|
||||||
|
|
||||||
|
GST_INFO (GST_CAT_PLUGIN_LOADING,"plugin \"%s\" loading", name);
|
||||||
|
|
||||||
if (g_module_supported() == FALSE) {
|
if (g_module_supported() == FALSE) {
|
||||||
g_warning("gstplugin: wow, you built this on a platform without dynamic loading???\n");
|
g_warning("gstplugin: wow, you built this on a platform without dynamic loading???\n");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stat(name,&file_status)) {
|
if (stat(name,&file_status)) {
|
||||||
// g_print("problem opening file %s\n",name);
|
g_print("problem opening file %s\n",name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -395,6 +397,9 @@ gst_plugin_load_absolute (const gchar *name)
|
||||||
// FIXME this should be some standard gst mechanism!!!
|
// FIXME this should be some standard gst mechanism!!!
|
||||||
g_printerr ("error loading plugin %s, reason: %s\n", name, g_module_error());
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue