+2006-01-27 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * ext/alsa/gstalsaplugin.c: (plugin_init):
+ * ext/cdparanoia/gstcdparanoiasrc.c:
+ (gst_cd_paranoia_src_base_init), (plugin_init):
+ * ext/gnomevfs/gstgnomevfs.c: (plugin_init):
+ * ext/ogg/gstoggdemux.c: (gst_ogg_demux_plugin_init):
+ - a library should not call setlocale. see "Libraries" node in
+ gettext manual
+ - make sure all plugins that use translation do bindtextdomain
+ to point to the localedir
+ * gst/playback/gstplaybin.c: (gen_vis_element), (add_sink),
+ (setup_sinks), (plugin_init):
+ all this, and check for NULL when creating sinks
+
2006-01-27 Julien MOUTTE <julien@moutte.net>
* gst/subparse/gstsubparse.c: (gst_subparse_type_find),
#include "gstalsasrc.h"
#include "gstalsamixerelement.h"
+#include <gst/gst-i18n-plugin.h>
+
GST_DEBUG_CATEGORY (alsa_debug);
/* ALSA debugging wrapper */
return FALSE;
GST_DEBUG_CATEGORY_INIT (alsa_debug, "alsa", 0, "alsa plugins");
+
+#if ENABLE_NLS
+ GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
+ LOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
+
err = snd_lib_error_set_handler (gst_alsa_error_wrapper);
if (err != 0)
GST_WARNING ("failed to set alsa error handler");
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
gst_element_class_set_details (element_class, &cdparanoia_details);
-
- GST_DEBUG_CATEGORY_INIT (gst_cd_paranoia_src_debug, "cdparanoiasrc", 0,
- "CD Paranoia Source");
}
static void
static gboolean
plugin_init (GstPlugin * plugin)
{
+ GST_DEBUG_CATEGORY_INIT (gst_cd_paranoia_src_debug, "cdparanoiasrc", 0,
+ "CD Paranoia Source");
+
if (!gst_element_register (plugin, "cdparanoiasrc", GST_RANK_SECONDARY,
GST_TYPE_CD_PARANOIA_SRC))
return FALSE;
+#ifdef ENABLE_NLS
+ GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
+ LOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
+
+
return TRUE;
}
return FALSE;
#ifdef ENABLE_NLS
- setlocale (LC_ALL, "");
+/* FIXME: add category
+ GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, LOCALEDIR);
+ */
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#endif /* ENABLE_NLS */
GST_DEBUG_CATEGORY_INIT (gst_ogg_demux_setup_debug, "oggdemux_setup", 0,
"ogg demuxer setup stage when parsing pipeline");
+#if ENABLE_NLS
+ GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
+ LOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif
+
return gst_element_register (plugin, "oggdemux", GST_RANK_PRIMARY,
GST_TYPE_OGG_DEMUX);
}
}
/* make the element (bin) that contains the elements needed to perform
- * audio playback.
+ * audio playback.
*
* +-------------------------------------------------------------+
* | abin |
* | | +---------+ +----------+ +---------+ +---------+ |
* sink-+ |
* +-------------------------------------------------------------+
- *
+ *
*/
static GstElement *
gen_audio_element (GstPlayBin * play_bin)
GstElement *vqueue, *aqueue;
GstPad *pad, *rpad;
+ asink = gen_audio_element (play_bin);
+ if (!asink)
+ return NULL;
+ vsink = gen_video_element (play_bin);
+ if (!vsink) {
+ gst_object_unref (asink);
+ return NULL;
+ }
+
element = gst_bin_new ("visbin");
tee = gst_element_factory_make ("tee", "tee");
vqueue = gst_element_factory_make ("queue", "vqueue");
aqueue = gst_element_factory_make ("queue", "aqueue");
- asink = gen_audio_element (play_bin);
- vsink = gen_video_element (play_bin);
-
gst_bin_add (GST_BIN (element), asink);
gst_bin_add (GST_BIN (element), vqueue);
gst_bin_add (GST_BIN (element), aqueue);
GstElement *parent;
GstStateChangeReturn stateret;
+ g_return_val_if_fail (sink != NULL, FALSE);
/* this is only for debugging */
parent = gst_pad_get_parent_element (srcpad);
if (parent) {
if (play_bin->sinks) {
remove_sinks (play_bin);
}
- GST_DEBUG ("setupsinks");
+ GST_DEBUG_OBJECT (play_base_bin, "setupsinks");
/* find out what to do */
if (group->type[GST_STREAM_TYPE_VIDEO - 1].npads > 0 &&
} else {
sink = gen_audio_element (play_bin);
}
+ if (!sink)
+ return FALSE;
pad = gst_element_get_pad (group->type[GST_STREAM_TYPE_AUDIO - 1].preroll,
"src");
res = add_sink (play_bin, sink, pad);
} else {
sink = gen_video_element (play_bin);
}
+ if (!sink)
+ return FALSE;
pad = gst_element_get_pad (group->type[GST_STREAM_TYPE_VIDEO - 1].preroll,
"src");
res = add_sink (play_bin, sink, pad);
{
GST_DEBUG_CATEGORY_INIT (gst_play_bin_debug, "playbin", 0, "play bin");
+#ifdef ENABLE_NLS
+ GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
+ LOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
+#endif /* ENABLE_NLS */
+
return gst_element_register (plugin, "playbin", GST_RANK_NONE,
GST_TYPE_PLAY_BIN);
}