mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed regenerating the index of audio recordings
This commit is contained in:
parent
b6080634cc
commit
26252c37cd
@ -3334,6 +3334,7 @@ Thomas Reufer <thomas@reufer.ch>
|
|||||||
for implementing a frame parser for H.265 (HEVC) recordings
|
for implementing a frame parser for H.265 (HEVC) recordings
|
||||||
for adding cFont::Width(void) to get the default character width and allow stretched
|
for adding cFont::Width(void) to get the default character width and allow stretched
|
||||||
font drawing in high level OSDs
|
font drawing in high level OSDs
|
||||||
|
for fixing regenerating the index of audio recordings
|
||||||
|
|
||||||
Eike Sauer <EikeSauer@t-online.de>
|
Eike Sauer <EikeSauer@t-online.de>
|
||||||
for reporting a problem with channels that need more than 5 TS packets for detecting
|
for reporting a problem with channels that need more than 5 TS packets for detecting
|
||||||
|
1
HISTORY
1
HISTORY
@ -8864,3 +8864,4 @@ Video Disk Recorder Revision History
|
|||||||
- Implemented a frame parser for H.265 (HEVC) recordings (thanks to Thomas Reufer).
|
- Implemented a frame parser for H.265 (HEVC) recordings (thanks to Thomas Reufer).
|
||||||
- Added cFont::Width(void) to get the default character width and allow stretched
|
- Added cFont::Width(void) to get the default character width and allow stretched
|
||||||
font drawing in high level OSDs (thanks to Thomas Reufer).
|
font drawing in high level OSDs (thanks to Thomas Reufer).
|
||||||
|
- Fixed regenerating the index of audio recordings (thanks to Thomas Reufer).
|
||||||
|
10
recording.c
10
recording.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.c 4.5 2016/12/13 13:39:09 kls Exp $
|
* $Id: recording.c 4.6 2016/12/22 12:58:20 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
@ -2329,7 +2329,7 @@ void cIndexFileGenerator::Action(void)
|
|||||||
Buffer.Del(Processed);
|
Buffer.Del(Processed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (PatPmtParser.Vpid()) {
|
else if (PatPmtParser.Completed()) {
|
||||||
// Step 2 - sync FrameDetector:
|
// Step 2 - sync FrameDetector:
|
||||||
int Processed = FrameDetector.Analyze(Data, Length);
|
int Processed = FrameDetector.Analyze(Data, Length);
|
||||||
if (Processed > 0) {
|
if (Processed > 0) {
|
||||||
@ -2351,9 +2351,9 @@ void cIndexFileGenerator::Action(void)
|
|||||||
PatPmtParser.ParsePmt(p, TS_SIZE);
|
PatPmtParser.ParsePmt(p, TS_SIZE);
|
||||||
Length -= TS_SIZE;
|
Length -= TS_SIZE;
|
||||||
p += TS_SIZE;
|
p += TS_SIZE;
|
||||||
if (PatPmtParser.Vpid()) {
|
if (PatPmtParser.Completed()) {
|
||||||
// Found Vpid, so rewind to sync FrameDetector:
|
// Found pid, so rewind to sync FrameDetector:
|
||||||
FrameDetector.SetPid(PatPmtParser.Vpid(), PatPmtParser.Vtype());
|
FrameDetector.SetPid(PatPmtParser.Vpid() ? PatPmtParser.Vpid() : PatPmtParser.Apid(0), PatPmtParser.Vpid() ? PatPmtParser.Vtype() : PatPmtParser.Atype(0));
|
||||||
BufferChunks = IFG_BUFFER_SIZE;
|
BufferChunks = IFG_BUFFER_SIZE;
|
||||||
Rewind = true;
|
Rewind = true;
|
||||||
break;
|
break;
|
||||||
|
6
remux.c
6
remux.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: remux.c 4.2 2016/12/22 11:45:52 kls Exp $
|
* $Id: remux.c 4.3 2016/12/22 12:58:20 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "remux.h"
|
#include "remux.h"
|
||||||
@ -603,6 +603,7 @@ cPatPmtParser::cPatPmtParser(bool UpdatePrimaryDevice)
|
|||||||
|
|
||||||
void cPatPmtParser::Reset(void)
|
void cPatPmtParser::Reset(void)
|
||||||
{
|
{
|
||||||
|
completed = false;
|
||||||
pmtSize = 0;
|
pmtSize = 0;
|
||||||
patVersion = pmtVersion = -1;
|
patVersion = pmtVersion = -1;
|
||||||
pmtPids[0] = 0;
|
pmtPids[0] = 0;
|
||||||
@ -893,6 +894,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
pmtVersion = Pmt.getVersionNumber();
|
pmtVersion = Pmt.getVersionNumber();
|
||||||
|
completed = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
esyslog("ERROR: can't parse PMT");
|
esyslog("ERROR: can't parse PMT");
|
||||||
@ -1541,7 +1543,7 @@ void cFrameDetector::SetPid(int Pid, int Type)
|
|||||||
parser = new cH264Parser;
|
parser = new cH264Parser;
|
||||||
else if (type == 0x24)
|
else if (type == 0x24)
|
||||||
parser = new cH265Parser;
|
parser = new cH265Parser;
|
||||||
else if (type == 0x04 || type == 0x06) // MPEG audio or AC3 audio
|
else if (type == 0x03 || type == 0x04 || type == 0x06) // MPEG audio or AC3 audio
|
||||||
parser = new cAudioParser;
|
parser = new cAudioParser;
|
||||||
else if (type != 0)
|
else if (type != 0)
|
||||||
esyslog("ERROR: unknown stream type %d (PID %d) in frame detector", type, pid);
|
esyslog("ERROR: unknown stream type %d (PID %d) in frame detector", type, pid);
|
||||||
|
5
remux.h
5
remux.h
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: remux.h 3.4 2014/03/26 11:42:17 kls Exp $
|
* $Id: remux.h 4.1 2016/12/22 13:09:54 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __REMUX_H
|
#ifndef __REMUX_H
|
||||||
@ -361,6 +361,7 @@ private:
|
|||||||
uint16_t compositionPageIds[MAXSPIDS];
|
uint16_t compositionPageIds[MAXSPIDS];
|
||||||
uint16_t ancillaryPageIds[MAXSPIDS];
|
uint16_t ancillaryPageIds[MAXSPIDS];
|
||||||
bool updatePrimaryDevice;
|
bool updatePrimaryDevice;
|
||||||
|
bool completed;
|
||||||
protected:
|
protected:
|
||||||
int SectionLength(const uchar *Data, int Length) { return (Length >= 3) ? ((int(Data[1]) & 0x0F) << 8)| Data[2] : 0; }
|
int SectionLength(const uchar *Data, int Length) { return (Length >= 3) ? ((int(Data[1]) & 0x0F) << 8)| Data[2] : 0; }
|
||||||
public:
|
public:
|
||||||
@ -397,6 +398,8 @@ public:
|
|||||||
int Vtype(void) const { return vtype; }
|
int Vtype(void) const { return vtype; }
|
||||||
///< Returns the video stream type as defined by the current PMT, or 0 if no video
|
///< Returns the video stream type as defined by the current PMT, or 0 if no video
|
||||||
///< stream type has been detected, yet.
|
///< 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 *Apids(void) const { return apids; }
|
||||||
const int *Dpids(void) const { return dpids; }
|
const int *Dpids(void) const { return dpids; }
|
||||||
const int *Spids(void) const { return spids; }
|
const int *Spids(void) const { return spids; }
|
||||||
|
Loading…
Reference in New Issue
Block a user