Re: [vdr] [ANNOUNCE] VDR developer version 1.7.3

2009-01-10 Thread Johann Friedrichs
Hi,

there seems to be problem in pausing replays of new recordings (output
to FF). 4 out of 5 times vdr freezes when trying to continue the replay.
Poll in PlayVideo runs into a timeout and a new write gives EAGAIN. This
does not happen with old recordings.
Most likely splitting long PES-packets not on frame-boundaries prevents
the FF-driver from finding a good start-point after DvbDevice->Freeze().
A rough workaround is attached, but maybe the idea to dump the old remux
code was not the best one, as long as the FF and some plugins need
PES-output.

Replaying TS with VLC gives lots of TS discontinuities for PID 0 and
132. Attached is a fix.

Regards
Johann
--- vdr-1.7.3/dvbdevice.c.dist	2009-01-10 21:46:50.0 +0100
+++ vdr-1.7.3/dvbdevice.c	2009-01-10 20:39:32.0 +0100
@@ -1302,14 +1302,24 @@ bool cDvbDevice::Flush(int TimeoutMs)
   return true;
 }
 
+#define MAXPOLLTIMEOUTS 10
+
 int cDvbDevice::PlayVideo(const uchar *Data, int Length)
 {
   int w;
+  int PollTimeouts = 0;
   do {
  w = WriteAllOrNothing(fd_video, Data, Length, 1000, 10);
+ if (w < 0 && FATALERRNO) return w;
  if (w < 0 && errno == EAGAIN) {
 cPoller Poller(fd_video, true);
-Poller.Poll(200);
+	if (Poller.Poll(200)) PollTimeouts = 0;
+	else PollTimeouts++;
+	if (PollTimeouts == MAXPOLLTIMEOUTS) {
+	   dsyslog("PlayVideo returns -%d and reached PollTimeouts", -w);
+	   Clear();
+	   return w;
+   }
 }
  } while (w != Length);
   return w;
--- vdr-1.7.3/remux.c.dist	2009-01-07 20:40:53.0 +0100
+++ vdr-1.7.3/remux.c	2009-01-10 14:48:31.0 +0100
@@ -320,7 +320,7 @@ uchar *cPatPmtGenerator::GetPat(void)
 uchar *cPatPmtGenerator::GetPmt(int &Index)
 {
   if (Index < numPmtPackets) {
- IncCounter(patCounter, pmt[Index]);
+ IncCounter(pmtCounter, pmt[Index]);
  return pmt[Index++];
  }
   return NULL;
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] [ANNOUNCE] VDR developer version 1.7.3

2009-01-13 Thread Johann Friedrichs
Hi,

with vdr 1.7.3 I had no directory display in the pictures-plugin and
crashes in dvdswitch, while it initially scanned the defined base
directory for DVD-Images.

I found, that with the LARGEFILE options I had to change cReadDir
accordingly to use dirent64 and readdir64_r (tools.h, tools.c)

Those Plugins, using cReadDir like pictures, epgsearch, dvdswitch then
also had to change dirent to dirent64. With these changes the plugins
are working again (Base system is Debian etch).

Regards
Johann

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


[vdr] [ANNOUNCE] VDR developer version 1.7.3

2009-01-14 Thread Johann Friedrichs
It is much easier than in my previous message to get plugins running,
that use cReadDir:

add

DEFINES += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
-D_LARGEFILE64_SOURCE

to Make.config

Regards,
Johann

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr