mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 23:36:38 +00:00
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:
parent
5b97b4f089
commit
5fdff13205
1 changed files with 12 additions and 4 deletions
|
@ -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);
|
||||||
|
|
||||||
gst_element_connect (colorspace, "src", priv->video_show, "sink");
|
colorspace = gst_elementfactory_make ("colorspace", "colorspace");
|
||||||
gst_element_add_ghost_pad (priv->video_element,
|
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_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;
|
||||||
|
|
Loading…
Reference in a new issue