mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
gconfvideo(src|sink): Disconnect GConf notifications
Fixes bug #571321.
This commit is contained in:
parent
a7c2b13543
commit
ef33cf891f
4 changed files with 14 additions and 2 deletions
|
@ -122,7 +122,7 @@ gst_gconf_video_sink_init (GstGConfVideoSink * sink,
|
||||||
sink->client = gconf_client_get_default ();
|
sink->client = gconf_client_get_default ();
|
||||||
gconf_client_add_dir (sink->client, GST_GCONF_DIR,
|
gconf_client_add_dir (sink->client, GST_GCONF_DIR,
|
||||||
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
|
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
|
||||||
gconf_client_notify_add (sink->client,
|
sink->notify_id = gconf_client_notify_add (sink->client,
|
||||||
GST_GCONF_DIR "/" GST_GCONF_VIDEOSINK_KEY,
|
GST_GCONF_DIR "/" GST_GCONF_VIDEOSINK_KEY,
|
||||||
cb_toggle_element, sink, NULL, NULL);
|
cb_toggle_element, sink, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
@ -133,6 +133,9 @@ gst_gconf_video_sink_dispose (GObject * object)
|
||||||
GstGConfVideoSink *sink = GST_GCONF_VIDEO_SINK (object);
|
GstGConfVideoSink *sink = GST_GCONF_VIDEO_SINK (object);
|
||||||
|
|
||||||
if (sink->client) {
|
if (sink->client) {
|
||||||
|
if (sink->notify_id != 0)
|
||||||
|
gconf_client_notify_remove (sink->client, sink->notify_id);
|
||||||
|
|
||||||
g_object_unref (G_OBJECT (sink->client));
|
g_object_unref (G_OBJECT (sink->client));
|
||||||
sink->client = NULL;
|
sink->client = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,6 +46,9 @@ typedef struct _GstGConfVideoSink {
|
||||||
GstElement *kid;
|
GstElement *kid;
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
||||||
|
/* gconf notify id */
|
||||||
|
guint notify_id;
|
||||||
|
|
||||||
/* Current gconf string */
|
/* Current gconf string */
|
||||||
gchar *gconf_str;
|
gchar *gconf_str;
|
||||||
} GstGConfVideoSink;
|
} GstGConfVideoSink;
|
||||||
|
|
|
@ -124,7 +124,7 @@ gst_gconf_video_src_init (GstGConfVideoSrc * src,
|
||||||
src->client = gconf_client_get_default ();
|
src->client = gconf_client_get_default ();
|
||||||
gconf_client_add_dir (src->client, GST_GCONF_DIR,
|
gconf_client_add_dir (src->client, GST_GCONF_DIR,
|
||||||
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
|
GCONF_CLIENT_PRELOAD_RECURSIVE, NULL);
|
||||||
gconf_client_notify_add (src->client,
|
src->notify_id = gconf_client_notify_add (src->client,
|
||||||
GST_GCONF_DIR "/" GST_GCONF_VIDEOSRC_KEY,
|
GST_GCONF_DIR "/" GST_GCONF_VIDEOSRC_KEY,
|
||||||
cb_toggle_element, src, NULL, NULL);
|
cb_toggle_element, src, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
@ -135,6 +135,9 @@ gst_gconf_video_src_dispose (GObject * object)
|
||||||
GstGConfVideoSrc *src = GST_GCONF_VIDEO_SRC (object);
|
GstGConfVideoSrc *src = GST_GCONF_VIDEO_SRC (object);
|
||||||
|
|
||||||
if (src->client) {
|
if (src->client) {
|
||||||
|
if (src->notify_id != 0)
|
||||||
|
gconf_client_notify_remove (src->client, src->notify_id);
|
||||||
|
|
||||||
g_object_unref (G_OBJECT (src->client));
|
g_object_unref (G_OBJECT (src->client));
|
||||||
src->client = NULL;
|
src->client = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,9 @@ typedef struct _GstGConfVideoSrc {
|
||||||
GstElement *kid;
|
GstElement *kid;
|
||||||
GstPad *pad;
|
GstPad *pad;
|
||||||
|
|
||||||
|
/* gconf key notification id */
|
||||||
|
guint notify_id;
|
||||||
|
|
||||||
/* Current gconf string */
|
/* Current gconf string */
|
||||||
gchar *gconf_str;
|
gchar *gconf_str;
|
||||||
} GstGConfVideoSrc;
|
} GstGConfVideoSrc;
|
||||||
|
|
Loading…
Reference in a new issue