Print out a warning when the colorspace plugin is not found and try to do without it...

Original commit message from CVS:
Print out a warning when the colorspace plugin is not found and try to
do without it...
This commit is contained in:
Wim Taymans 2001-06-01 17:42:15 +00:00
parent 5b97b4f089
commit 5fdff13205

View file

@ -138,14 +138,22 @@ gst_play_init (GstPlay *play)
gtk_signal_connect (GTK_OBJECT (priv->video_show), "have_size", gtk_signal_connect (GTK_OBJECT (priv->video_show), "have_size",
GTK_SIGNAL_FUNC (gst_play_have_size), play); GTK_SIGNAL_FUNC (gst_play_have_size), play);
colorspace = gst_elementfactory_make ("colorspace", "colorspace");
gst_bin_add (GST_BIN (priv->video_element), colorspace);
gst_bin_add (GST_BIN (priv->video_element), priv->video_show); gst_bin_add (GST_BIN (priv->video_element), priv->video_show);
colorspace = gst_elementfactory_make ("colorspace", "colorspace");
if (colorspace == NULL) {
g_warning ("could not create a colorspace element, doing without");
gst_element_add_ghost_pad (priv->video_element,
gst_element_get_pad (priv->video_show, "sink"),
"sink");
}
else {
gst_bin_add (GST_BIN (priv->video_element), colorspace);
gst_element_connect (colorspace, "src", priv->video_show, "sink"); gst_element_connect (colorspace, "src", priv->video_show, "sink");
gst_element_add_ghost_pad (priv->video_element, gst_element_add_ghost_pad (priv->video_element,
gst_element_get_pad (colorspace, "sink"), gst_element_get_pad (colorspace, "sink"),
"sink"); "sink");
}
play->state = GST_PLAY_STOPPED; play->state = GST_PLAY_STOPPED;
play->flags = 0; play->flags = 0;