TS Play Plugin - breaks streamdev and radio plugins

Message ID 20100414065329.M77755@linogate.de
State New
Headers

Commit Message

Frank Schmirler April 14, 2010, 7:24 a.m. UTC
  On Wed, 14 Apr 2010 07:37:37 +1200, Simon Baxter wrote
> Sorry Frank - definitely patched.  I just tried cleaning and 
> recompiling everything, don't seem to be getting the IsPesRecording 
> function error, but am still getting the cIndexFile mismatch:
> 
> server/recplayer.c: In member function 'uint64_t 
> cRecPlayer::positionFromFrameNumber(uint32_t)':
> server/recplayer.c:253: error: no matching function for call to 
> 'cIndexFile::Get(int, uchar*, int*)'
> ../../../include/vdr/recording.h:229: note: candidates are: bool 
> cIndexFile::Get(int, uint16_t*, off_t*, uchar*, int*)
> ../../../include/vdr/recording.h:231: note:                 int 
> cIndexFile::Get(uint16_t, off_t)
> make: *** [server/recplayer.o] Error 1
> 
> I don't get it - it's calling a Get(int, uchar*, int*), which are 
> defined Get(int, uint16_t*, off_t*, uchar*, int*)  ??

Great - almost there. Before your cleanup, the compiler complained about

no matching function for call to 'cIndexFile::Get(int, uint16_t*, off_t*)'

now it's

no matching function for call to 'cIndexFile::Get(int, uchar*, int*)'

So this time the "#if VDRVERSNUM >= 10703" in streamdev's server/recplayer.c
wasn't changed or not changed correctly. It should read "#if 1".

I attached a patch for streamdev, making it automatically detect the tsplay
patch. Can you give it a try? Apparently you are using a patched streamdev.
According to one of your previous mails there's one '#if' more. Please modify
this additional '#if' as in the patch.

Regards,
Frank
  

Comments

Udo Richter April 14, 2010, 6:27 p.m. UTC | #1
Am 14.04.2010 09:24, schrieb Frank Schmirler:
> I attached a patch for streamdev, making it automatically detect the tsplay
> patch. Can you give it a try? 

> -#if VDRVERSNUM >= 10703
> +#if VDRVERSNUM >= 10703 || defined(MAXVIDEOFILESIZETS)

Hey, good idea to use this #define for detection!

I didn't really notice this topic until now, because of the misleading
TS Play Plugin - not Patch.

I already did plan to add some version detection to the tsplay patch, I
just didn't do it until now. I'll upload a 0.2 version with detection
plus some patches ASAP, which is hopefully on weekend.

Cheers,

Udo
  

Patch

Index: server/recplayer.c
===================================================================
RCS file: /var/cvsroot/streamdev/server/recplayer.c,v
retrieving revision 1.1
diff -u -r1.1 recplayer.c
--- server/recplayer.c	1 Jul 2009 11:00:49 -0000	1.1
+++ server/recplayer.c	14 Apr 2010 06:31:09 -0000
@@ -34,7 +34,7 @@ 
 
   // FIXME find out max file path / name lengths
 
-#if VDRVERSNUM >= 10703
+#if VDRVERSNUM >= 10703 || defined(MAXVIDEOFILESIZETS)
   indexFile = new cIndexFile(recording->FileName(), false, rec->IsPesRecording());
 #else
   indexFile = new cIndexFile(recording->FileName(), false);
@@ -58,7 +58,7 @@ 
   for(i = 1; i < 1000; i++)
   {
 
-#if APIVERSNUM < 10703
+#if APIVERSNUM < 10703 || !defined(MAXVIDEOFILESIZETS)
     snprintf(fileName, 2047, "%s/%03i.vdr", recording->FileName(), i);
     //log->log("RecPlayer", Log::DEBUG, "FILENAME: %s", fileName);
     file = fopen(fileName, "r");
@@ -99,7 +99,7 @@ 
 
   char fileName[2048];
 
-#if APIVERSNUM >= 10703
+#if APIVERSNUM >= 10703 || defined(MAXVIDEOFILESIZETS)
   snprintf(fileName, 2047, "%s/%05i.ts", recording->FileName(), index);
   isyslog("openFile called for index %i string:%s", index, fileName);
 
@@ -222,7 +222,7 @@ 
 {
   if (!indexFile) return 0;
 
-#if VDRVERSNUM >= 10703
+#if VDRVERSNUM >= 10703 || defined(MAXVIDEOFILESIZETS)
   uint16_t retFileNumber;
   off_t retFileOffset;
 #else