summaryrefslogtreecommitdiffstats
path: root/sys/oss/gstosssrc.c
diff options
context:
space:
mode:
authorJan Schmidt <thaytan@mad.scientist.com>2007-12-07 19:29:39 +0000
committerJan Schmidt <thaytan@mad.scientist.com>2007-12-07 19:29:39 +0000
commit0f1cc10947820ced5bb91b1957278722278bf9b3 (patch)
tree3f7bda962cc033f96a6b7d9572279e85937d75f0 /sys/oss/gstosssrc.c
parentee1f115ef9198ae63a09f9823ac03169a805fac8 (diff)
sys/oss/: Allow the AUDIODEV environment variable to redirect us to a different default OSS device, like sunaudiosink...
Original commit message from CVS: * sys/oss/gstosssink.c: * sys/oss/gstosssrc.c: Allow the AUDIODEV environment variable to redirect us to a different default OSS device, like sunaudiosink does on Solaris (makes audio play automatically on SunRays).
Diffstat (limited to 'sys/oss/gstosssrc.c')
-rw-r--r--sys/oss/gstosssrc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c
index 34d901a2..3d8f3f75 100644
--- a/sys/oss/gstosssrc.c
+++ b/sys/oss/gstosssrc.c
@@ -230,10 +230,16 @@ gst_oss_src_get_property (GObject * object, guint prop_id,
static void
gst_oss_src_init (GstOssSrc * osssrc, GstOssSrcClass * g_class)
{
+ const gchar *device;
+
GST_DEBUG ("initializing osssrc");
+ device = g_getenv ("AUDIODEV");
+ if (device == NULL)
+ device = DEFAULT_DEVICE;
+
osssrc->fd = -1;
- osssrc->device = g_strdup (DEFAULT_DEVICE);
+ osssrc->device = g_strdup (device);
osssrc->device_name = g_strdup (DEFAULT_DEVICE_NAME);
}