gst/playback/gstplaybin.c: first try autovideosink, then xvimagesink, then error out
authorThomas Vander Stichele <thomas@apestaart.org>
Fri, 28 Oct 2005 09:56:47 +0000 (09:56 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Fri, 28 Oct 2005 09:56:47 +0000 (09:56 +0000)
Original commit message from CVS:
* gst/playback/gstplaybin.c: (gen_video_element):
first try autovideosink, then xvimagesink, then error out
* po/POTFILES.in:
add translatable file
* po/af.po:
* po/az.po:
* po/cs.po:
* po/en_GB.po:
* po/hu.po:
* po/it.po:
* po/nb.po:
* po/nl.po:
* po/or.po:
* po/sq.po:
* po/sr.po:
* po/sv.po:
* po/uk.po:
* po/vi.po:
update translations

ChangeLog
docs/libs/tmpl/gstcolorbalance.sgml
gst/playback/gstplaybin.c
po/POTFILES.in

index bceee0b..4e45961 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2005-10-28  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * gst/playback/gstplaybin.c: (gen_video_element):
+         first try autovideosink, then xvimagesink, then error out
+       * po/POTFILES.in:
+         add translatable file
+       * po/af.po:
+       * po/az.po:
+       * po/cs.po:
+       * po/en_GB.po:
+       * po/hu.po:
+       * po/it.po:
+       * po/nb.po:
+       * po/nl.po:
+       * po/or.po:
+       * po/sq.po:
+       * po/sr.po:
+       * po/sv.po:
+       * po/uk.po:
+       * po/vi.po:
+         update translations
+
 2005-10-27  Philippe Khalaf <burger at speedy dot org> 
 
        * gst-libs/gst/rtp/gstbasedepayload.c:
index 59fb98a..72db8e8 100644 (file)
@@ -2,18 +2,20 @@
 gstcolorbalance
 
 <!-- ##### SECTION Short_Description ##### -->
-interface for elements that provide color balance operations
+
 
 <!-- ##### SECTION Long_Description ##### -->
 <para>
 
 </para>
 
+
 <!-- ##### SECTION See_Also ##### -->
 <para>
 
 </para>
 
+
 <!-- ##### SECTION Stability_Level ##### -->
 
 
index cfff34d..971fc9b 100644 (file)
@@ -24,6 +24,8 @@
 #include <string.h>
 #include <gst/gst.h>
 
+#include <gst/gst-i18n-plugin.h>
+
 #include "gstplaybasebin.h"
 
 GST_DEBUG_CATEGORY_STATIC (gst_play_bin_debug);
@@ -373,6 +375,8 @@ handoff (GstElement * identity, GstBuffer * frame, gpointer data)
  *  +----------|--------------------------------------------------+
  *           handoff
  */
+/* FIXME: this might return NULL if no videosink was found, handle
+ * this in callers */
 static GstElement *
 gen_video_element (GstPlayBin * play_bin)
 {
@@ -390,23 +394,32 @@ gen_video_element (GstPlayBin * play_bin)
     return element;
   }
 
-  element = gst_bin_new ("vbin");
-  identity = gst_element_factory_make ("identity", "id");
-  g_object_set (identity, "silent", TRUE, NULL);
-  g_signal_connect (identity, "handoff", G_CALLBACK (handoff), play_bin);
-  conv = gst_element_factory_make ("ffmpegcolorspace", "vconv");
-  scale = gst_element_factory_make ("videoscale", "vscale");
   if (play_bin->video_sink) {
     sink = play_bin->video_sink;
   } else {
-    sink = gst_element_factory_make ("xvimagesink", "videosink");
+    sink = gst_element_factory_make ("autovideosink", "videosink");
+    if (sink == NULL) {
+      sink = gst_element_factory_make ("xvimagesink", "videosink");
+    }
+    /* FIXME: this warrants adding a CORE error category for missing
+     * elements/plugins */
     if (sink == NULL) {
-      g_warning ("could not create autovideosink element");
+      GST_ELEMENT_ERROR (play_bin, CORE, FAILED,
+          (_("Both autovideosink and xvimagesink elements are missing.")),
+          (NULL));
+      return NULL;
     }
   }
   gst_object_ref (sink);
   g_hash_table_insert (play_bin->cache, "video_sink", sink);
 
+
+  element = gst_bin_new ("vbin");
+  identity = gst_element_factory_make ("identity", "id");
+  g_object_set (identity, "silent", TRUE, NULL);
+  g_signal_connect (identity, "handoff", G_CALLBACK (handoff), play_bin);
+  conv = gst_element_factory_make ("ffmpegcolorspace", "vconv");
+  scale = gst_element_factory_make ("videoscale", "vscale");
   gst_bin_add (GST_BIN (element), identity);
   gst_bin_add (GST_BIN (element), conv);
   gst_bin_add (GST_BIN (element), scale);
index af5570e..a6f27fb 100644 (file)
@@ -4,3 +4,4 @@ ext/gnomevfs/gstgnomevfssrc.c
 ext/gnomevfs/gstgnomevfssink.c
 ext/ogg/gstoggdemux.c
 gst/playback/gstplaybasebin.c
+gst/playback/gstplaybin.c