1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Reacitvated setting the PNR; adapted the frame scanning to the new muxing of the driver

This commit is contained in:
Klaus Schmidinger 2001-01-27 12:13:07 +01:00
parent 9a7deaae2e
commit 6638c15b5b
2 changed files with 19 additions and 24 deletions

View File

@ -350,10 +350,12 @@ Video Disk Recorder Revision History
- Encrypted channels can now be selected even without knowing the PNR (however, it
is still necessary for the EPG info).
2001-01-20: Version 0.71
2001-01-27: Version 0.71
- Fixed 'Transfer Mode' in cases where a non-primary interface was switched to
a channel that only the primary interface can receive (which could happen in
the EPG scanner).
- The EPG scanner now starts with the first channel (it used to start with the
second channel).
- Reacitvated setting the PNR.
- Adapted the frame scanning to the new muxing of the driver.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: dvbapi.c 1.52 2001/01/20 09:52:56 kls Exp $
* $Id: dvbapi.c 1.53 2001/01/27 11:04:55 kls Exp $
*/
#include "dvbapi.h"
@ -821,7 +821,9 @@ int cRecordBuffer::ScanVideoPacket(int *PictureType, int Offset)
int Length = GetPacketLength(Offset);
if (Length <= Available()) {
for (int i = Offset; i < Offset + Length; i++) {
int i = Offset + 8; // the minimum length of the video packet header
i += Byte(i) + 1; // possible additional header bytes
for (; i < Offset + Length; i++) {
if (Byte(i) == 0 && Byte(i + 1) == 0 && Byte(i + 2) == 1) {
switch (Byte(i + 3)) {
case SC_PICTURE: *PictureType = GetPictureType(i);
@ -840,8 +842,6 @@ int cRecordBuffer::Synchronize(void)
// Positions to the start of a data block (skipping everything up to
// an I-frame if not synced) and returns the block length.
int LastPackHeader = -1;
pictureType = NO_PICTURE;
//XXX remove this once the buffer is handled with two separate threads:
@ -853,8 +853,6 @@ int cRecordBuffer::Synchronize(void)
for (int i = 0; Available() > MINVIDEODATA && i < MINVIDEODATA; i++) {
if (Byte(i) == 0 && Byte(i + 1) == 0 && Byte(i + 2) == 1) {
switch (Byte(i + 3)) {
case SC_PHEAD: LastPackHeader = i;
break;
case SC_VIDEO: {
int pt = NO_PICTURE;
int l = ScanVideoPacket(&pt, i);
@ -866,17 +864,9 @@ int cRecordBuffer::Synchronize(void)
}
else if (pictureType == NO_PICTURE) {
if (!synced) {
if (LastPackHeader == 0) {
if (pt == I_FRAME)
synced = true;
}
else if (LastPackHeader > 0) {
Skip(LastPackHeader);
LastPackHeader = -1;
i = 0;
break;
}
else { // LastPackHeader < 0
else {
Skip(i + l);
i = 0;
break;
@ -885,13 +875,15 @@ int cRecordBuffer::Synchronize(void)
if (synced)
pictureType = pt;
}
else if (LastPackHeader > 0)
return LastPackHeader;
else
return i;
}
else if (!synced) {
Skip(i + l);
i = 0;
break;
}
i += l - 1; // -1 to compensate for i++ in the loop!
LastPackHeader = -1;
}
break;
case SC_AUDIO: i += GetPacketLength(i) - 1; // -1 to compensate for i++ in the loop!
@ -2182,7 +2174,8 @@ bool cDvbApi::SetChannel(int ChannelNumber, int FrequencyMHz, char Polarization,
freq -= Setup.LnbFrequLo;
else
freq -= Setup.LnbFrequHi;
front.pnr = 0;
front.channel_flags = Ca ? DVB_CHANNEL_CA : DVB_CHANNEL_FTA;
front.pnr = Pnr;
front.freq = freq * 1000000UL;
front.diseqc = Diseqc;
front.srate = Srate * 1000;