Add the pipeline to the thread after autoplugging.

Original commit message from CVS:
Add the pipeline to the thread after autoplugging.
This commit is contained in:
Wim Taymans 2000-12-29 04:36:54 +00:00
parent 57a6bb78fa
commit 635b44d929

View file

@ -142,7 +142,7 @@ gst_play_init (GstPlay *play)
gst_pipeline_add_sink (GST_PIPELINE (priv->pipeline), priv->audio_play); gst_pipeline_add_sink (GST_PIPELINE (priv->pipeline), priv->audio_play);
gst_pipeline_add_sink (GST_PIPELINE (priv->pipeline), priv->video_show); gst_pipeline_add_sink (GST_PIPELINE (priv->pipeline), priv->video_show);
gst_bin_add (GST_BIN (priv->thread), priv->pipeline); //gst_bin_add (GST_BIN (priv->thread), priv->pipeline);
play->state = GST_PLAY_STOPPED; play->state = GST_PLAY_STOPPED;
play->flags = 0; play->flags = 0;
@ -259,7 +259,8 @@ gst_play_set_uri (GstPlay *play,
priv->uri = g_strdup (uri); priv->uri = g_strdup (uri);
priv->src = gst_elementfactory_make ("asyncdisksrc", "disk_src"); priv->src = gst_elementfactory_make ("disksrc", "disk_src");
//priv->src = gst_elementfactory_make ("asyncdisksrc", "disk_src");
//priv->src = gst_elementfactory_make ("dvdsrc", "disk_src"); //priv->src = gst_elementfactory_make ("dvdsrc", "disk_src");
g_return_val_if_fail (priv->src != NULL, -1); g_return_val_if_fail (priv->src != NULL, -1);
gtk_object_set (GTK_OBJECT (priv->src),"location",uri,NULL); gtk_object_set (GTK_OBJECT (priv->src),"location",uri,NULL);
@ -280,6 +281,10 @@ gst_play_set_uri (GstPlay *play,
play->flags |= GST_PLAY_TYPE_AUDIO; play->flags |= GST_PLAY_TYPE_AUDIO;
} }
GST_FLAG_UNSET (priv->pipeline, GST_BIN_FLAG_MANAGER);
gst_bin_add (GST_BIN (priv->thread), priv->pipeline);
return GST_PLAY_OK; return GST_PLAY_OK;
} }