gst/playback/gstplaybin.c: first try autovideosink, then xvimagesink, then error out

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
This commit is contained in:
Thomas Vander Stichele 2005-10-28 09:56:47 +00:00
parent f2ce71697b
commit 2d8a59b262
4 changed files with 50 additions and 12 deletions

View file

@ -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:

View 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 ##### -->

View 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;
}
if (play_bin->video_sink) {
sink = play_bin->video_sink;
} else {
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) {
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");
if (play_bin->video_sink) {
sink = play_bin->video_sink;
} else {
sink = gst_element_factory_make ("xvimagesink", "videosink");
if (sink == NULL) {
g_warning ("could not create autovideosink element");
}
}
gst_object_ref (sink);
g_hash_table_insert (play_bin->cache, "video_sink", sink);
gst_bin_add (GST_BIN (element), identity);
gst_bin_add (GST_BIN (element), conv);
gst_bin_add (GST_BIN (element), scale);

View 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