summaryrefslogtreecommitdiff
path: root/VDR patches
diff options
context:
space:
mode:
authorRichard <richard@ha-server.local>2016-09-04 11:27:10 +0100
committerRichard <richard@ha-server.local>2016-09-04 11:27:10 +0100
commitdb51d3bbfdd63d4c62ca718bfcd7467d2cdc6fa6 (patch)
tree0a2ada6f32615a2b4f7270b8d2a3e203bff3c1c5 /VDR patches
parent83632745c43d406856a3b9948cb5ea4a5ec22666 (diff)
downloadvdr-convert-db51d3bbfdd63d4c62ca718bfcd7467d2cdc6fa6.tar.gz
vdr-convert-db51d3bbfdd63d4c62ca718bfcd7467d2cdc6fa6.tar.bz2
Files not symlinks
Diffstat (limited to 'VDR patches')
-rw-r--r--[l---------]VDR patches/VDR2.20-increase-frame-detector-for-x264.patch13
-rwxr-xr-x[l---------]VDR patches/VDR2.20-proposal-to-fix-index-generation-for-radio-recording.patch91
2 files changed, 102 insertions, 2 deletions
diff --git a/VDR patches/VDR2.20-increase-frame-detector-for-x264.patch b/VDR patches/VDR2.20-increase-frame-detector-for-x264.patch
index 4021e2c..8315d28 120000..100644
--- a/VDR patches/VDR2.20-increase-frame-detector-for-x264.patch
+++ b/VDR patches/VDR2.20-increase-frame-detector-for-x264.patch
@@ -1 +1,12 @@
-/opt/data/develop/vdr/vdr-220/patches/VDR2.20-increase-frame-detector-for-x264.patch \ No newline at end of file
+--- remux.c 2016-09-01 14:53:42.969255952 +0100
++++ new/remux.c 2016-06-30 17:06:06.000000000 +0100
+@@ -23,7 +23,8 @@
+ #define dbgpatpmt(a...) if (DebugPatPmt) fprintf(stderr, a)
+ #define dbgframes(a...) if (DebugFrames) fprintf(stderr, a)
+
+-#define MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION 6
++//RF fix for x264 long commnd line header #define MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION 6
++#define MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION 10
+ #define WRN_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION (MAX_TS_PACKETS_FOR_VIDEO_FRAME_DETECTION / 2)
+ #define WRN_TS_PACKETS_FOR_FRAME_DETECTOR (MIN_TS_PACKETS_FOR_FRAME_DETECTOR / 2)
+
diff --git a/VDR patches/VDR2.20-proposal-to-fix-index-generation-for-radio-recording.patch b/VDR patches/VDR2.20-proposal-to-fix-index-generation-for-radio-recording.patch
index a516d15..7cdc80e 120000..100755
--- a/VDR patches/VDR2.20-proposal-to-fix-index-generation-for-radio-recording.patch
+++ b/VDR patches/VDR2.20-proposal-to-fix-index-generation-for-radio-recording.patch
@@ -1 +1,90 @@
-/opt/data/develop/vdr/vdr-220/patches/VDR2.20-proposal-to-fix-index-generation-for-radio-recording.patch \ No newline at end of file
+>From ecfdf422cb4d7e88088cfb740197e684adb69966 Mon Sep 17 00:00:00 2001
+From: Thomas Reufer <thomas@reufer.ch>
+Date: Mon, 13 Jun 2016 16:42:03 +0200
+Subject: [PATCH 9/9] proposal to fix index generation for radio recordings
+
+---
+ recording.c | 8 ++++----
+ remux.c | 4 +++-
+ remux.h | 3 +++
+ 3 files changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/recording.c b/recording.c
+index a847c7d..b1b7c81 100644
+--- a/recording.c
++++ b/recording.c
+@@ -2324,7 +2324,7 @@ void cIndexFileGenerator::Action(void)
+ Buffer.Del(Processed);
+ }
+ }
+- else if (PatPmtParser.Vpid()) {
++ else if (PatPmtParser.Completed()) {
+ // Step 2 - sync FrameDetector:
+ int Processed = FrameDetector.Analyze(Data, Length);
+ if (Processed > 0) {
+@@ -2346,9 +2346,9 @@ void cIndexFileGenerator::Action(void)
+ PatPmtParser.ParsePmt(p, TS_SIZE);
+ Length -= TS_SIZE;
+ p += TS_SIZE;
+- if (PatPmtParser.Vpid()) {
+- // Found Vpid, so rewind to sync FrameDetector:
+- FrameDetector.SetPid(PatPmtParser.Vpid(), PatPmtParser.Vtype());
++ if (PatPmtParser.Completed()) {
++ // Found pid, so rewind to sync FrameDetector:
++ FrameDetector.SetPid(PatPmtParser.Vpid() ? PatPmtParser.Vpid() : PatPmtParser.Apid(0), PatPmtParser.Vpid() ? PatPmtParser.Vtype() : PatPmtParser.Atype(0));
+ BufferChunks = IFG_BUFFER_SIZE;
+ Rewind = true;
+ break;
+diff --git a/remux.c b/remux.c
+index cfb6ae3..df38add 100644
+--- a/remux.c
++++ b/remux.c
+@@ -603,6 +603,7 @@ cPatPmtParser::cPatPmtParser(bool UpdatePrimaryDevice)
+
+ void cPatPmtParser::Reset(void)
+ {
++ completed = false;
+ pmtSize = 0;
+ patVersion = pmtVersion = -1;
+ pmtPids[0] = 0;
+@@ -893,6 +894,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
+ }
+ }
+ pmtVersion = Pmt.getVersionNumber();
++ completed = true;
+ }
+ else
+ esyslog("ERROR: can't parse PMT");
+@@ -1541,7 +1543,7 @@ void cFrameDetector::SetPid(int Pid, int Type)
+ parser = new cH264Parser;
+ else if (type == 0x24)
+ parser = new cH265Parser;
+- else if (type == 0x04 || type == 0x06) // MPEG audio or AC3 audio
++ else if (type == 0x03 || type == 0x04 || type == 0x06 || type == 0x0F || type == 0x11) // MPEG2,4 AAC, AC3 audio
+ parser = new cAudioParser;
+ else if (type != 0)
+ esyslog("ERROR: unknown stream type %d (PID %d) in frame detector", type, pid);
+diff --git a/remux.h b/remux.h
+index bd0d145..80528bd 100644
+--- a/remux.h
++++ b/remux.h
+@@ -361,6 +361,7 @@ private:
+ uint16_t compositionPageIds[MAXSPIDS];
+ uint16_t ancillaryPageIds[MAXSPIDS];
+ bool updatePrimaryDevice;
++ bool completed;
+ protected:
+ int SectionLength(const uchar *Data, int Length) { return (Length >= 3) ? ((int(Data[1]) & 0x0F) << 8)| Data[2] : 0; }
+ public:
+@@ -397,6 +398,8 @@ public:
+ int Vtype(void) const { return vtype; }
+ ///< Returns the video stream type as defined by the current PMT, or 0 if no video
+ ///< stream type has been detected, yet.
++ bool Completed(void) { return completed; }
++ ///< Returns true if the PMT has been completely parsed
+ const int *Apids(void) const { return apids; }
+ const int *Dpids(void) const { return dpids; }
+ const int *Spids(void) const { return spids; }
+--
+2.4.9
+