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 adding cFont::Width(void) to get the default character width and allow stretched
|
||||
font drawing in high level OSDs
|
||||
for fixing regenerating the index of audio recordings
|
||||
|
||||
Eike Sauer <EikeSauer@t-online.de>
|
||||
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).
|
||||
- Added cFont::Width(void) to get the default character width and allow stretched
|
||||
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
|
||||
* 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"
|
||||
@ -2329,7 +2329,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) {
|
||||
@ -2351,9 +2351,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;
|
||||
|
6
remux.c
6
remux.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* 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"
|
||||
@ -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) // MPEG audio or AC3 audio
|
||||
parser = new cAudioParser;
|
||||
else if (type != 0)
|
||||
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
|
||||
* 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
|
||||
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user