gst/: Work around missing bits of thread-safety on older GLibs some more to avoid assertions when starting up multipl...

Original commit message from CVS:
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init):
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_class_init):
* gst/playback/gstplayback.c: (plugin_init):
* gst/volume/gstvolume.c: (plugin_init):
Work around missing bits of thread-safety on older GLibs some
more to avoid assertions when starting up multiple playbin
objects concurrently (see #512382).
This commit is contained in:
Tim-Philipp Müller 2008-04-06 20:16:27 +00:00
parent c1a32ecf46
commit 7a29d716bd
5 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,15 @@
2008-04-06 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/audio/gstbaseaudiosink.c:
(gst_base_audio_sink_class_init):
* gst-libs/gst/audio/gstbaseaudiosrc.c:
(gst_base_audio_src_class_init):
* gst/playback/gstplayback.c: (plugin_init):
* gst/volume/gstvolume.c: (plugin_init):
Work around missing bits of thread-safety on older GLibs some
more to avoid assertions when starting up multiple playbin
objects concurrently (see #512382).
2008-04-06 Tim-Philipp Müller <tim at centricular dot net>
* gst-libs/gst/pbutils/missing-plugins.c: (copy_and_clean_caps):

View file

@ -216,6 +216,7 @@ gst_base_audio_sink_class_init (GstBaseAudioSinkClass * klass)
/* ref class from a thread-safe context to work around missing bit of
* thread-safety in GObject */
g_type_class_ref (GST_TYPE_AUDIO_CLOCK);
g_type_class_ref (GST_TYPE_RING_BUFFER);
}
static void

View file

@ -175,6 +175,7 @@ gst_base_audio_src_class_init (GstBaseAudioSrcClass * klass)
/* ref class from a thread-safe context to work around missing bit of
* thread-safety in GObject */
g_type_class_ref (GST_TYPE_AUDIO_CLOCK);
g_type_class_ref (GST_TYPE_RING_BUFFER);
}
static void

View file

@ -27,6 +27,9 @@
#include <gst/gst-i18n-plugin.h>
#include <gst/pbutils/pbutils.h>
#include "gststreamselector.h"
#include "gststreaminfo.h"
gboolean gst_play_bin_plugin_init (GstPlugin * plugin);
gboolean gst_play_bin2_plugin_init (GstPlugin * plugin);
@ -43,6 +46,11 @@ plugin_init (GstPlugin * plugin)
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#endif /* ENABLE_NLS */
/* ref class from a thread-safe context to work around missing bit of
* thread-safety in GObject */
g_type_class_ref (GST_TYPE_STREAM_INFO);
g_type_class_ref (GST_TYPE_STREAM_SELECTOR);
res = gst_play_bin_plugin_init (plugin);
res &= gst_play_bin2_plugin_init (plugin);

View file

@ -801,6 +801,10 @@ plugin_init (GstPlugin * plugin)
GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "volume", 0, "Volume gain");
/* ref class from a thread-safe context to work around missing bit of
* thread-safety in GObject */
g_type_class_ref (GST_TYPE_MIXER_TRACK);
return gst_element_register (plugin, "volume", GST_RANK_NONE,
GST_TYPE_VOLUME);
}