diff options
author | Tim-Philipp Müller <tim@centricular.net> | 2008-05-22 15:14:26 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2008-05-22 15:14:26 +0000 |
commit | 80ef4ca4d7449550b2c5aa05d55d7c697a7c1fab (patch) | |
tree | 800d89d8acdb6af889aa56d44253c3d1f889684c /sys/oss4/oss4-property-probe.c | |
parent | b3bc29bc641b8a4c380d100b60d709aa08e61f28 (diff) | |
download | gst-plugins-bad-80ef4ca4d7449550b2c5aa05d55d7c697a7c1fab.tar.gz gst-plugins-bad-80ef4ca4d7449550b2c5aa05d55d7c697a7c1fab.tar.bz2 gst-plugins-bad-80ef4ca4d7449550b2c5aa05d55d7c697a7c1fab.zip |
sys/oss4/: Make device-name probing in NULL state work better (e.g. for the gnome-control-center sound capplet).
Original commit message from CVS:
* sys/oss4/oss4-mixer.c: (gst_oss4_mixer_open):
* sys/oss4/oss4-property-probe.c:
(gst_oss4_property_probe_find_device_name),
(gst_oss4_property_probe_find_device_name_nofd):
* sys/oss4/oss4-property-probe.h:
* sys/oss4/oss4-sink.c: (gst_oss4_sink_get_property):
* sys/oss4/oss4-source.c: (gst_oss4_source_get_property):
Make device-name probing in NULL state work better (e.g. for the
gnome-control-center sound capplet).
Diffstat (limited to 'sys/oss4/oss4-property-probe.c')
-rw-r--r-- | sys/oss4/oss4-property-probe.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/oss4/oss4-property-probe.c b/sys/oss4/oss4-property-probe.c index e4b56679..9a625d84 100644 --- a/sys/oss4/oss4-property-probe.c +++ b/sys/oss4/oss4-property-probe.c @@ -163,6 +163,24 @@ gst_oss4_property_probe_find_device_name (GstObject * obj, int fd, return (name != NULL); } +gboolean +gst_oss4_property_probe_find_device_name_nofd (GstObject * obj, + const gchar * device_handle, gchar ** device_name) +{ + gboolean res; + int fd; + + fd = open ("/dev/mixer", O_RDONLY); + if (fd < 0) + return FALSE; + + res = gst_oss4_property_probe_find_device_name (obj, fd, device_handle, + device_name); + + close (fd); + return res; +} + static GList * gst_oss4_property_probe_get_mixer_devices (GstObject * obj, int fd, struct oss_sysinfo *si) |