Hallo,
ich hab da mal n kleines Problemchen mit vdr auf der uClibc (0.29.3)
Ich hab die letzten Wochen mir die Zeit gegoennt mal den Versuch zu starten vdr zusammen mit der uClibc ans rennen zu bringen, mit eigentlich ganz gutem Erfolg.
VDR laeuft soweit, mir vdr-sxfe bekom' ich ein Bild, jedoch keinen Ton.
Ich vermute, das im TS kein Audio PID gefunden wird, und das deshalb vdr das nicht richtig demuxt.
Hier ein syslog Auszug:
Aug 26 20:46:15 localhost vdr: [8505] switching to channel 6
Aug 26 20:46:15 localhost vdr: [8521] transfer thread started (pid=8521, tid=8521)
Aug 26 20:46:15 localhost vdr: [8522] receiver on device 1 thread started (pid=8522, tid=8522)
Aug 26 20:46:15 localhost vdr: [8523] TS buffer on device 1 thread started (pid=8523, tid=8523)
Aug 26 20:46:15 localhost vdr: [8521] setting audio track to 1 (0)
Aug 26 20:47:01 localhost vdr: [8521] transfer thread ended (pid=8521, tid=8521)
Wenn ich mich nicht irre deutet : "setting audio track to 1 (0)" darauf hin, das vdr nicht den passenden Audio-Stream findet.
Hier nun meine Frage: hat jemand dieses Problem schon mal gehabt ? Es sieht (IMHO) so aus als ob der code der den MPEG Datenstrom analysiert irgendwo etwas tut, was in der uClibc nicht genau so funktioniert. Evtl auch GNU_EXTENTIONS.
---------------------------------------------------
Fuer alle interessierten:
Dies ist das uClibc diff: (bis jetzt )
diff -up vdr-1.4.5-orig/channels.c vdr-1.4.5/channels.c
--- vdr-1.4.5-orig/channels.c 2006-05-28 15:03:40 +0000
+++ vdr-1.4.5/channels.c 2007-08-26 19:58:42 +0000
@@ -134,7 +134,10 @@ tChannelID tChannelID::FromString(const
int tid;
int sid;
int rid = 0;
- int fields = sscanf(s, "%a[^-]-%d-%d-%d-%d", &sourcebuf, &nid, &tid, &sid, &rid);
+
+ sourcebuf = (char*) malloc(256);
+
+ int fields = sscanf(s, "%s-%d-%d-%d-%d", sourcebuf, &nid, &tid, &sid, &rid);
if (fields == 4 || fields == 5) {
int source = cSource::FromString(sourcebuf);
free(sourcebuf);
@@ -701,12 +704,18 @@ bool cChannel::Parse(const char *s)
else {
groupSep = false;
char *namebuf = NULL;
+ namebuf = (char*) malloc(256);
char *sourcebuf = NULL;
+ sourcebuf = (char*) malloc(256);
char *parambuf = NULL;
+ parambuf = (char*) malloc(256);
char *vpidbuf = NULL;
+ vpidbuf = (char*) malloc(256);
char *apidbuf = NULL;
+ apidbuf = (char*) malloc(256);
char *caidbuf = NULL;
- int fields = sscanf(s, "%a[^:]:%d :%a[^:]:%a[^:] :%d :%a[^:]:%a[^:]:%d :%a[^:]:%d :%d :%d :%d ", &namebuf, &frequency, ¶mbuf, &sourcebuf, &srate, &vpidbuf, &apidbuf, &tpid, &caidbuf, &sid, &nid, &tid, &rid);
+ caidbuf = (char*) malloc(256);
+ int fields = sscanf(s, "%[^:]:%d:%[^:]:%[^:]:%d :%[^:]:%[^:]:%d :%[^:]:%d :%d :%d :%d ", namebuf, &frequency, parambuf, sourcebuf, &srate, vpidbuf, apidbuf, &tpid, caidbuf, &sid, &nid, &tid, &rid);
if (fields >= 9) {
if (fields == 9) {
// allow reading of old format
diff -up vdr-1.4.5-orig/diseqc.c vdr-1.4.5/diseqc.c
--- vdr-1.4.5-orig/diseqc.c 2005-12-30 15:41:48 +0000
+++ vdr-1.4.5/diseqc.c 2007-08-21 23:08:10 +0000
@@ -30,7 +30,11 @@ bool cDiseqc::Parse(const char *s)
{
bool result = false;
char *sourcebuf = NULL;
- int fields = sscanf(s, "%a[^ ] %d %c %d %a[^\n]", &sourcebuf, &slof, &polarization, &lof, &commands);
+
+ sourcebuf = (char*) malloc(256);
+ commands = (char*) malloc(256);
+
+ int fields = sscanf(s, "%s %d %c %d %s", sourcebuf, &slof, &polarization, &lof, commands);
if (fields == 4)
commands = NULL; //XXX Apparently sscanf() doesn't work correctly if the last %a argument results in an empty string
if (4 <= fields && fields <= 5) {
diff -up vdr-1.4.5-orig/epg.c vdr-1.4.5/epg.c
--- vdr-1.4.5-orig/epg.c 2006-10-28 09:12:42 +0000
+++ vdr-1.4.5/epg.c 2007-08-22 20:13:14 +0000
@@ -30,7 +30,8 @@ cString tComponent::ToString(void)
bool tComponent::FromString(const char *s)
{
unsigned int Stream, Type;
- int n = sscanf(s, "%X %02X %7s %a[^\n]", &Stream, &Type, language, &description); // 7 = MAXLANGCODE2 - 1
+ description = (char*) malloc(256);
+ int n = sscanf(s, "%X %02X %7s %[^\n]", &Stream, &Type, language, description); // 7 = MAXLANGCODE2 - 1
if (n != 4 || isempty(description)) {
free(description);
description = NULL;
diff -up vdr-1.4.5-orig/sources.c vdr-1.4.5/sources.c
--- vdr-1.4.5-orig/sources.c 2004-12-26 11:58:52 +0000
+++ vdr-1.4.5/sources.c 2007-08-26 20:01:21 +0000
@@ -25,9 +25,17 @@ cSource::~cSource()
bool cSource::Parse(const char *s)
{
- char *codeBuf = NULL;
- if (2 == sscanf(s, "%a[^ ] %a[^\n]", &codeBuf, &description))
+ char *codeBuf ;
+
+ codeBuf = (char *) malloc(256);
+ description = (char *) malloc(256);
+
+ int num;
+// num = sscanf(s, "%a[^ ] %a[^\n]", &codeBuf, &description);
+ num = sscanf(s, "%s %s", codeBuf, description);
+ if (2 == num){
code = FromString(codeBuf);
+ }
free(codeBuf);
return code != stNone && description && *description;
}
diff -up vdr-1.4.5-orig/thread.c vdr-1.4.5/thread.c
--- vdr-1.4.5-orig/thread.c 2006-09-24 12:54:47 +0000
+++ vdr-1.4.5/thread.c 2007-08-21 20:56:18 +0000
@@ -157,10 +157,17 @@ bool cRwLock::Lock(bool Write, int Timeo
if (!GetAbsTime(&abstime, TimeoutMs))
TimeoutMs = 0;
}
- if (Write)
- Result = TimeoutMs ? pthread_rwlock_timedwrlock(&rwlock, &abstime) : pthread_rwlock_wrlock(&rwlock);
- else
- Result = TimeoutMs ? pthread_rwlock_timedrdlock(&rwlock, &abstime) : pthread_rwlock_rdlock(&rwlock);
+
+ while (true) {
+ if (Write)
+ Result = pthread_rwlock_wrlock(&rwlock);
+ else
+ Result = pthread_rwlock_rdlock(&rwlock);
+ if ( Result == 0 | TimeoutMs == 0 )
+ break;
+ TimeoutMs--;
+ usleep(1000);
+ }
return Result == 0;
}
diff -up vdr-1.4.5-orig/timers.c vdr-1.4.5/timers.c
--- vdr-1.4.5-orig/timers.c 2006-09-15 14:15:53 +0000
+++ vdr-1.4.5/timers.c 2007-08-22 20:11:17 +0000
@@ -269,7 +269,11 @@ bool cTimer::Parse(const char *s)
s = s2;
}
bool result = false;
- if (8 <= sscanf(s, "%u :%a[^:]:%a[^:]:%d :%d :%d :%d :%a[^:\n]:%a[^\n]", &flags, &channelbuffer, &daybuffer, &start, &stop, &priority, &lifetime, &filebuffer, &aux)) {
+ channelbuffer = (char*) malloc(256);
+ daybuffer = (char*) malloc(256);
+ filebuffer = (char*) malloc(256);
+ aux = (char*) malloc(256);
+ if (8 <= sscanf(s, "%u :%[^:]:%[^:]:%d :%d :%d :%d :%[^:\n]:%[^\n]", &flags, channelbuffer, daybuffer, &start, &stop, &priority, &lifetime, filebuffer, aux)) {
ClrFlags(tfRecording);
if (aux && !*skipspace(aux)) {
free(aux);
diff -up vdr-1.4.5-orig/tools.c vdr-1.4.5/tools.c
--- vdr-1.4.5-orig/tools.c 2006-12-02 11:12:59 +0000
+++ vdr-1.4.5/tools.c 2007-08-22 21:33:33 +0000
@@ -481,7 +481,8 @@ char *ReadLink(const char *FileName)
{
if (!FileName)
return NULL;
- char *TargetName = canonicalize_file_name(FileName);
+ char *ResolvedName = (char*) malloc(1024);
+ char *TargetName = realpath(FileName, ResolvedName);
if (!TargetName) {
if (errno == ENOENT) // file doesn't exist
TargetName = strdup(FileName);
@@ -1053,7 +1054,7 @@ bool cSafeFile::Close(void)
// --- cUnbufferedFile -------------------------------------------------------
-#define USE_FADVISE
+//#define USE_FADVISE
#define WRITE_BUFFER KILOBYTE(800)
@@ -1115,7 +1116,8 @@ void cUnbufferedFile::SetReadAhead(size_
int cUnbufferedFile::FadviseDrop(off_t Offset, off_t Len)
{
// rounding up the window to make sure that not PAGE_SIZE-aligned data gets freed.
- return posix_fadvise(fd, Offset - (FADVGRAN - 1), Len + (FADVGRAN - 1) * 2, POSIX_FADV_DONTNEED);
+ //return posix_fadvise(fd, Offset - (FADVGRAN - 1), Len + (FADVGRAN - 1) * 2, POSIX_FADV_DONTNEED);
+ return 0;
}
off_t cUnbufferedFile::Seek(off_t Offset, int Whence)
Alles anzeigen