The attached patch enables wis-streamer to work with current 3.x.x kernels.
- remove float_t because it's unused and conflicts with math.h
- in the Makefile put libliveMedia.a to the first place, otherwise
linking fails
- make search for the audio device compatible with the current sysfs paths
Tamas
diff -u -r wis-streamer.orig/AACEncoder/fixed.h wis-streamer/AACEncoder/fixed.h
--- wis-streamer.orig/AACEncoder/fixed.h 2007-04-29 01:43:54.000000000 -0400
+++ wis-streamer/AACEncoder/fixed.h 2012-09-11 12:34:55.704270098 -0400
@@ -102,7 +102,7 @@
typedef int64_t frac_t;
typedef int32_t coef_t;
typedef int32_t real_32_t;
-typedef int32_t float_t;
+//typedef int32_t float_t; /* tomv: float_t is unused */
typedef int64_t eng_t;
typedef int64_t pow_t;
typedef int32_t fftfloat;
diff -u -r wis-streamer.orig/AMREncoder/fixed.h wis-streamer/AMREncoder/fixed.h
--- wis-streamer.orig/AMREncoder/fixed.h 2006-10-15 07:12:53.000000000 -0400
+++ wis-streamer/AMREncoder/fixed.h 2012-09-11 12:36:37.820839565 -0400
@@ -120,7 +120,7 @@
typedef int64_t coef_t;
typedef int32_t real_32_t;
typedef int32_t frac_32_t;
-typedef int32_t float_t;
+//typedef int32_t float_t; /* tomv: float_t is unused */
typedef int64_t eng_t;
typedef int64_t pow_t;
typedef int32_t fftfloat;
diff -u -r wis-streamer.orig/Makefile wis-streamer/Makefile
--- wis-streamer.orig/Makefile 2012-09-11 15:51:14.109648672 -0400
+++ wis-streamer/Makefile 2012-09-11 15:50:48.500503095 -0400
@@ -13,10 +13,10 @@
CFLAGS = $(INCLUDES) -D_LINUX -g -Wall
-LIBS = -L$(LIVE_DIR)/BasicUsageEnvironment -lBasicUsageEnvironment \
+LIBS = -L$(LIVE_DIR)/liveMedia -lliveMedia \
+ -L$(LIVE_DIR)/BasicUsageEnvironment -lBasicUsageEnvironment \
-L$(LIVE_DIR)/UsageEnvironment -lUsageEnvironment \
-L$(LIVE_DIR)/groupsock -lgroupsock \
- -L$(LIVE_DIR)/liveMedia -lliveMedia \
-LAMREncoder -lAMREncoder \
-LAACEncoder -lAACEncoder
diff -u -r wis-streamer.orig/WISInput.cpp wis-streamer/WISInput.cpp
--- wis-streamer.orig/WISInput.cpp 2007-06-11 14:12:13.000000000 -0400
+++ wis-streamer/WISInput.cpp 2012-09-11 12:34:05.435958788 -0400
@@ -186,6 +186,12 @@
if (realpath(sympath, canonpath) == NULL) continue;
if (strcmp(gopath, canonpath) == 0) break;
}
+ if (i == maxFileNum)
+ for (i = 0; i < maxFileNum; ++i) {
+ snprintf(sympath, sizeof sympath, "/sys/class/sound/pcmC%dD0c/device/device", i);
+ if (realpath(sympath, canonpath) == NULL) continue;
+ if (strcmp(gopath, canonpath) == 0) break;
+ }
if (i == maxFileNum) {
err(env) << "Unable to find a ALSA device associated with the GO7007SB device\n";
break;
@@ -204,7 +210,12 @@
char line[128];
while (fgets(line, sizeof line, file) != NULL) {
int m, n;
- if (sscanf(line, "%d: [%u-%*u]: digital audio\n", &m, &n) != 2) continue;
+ char *c;
+ /* tomv: if (sscanf(line, "%d: [%u-%*u]: digital audio\n", &m, &n) != 2) continue; */
+ if ((c = strrchr(line, ':')) == NULL ||
+ strcmp(c, ": digital audio\n") ||
+ sscanf(line, "%d: [%u-%*u]:", &m, &n) != 2)
+ continue;
if (n == i) {
minor = m;
break;
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel