From: Tim-Philipp Müller Date: Thu, 11 Jan 2007 13:12:17 +0000 (+0000) Subject: gst/playback/gstplaybin.c: Post missing-plugin messages also when we error out becaus... X-Git-Tag: 1.19.3~511^2~11416 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9de43e8bc57b598abad99437fda9d715d73f9939;p=platform%2Fupstream%2Fgstreamer.git gst/playback/gstplaybin.c: Post missing-plugin messages also when we error out because converters, textoverlay or aut... Original commit message from CVS: * gst/playback/gstplaybin.c: (post_missing_element_message), (gen_video_element), (gen_text_element), (gen_audio_element), (gen_vis_element): Post missing-plugin messages also when we error out because converters, textoverlay or auto*sinks are missing (#161922). --- diff --git a/ChangeLog b/ChangeLog index 8768e4c..76355e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-01-11 Tim-Philipp Müller + + * gst/playback/gstplaybin.c: (post_missing_element_message), + (gen_video_element), (gen_text_element), (gen_audio_element), + (gen_vis_element): + Post missing-plugin messages also when we error out because + converters, textoverlay or auto*sinks are missing (#161922). + 2007-01-10 Wim Taymans * gst/playback/gstdecodebin.c: (dynamic_add), (close_pad_link), diff --git a/gst/playback/gstplaybin.c b/gst/playback/gstplaybin.c index 5f8edaa..815afe4 100644 --- a/gst/playback/gstplaybin.c +++ b/gst/playback/gstplaybin.c @@ -795,6 +795,15 @@ handoff (GstElement * identity, GstBuffer * frame, gpointer data) } } +static void +post_missing_element_message (GstPlayBin * playbin, const gchar * name) +{ + GstMessage *msg; + + msg = gst_missing_element_message_new (GST_ELEMENT_CAST (playbin), name); + gst_element_post_message (GST_ELEMENT_CAST (playbin), msg); +} + /* make the element (bin) that contains the elements needed to perform * video display. We connect a handoff signal to identity so that we * can grab snapshots. Identity's sinkpad is ghosted to vbin. @@ -882,8 +891,7 @@ gen_video_element (GstPlayBin * play_bin) /* ERRORS */ no_sinks: { - /* FIXME: this warrants adding a CORE error category for missing - * elements/plugins */ + post_missing_element_message (play_bin, "autovideosink"); GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Both autovideosink and xvimagesink elements are missing.")), (NULL)); @@ -891,6 +899,7 @@ no_sinks: } no_colorspace: { + post_missing_element_message (play_bin, "ffmpegcolorspace"); GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Missing element '%s' - check your GStreamer installation."), "ffmpegcolorspace"), (NULL)); @@ -900,6 +909,7 @@ no_colorspace: no_videoscale: { + post_missing_element_message (play_bin, "videoscale"); GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Missing element '%s' - check your GStreamer installation."), "videoscale"), ("possibly a liboil version mismatch?")); @@ -987,6 +997,7 @@ gen_text_element (GstPlayBin * play_bin) /* ERRORS */ no_overlay: { + post_missing_element_message (play_bin, "textoverlay"); GST_WARNING_OBJECT (play_bin, "No overlay (pango) element, subtitles disabled"); return vbin; @@ -1076,12 +1087,14 @@ gen_audio_element (GstPlayBin * play_bin) /* ERRORS */ no_sinks: { + post_missing_element_message (play_bin, "autoaudiosink"); GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Both autoaudiosink and alsasink elements are missing.")), (NULL)); return NULL; } no_audioconvert: { + post_missing_element_message (play_bin, "audioconvert"); GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Missing element '%s' - check your GStreamer installation."), "audioconvert"), ("possibly a liboil version mismatch?")); @@ -1091,6 +1104,7 @@ no_audioconvert: no_audioresample: { + post_missing_element_message (play_bin, "audioresample"); GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Missing element '%s' - check your GStreamer installation."), "audioresample"), ("possibly a liboil version mismatch?")); @@ -1207,6 +1221,7 @@ gen_vis_element (GstPlayBin * play_bin) /* ERRORS */ no_audioconvert: { + post_missing_element_message (play_bin, "audioconvert"); GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Missing element '%s' - check your GStreamer installation."), "audioconvert"), ("possibly a liboil version mismatch?")); @@ -1215,6 +1230,7 @@ no_audioconvert: } no_goom: { + post_missing_element_message (play_bin, "goom"); GST_ELEMENT_ERROR (play_bin, CORE, MISSING_PLUGIN, (_("Missing element '%s' - check your GStreamer installation."), "goom"), (NULL));