[Live-devel] Bug and fix report: WISstreamer.cpp - Unable to find emulated OSS device.
Juraj Michalek
juraj.michalek at asinus.org
Sat Oct 14 10:56:09 PDT 2006
Hello.
I want to report you problem which I found in:
http://www.live555.com/wis-streamer/source/wis-streamer.tar.gz
I have kernel 2.6.16 and Plextor ConvertX.
wis-streamer refuse to start with following error:
wis-streamer: A streaming server for the WIS GO7007 encoder driver
For driver documentation and source code, see:
<http://oss.wischip.com/>
For server documentation and source code, see:
<http://www.live555.com/wis-streamer/>
Built using "LIVE555 Streaming Media":
<http://www.live555.com/liveMedia/>
Initializing...
ERROR: Unable to find emulated OSS device.
ERROR: Failed to create WIS input device
When I found this, I dig deeper in the code and I've found following
strange behaviour.
Here is list of cat /proc/asound/oss/devices
0: [0- 0]: mixer
1: : sequencer
2: [0- 0]: raw midi
3: [0- 0]: digital audio
4: [0- 0]: digital audio
8: : sequencer
9: [0- 0]: raw midi
12: [0- 1]: digital audio
13: [0- 1]: raw midi
14: [0- 1]: raw midi
16: [1- 0]: mixer
19: [1- 0]: digital audio
20: [1- 0]: digital audio
Plextor minor number is 19. But for some weird reson wis-streamer parse
this file only to line with minor number 16 and use this number. Which
make no sense.
It seem that method - WISInput.cpp - line 208:
if (sscanf(line, "%d: [%u-%*u]: digital audio\n", &m, &n) != 2) continue;
match line: 16: [1- 0]: mixer
instead of: 19: [1- 0]: digital audio
I try to find reason, why there is problem in sscanf, but I have no idea
why it behave in this way.
Definition of sscanf is e.g. here:
http://www.cplusplus.com/ref/cstdio/sscanf.html
I test it with gcc-4.0 and gcc-4.1 and appropritiate libraries, but
result was always same.
So I solve this problem by adding one more cotrol after 208:
if (strstr(line, "digital audio")== NULL) continue;
After this fix wis-streame work correctly.
Please consider appropritiate correction for wis-streamer.
Have a nice day and good luck with development
Juraj Michalek
--
Asinus IT Group - http://www.asinus.org
Personal page: http://juraj.michalek.asinus.org
Asinus is member of Blucina.net team
More information about the live-devel
mailing list