You are not logged in.

Dear visitor, welcome to VDR Portal. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, August 28th 2007, 3:13pm

vdr 1.4 mit uClibc Probleme

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:

Source code

1
2
3
4
5
6
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 )

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
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, &parambuf, &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)

2

Tuesday, August 28th 2007, 4:12pm

RE: vdr 1.4 mit uClibc Probleme

Es gibt einen vdr Port für die Gigasets m740/m750. Dort wird auch die uclibc verwendet. Evtl. findest Du ja was hilfreiches im SVN.

http://www.open7x0.org/
Gibertini SE75 | Inverto QuadroLNB Black Eco | Inverto Unicable Multischalter 1/8/1 | DD OctopusNET Rack mit 2x DuoFlexS2 | Telestar Digibit R1 (Testlab)
VDR 2.1.6 (Server) auf Asus M5A78L-M/USB3 | Sempron 145@2Cores | 4GB ECC RAM | SAT>IP via vtuner/satip | PicoPSU | Debian Wheezy 64Bit | Linux Kernel 3.15.
VDR 2.0.6 via streamdev auf RaspberryPI
R.I.P: Gigaset M740 mit VDR von open7x0.org