From 09a17d56e2a3f975a0467e8da4ca26c946b6ccf7 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 31 Jan 2010 15:42:00 +0100 Subject: =?UTF-8?q?Version=201.7.12=20-=20Changed=20the=20EVCONTENTMASK=5F?= =?UTF-8?q?*=20macros=20to=20enums=20and=20changed=20"mask"=20to=20"group"?= =?UTF-8?q?.=20-=20Updated=20the=20Estonian=20OSD=20texts=20(thanks=20to?= =?UTF-8?q?=20Arthur=20Konovalov).=20-=20The=20"Edit=20timer"=20menu=20can?= =?UTF-8?q?=20now=20set=20the=20folder=20for=20the=20recording=20from=20a?= =?UTF-8?q?=20list=20of=20=20=20folders=20stored=20in=20"folders.conf".=20?= =?UTF-8?q?-=20Updated=20the=20Italian=20OSD=20texts=20(thanks=20to=20Dieg?= =?UTF-8?q?o=20Pierotto).=20-=20If=20svdrphosts.conf=20contains=20only=20t?= =?UTF-8?q?he=20address=20of=20the=20local=20host,=20the=20SVDRP=20port=20?= =?UTF-8?q?=20=20is=20opened=20only=20for=20the=20local=20host=20(thanks?= =?UTF-8?q?=20to=20Manuel=20Reimer).=20-=20Renamed=20'runvdr'=20to=20'runv?= =?UTF-8?q?dr.template'=20and=20no=20longer=20copying=20it=20to=20the=20BI?= =?UTF-8?q?NDIR=20=20=20in=20'make=20install'=20(thanks=20to=20Martin=20Da?= =?UTF-8?q?uskardt).=20-=20Added=20plain=20text=20error=20messages=20to=20?= =?UTF-8?q?log=20entries=20from=20cOsd::SetAreas()=20(suggested=20=20=20by?= =?UTF-8?q?=20Rolf=20Ahrenberg).=20-=20cPalette::ClosestColor()=20now=20tr?= =?UTF-8?q?eats=20fully=20transparent=20colors=20as=20"equal";=20improved?= =?UTF-8?q?=20=20=20cDvbSpuBitmap::getMinBpp()=20(thanks=20to=20Matthieu?= =?UTF-8?q?=20Castet=20and=20Johann=20Friedrichs).=20-=20The=20new=20setup?= =?UTF-8?q?=20option=20"Miscellaneous/Channels=20wrap"=20controls=20whethe?= =?UTF-8?q?r=20the=20current=20=20=20channel=20wraps=20around=20the=20begi?= =?UTF-8?q?nning=20or=20end=20of=20the=20channel=20list=20when=20zapping?= =?UTF-8?q?=20(thanks=20=20=20to=20Matti=20Lehtim=C3=A4ki).=20-=20Fixed=20?= =?UTF-8?q?determining=20the=20frame=20duration=20on=20channels=20where=20?= =?UTF-8?q?the=20PTS=20deltas=20jitter=20by=20=20=20+/-1=20around=201800.?= =?UTF-8?q?=20-=20The=20PCR=20pid=20in=20generated=20PMTs=20is=20now=20set?= =?UTF-8?q?=20to=20the=20channel's=20PCR=20pid=20again.=20-=20Fixed=20dete?= =?UTF-8?q?rmining=20the=20frame=20duration=20on=20channels=20where=20the?= =?UTF-8?q?=20PTS=20deltas=20jitter=20by=20=20=20+/-1=20around=203600.=20-?= =?UTF-8?q?=20The=20PCR=20pid=20is=20now=20recorded=20for=20channels=20whe?= =?UTF-8?q?re=20this=20is=20different=20from=20the=20video=20=20=20PID.=20?= =?UTF-8?q?To=20facilitate=20this,=20the=20interfaces=20of=20cTransfer,=20?= =?UTF-8?q?cTransferControl,=20cRecorder=20=20=20and=20cReceiver=20have=20?= =?UTF-8?q?been=20modified,=20so=20that=20the=20PIDs=20are=20no=20longer?= =?UTF-8?q?=20given=20in=20separate=20=20=20parameters,=20but=20rather=20t?= =?UTF-8?q?he=20whole=20channel=20is=20handed=20down=20for=20processing.?= =?UTF-8?q?=20The=20old=20=20=20constructor=20of=20cReceiver=20is=20still?= =?UTF-8?q?=20available,=20but=20it=20is=20recommended=20to=20plugin=20aut?= =?UTF-8?q?hors=20=20=20that=20they=20switch=20to=20the=20new=20interface?= =?UTF-8?q?=20as=20soon=20as=20possible.=20=20=20When=20replaying=20such?= =?UTF-8?q?=20a=20recording,=20the=20PCR=20packets=20are=20sent=20to=20Pla?= =?UTF-8?q?yTsVideo()=20-=20The=20files=20"commands.conf"=20and=20"reccmd.?= =?UTF-8?q?conf"=20can=20now=20contain=20nested=20lists=20of=20=20=20comma?= =?UTF-8?q?nds.=20See=20vdr.5=20for=20information=20about=20the=20new=20fi?= =?UTF-8?q?le=20format.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- remux.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'remux.c') diff --git a/remux.c b/remux.c index 6d00692..070a06a 100644 --- a/remux.c +++ b/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 2.37 2009/12/29 15:56:33 kls Exp $ + * $Id: remux.c 2.41 2010/01/30 10:43:12 kls Exp $ */ #include "remux.h" @@ -144,7 +144,7 @@ void TsSetTeiOnBrokenPackets(uchar *p, int l) // --- cPatPmtGenerator ------------------------------------------------------ -cPatPmtGenerator::cPatPmtGenerator(cChannel *Channel) +cPatPmtGenerator::cPatPmtGenerator(const cChannel *Channel) { numPmtPackets = 0; patCounter = pmtCounter = 0; @@ -243,7 +243,7 @@ int cPatPmtGenerator::MakeCRC(uchar *Target, const uchar *Data, int Length) #define P_PMT_PID 0x0084 // pseudo PMT pid #define MAXPID 0x2000 // the maximum possible number of pids -void cPatPmtGenerator::GeneratePmtPid(cChannel *Channel) +void cPatPmtGenerator::GeneratePmtPid(const cChannel *Channel) { bool Used[MAXPID] = { false }; #define SETPID(p) { if ((p) >= 0 && (p) < MAXPID) Used[p] = true; } @@ -287,7 +287,7 @@ void cPatPmtGenerator::GeneratePat(void) IncVersion(patVersion); } -void cPatPmtGenerator::GeneratePmt(cChannel *Channel) +void cPatPmtGenerator::GeneratePmt(const cChannel *Channel) { // generate the complete PMT section: uchar buf[MAX_SECTION_SIZE]; @@ -295,7 +295,7 @@ void cPatPmtGenerator::GeneratePmt(cChannel *Channel) numPmtPackets = 0; if (Channel) { int Vpid = Channel->Vpid(); - int Ppid = 0x1FFF; // no PCR pid + int Ppid = Channel->Ppid(); uchar *p = buf; int i = 0; p[i++] = 0x02; // table id @@ -364,7 +364,7 @@ void cPatPmtGenerator::SetVersions(int PatVersion, int PmtVersion) pmtVersion = PmtVersion & 0x1F; } -void cPatPmtGenerator::SetChannel(cChannel *Channel) +void cPatPmtGenerator::SetChannel(const cChannel *Channel) { if (Channel) { GeneratePmtPid(Channel); @@ -402,6 +402,7 @@ void cPatPmtParser::Reset(void) patVersion = pmtVersion = -1; pmtPid = -1; vpid = vtype = 0; + ppid = 0; } void cPatPmtParser::ParsePat(const uchar *Data, int Length) @@ -486,6 +487,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length) int NumDpids = 0; int NumSpids = 0; vpid = vtype = 0; + ppid = 0; apids[0] = 0; dpids[0] = 0; spids[0] = 0; @@ -500,6 +502,7 @@ void cPatPmtParser::ParsePmt(const uchar *Data, int Length) case 0x1B: // MPEG4 vpid = stream.getPid(); vtype = stream.getStreamType(); + ppid = Pmt.getPCRPid(); break; case 0x03: // STREAMTYPE_11172_AUDIO case 0x04: // STREAMTYPE_13818_AUDIO @@ -842,10 +845,12 @@ int cFrameDetector::Analyze(const uchar *Data, int Length) // determine frame info: if (isVideo) { if (Delta % 3600 == 0) - frameDuration = 3600; // PAL, 25 fps + frameDuration = 3600; // PAL, 25 fps, exact timing + else if (abs(Delta % 3600) == 3599 || abs(Delta % 3600) == 1) + frameDuration = 3600; // PAL, 25 fps, timing with jitter else if (Delta % 3003 == 0) frameDuration = 3003; // NTSC, 29.97 fps - else if (Delta == 1800) { + else if (abs(Delta - 1800) <= 1) { frameDuration = 3600; // PAL, 25 fps framesPerPayloadUnit = -2; } -- cgit v1.2.3