diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-08-01 08:10:09 +0800 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2009-08-07 01:24:40 +0800 |
commit | b1508d71bf814939e9b9818377b4fef95c6470b2 (patch) | |
tree | 1bd6b4906f7d040076a21fb1db7939d8a9dde395 /libempathy-gtk/empathy-audio-sink.c | |
parent | a885bc90fd4c27676090a59bb615b14258ff8579 (diff) | |
download | gsoc2013-empathy-b1508d71bf814939e9b9818377b4fef95c6470b2.tar gsoc2013-empathy-b1508d71bf814939e9b9818377b4fef95c6470b2.tar.gz gsoc2013-empathy-b1508d71bf814939e9b9818377b4fef95c6470b2.tar.bz2 gsoc2013-empathy-b1508d71bf814939e9b9818377b4fef95c6470b2.tar.lz gsoc2013-empathy-b1508d71bf814939e9b9818377b4fef95c6470b2.tar.xz gsoc2013-empathy-b1508d71bf814939e9b9818377b4fef95c6470b2.tar.zst gsoc2013-empathy-b1508d71bf814939e9b9818377b4fef95c6470b2.zip |
Correctly register the src/sink elements
Diffstat (limited to 'libempathy-gtk/empathy-audio-sink.c')
-rw-r--r-- | libempathy-gtk/empathy-audio-sink.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-audio-sink.c b/libempathy-gtk/empathy-audio-sink.c index 55f64e828..1d2169593 100644 --- a/libempathy-gtk/empathy-audio-sink.c +++ b/libempathy-gtk/empathy-audio-sink.c @@ -204,7 +204,15 @@ empathy_audio_sink_finalize (GObject *object) GstElement * empathy_audio_sink_new (void) { - return GST_ELEMENT (g_object_new (EMPATHY_TYPE_GST_AUDIO_SINK, NULL)); + static gboolean registered = FALSE; + + if (!registered) { + if (!gst_element_register (NULL, "empathyaudiosink", + GST_RANK_NONE, EMPATHY_TYPE_GST_AUDIO_SINK)) + return NULL; + registered = TRUE; + } + return gst_element_factory_make ("empathyaudiosink", NULL); } void |