summaryrefslogtreecommitdiffstats
path: root/gst-libs/gst/gconf/gconf.c
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2002-10-25 14:31:15 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2002-10-25 14:31:15 +0000
commit8bca9f16bb88f33064d077f7bb9aa70d32f8219c (patch)
treeead757c084df6b78ccb17b1c6788a5858246f8a9 /gst-libs/gst/gconf/gconf.c
parent1496394c0f4be1a718fb189846c6350cbd9e43da (diff)
downloadgst-plugins-bad-8bca9f16bb88f33064d077f7bb9aa70d32f8219c.tar.gz
gst-plugins-bad-8bca9f16bb88f33064d077f7bb9aa70d32f8219c.tar.bz2
gst-plugins-bad-8bca9f16bb88f33064d077f7bb9aa70d32f8219c.zip
a no-brainer addition
Original commit message from CVS: a no-brainer addition
Diffstat (limited to 'gst-libs/gst/gconf/gconf.c')
-rw-r--r--gst-libs/gst/gconf/gconf.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gst-libs/gst/gconf/gconf.c b/gst-libs/gst/gconf/gconf.c
index f14a0a6c..c3b0d4cf 100644
--- a/gst-libs/gst/gconf/gconf.c
+++ b/gst-libs/gst/gconf/gconf.c
@@ -167,6 +167,40 @@ gst_gconf_get_default_video_sink (void)
return ret;
}
+GstElement *
+gst_gconf_get_default_audio_src (void)
+{
+ GstElement *ret = gst_gconf_render_bin_from_key ("default/audiosrc");
+
+ if (!ret) {
+ ret = gst_element_factory_make ("osssrc", NULL);
+
+ if (!ret)
+ g_warning ("No GConf default audio src key and osssrc doesn't work");
+ else
+ g_warning ("GConf audio src not found, using osssrc");
+ }
+
+ return ret;
+}
+
+GstElement *
+gst_gconf_get_default_video_src (void)
+{
+ GstElement *ret = gst_gconf_render_bin_from_key ("default/videosrc");
+
+ if (!ret) {
+ ret = gst_element_factory_make ("videotestsrc", NULL);
+
+ if (!ret)
+ g_warning ("No GConf default video src key and videotestrc doesn't work");
+ else
+ g_warning ("GConf video src not found, using videotestrc");
+ }
+
+ return ret;
+}
+
static gboolean
plugin_init (GModule *module, GstPlugin *plugin)
{