Added 'StreamType' setting to CAM communication

This commit is contained in:
Klaus Schmidinger 2003-12-23 10:34:51 +01:00
parent 5433caa410
commit 1d32f7c059
5 changed files with 16 additions and 11 deletions

View File

@ -880,3 +880,6 @@ Alessio Sangalli <alesan@manoweb.com>
Pedro Miguel Sequeira de Justo Teixeira <pedro.miguel.teixeira@bigfoot.com> Pedro Miguel Sequeira de Justo Teixeira <pedro.miguel.teixeira@bigfoot.com>
for reporting a problem with crc32 in SI handling on 64bit systems for reporting a problem with crc32 in SI handling on 64bit systems
for reporting an alignment problem in CAM access on 64bit systems for reporting an alignment problem in CAM access on 64bit systems
Antonino Sergi <voyaser@tiscalinet.it>
for adding 'StreamType' setting to CAM communication

View File

@ -2470,7 +2470,7 @@ Video Disk Recorder Revision History
- Final release of version 1.2.6. - Final release of version 1.2.6.
2003-12-22: Version 1.3.0 2003-12-23: Version 1.3.0
- Changed thread handling to make it work with NPTL ("Native Posix Thread Library"). - Changed thread handling to make it work with NPTL ("Native Posix Thread Library").
Thanks to Jon Burgess, Andreas Schultz, Werner Fink and Stefan Huelswitt. Thanks to Jon Burgess, Andreas Schultz, Werner Fink and Stefan Huelswitt.
@ -2506,3 +2506,5 @@ Video Disk Recorder Revision History
Miguel Sequeira de Justo Teixeira for reporting this one). Miguel Sequeira de Justo Teixeira for reporting this one).
- Fixed an alignment problem in CAM access on 64bit systems (thanks to Pedro - Fixed an alignment problem in CAM access on 64bit systems (thanks to Pedro
Miguel Sequeira de Justo Teixeira for reporting this one). Miguel Sequeira de Justo Teixeira for reporting this one).
- Added 'StreamType' setting to CAM communication, which is important for
Aston/SECA CAMs (thanks to Antonino Sergi).

6
ci.c
View File

@ -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: ci.c 1.18 2003/12/22 15:52:31 kls Exp $ * $Id: ci.c 1.19 2003/12/23 10:19:56 kls Exp $
*/ */
/* XXX TODO /* XXX TODO
@ -1278,10 +1278,10 @@ cCiCaPmt::cCiCaPmt(int ProgramNumber)
capmt[length++] = 0x00; // program_info_length L capmt[length++] = 0x00; // program_info_length L
} }
void cCiCaPmt::AddPid(int Pid) void cCiCaPmt::AddPid(int Pid, uint8_t StreamType)
{ {
//XXX buffer overflow check??? //XXX buffer overflow check???
capmt[length++] = 0x00; //XXX stream_type (apparently doesn't matter) capmt[length++] = StreamType;
capmt[length++] = (Pid >> 8) & 0xFF; capmt[length++] = (Pid >> 8) & 0xFF;
capmt[length++] = Pid & 0xFF; capmt[length++] = Pid & 0xFF;
esInfoLengthPos = length; esInfoLengthPos = length;

4
ci.h
View File

@ -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: ci.h 1.9 2003/10/26 12:22:09 kls Exp $ * $Id: ci.h 1.10 2003/12/23 10:20:59 kls Exp $
*/ */
#ifndef __CI_H #ifndef __CI_H
@ -68,7 +68,7 @@ private:
uint8_t capmt[2048]; ///< XXX is there a specified maximum? uint8_t capmt[2048]; ///< XXX is there a specified maximum?
public: public:
cCiCaPmt(int ProgramNumber); cCiCaPmt(int ProgramNumber);
void AddPid(int Pid); void AddPid(int Pid, uint8_t StreamType);
void AddCaDescriptor(int Length, uint8_t *Data); void AddCaDescriptor(int Length, uint8_t *Data);
}; };

View File

@ -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: dvbdevice.c 1.73 2003/12/22 10:52:24 kls Exp $ * $Id: dvbdevice.c 1.74 2003/12/23 10:23:16 kls Exp $
*/ */
#include "dvbdevice.h" #include "dvbdevice.h"
@ -279,13 +279,13 @@ void cDvbTuner::Action(void)
cCiCaPmt CaPmt(channel.Sid()); cCiCaPmt CaPmt(channel.Sid());
CaPmt.AddCaDescriptor(length, buffer); CaPmt.AddCaDescriptor(length, buffer);
if (channel.Vpid()) if (channel.Vpid())
CaPmt.AddPid(channel.Vpid()); CaPmt.AddPid(channel.Vpid(), 2);
if (channel.Apid1()) if (channel.Apid1())
CaPmt.AddPid(channel.Apid1()); CaPmt.AddPid(channel.Apid1(), 4);
if (channel.Apid2()) if (channel.Apid2())
CaPmt.AddPid(channel.Apid2()); CaPmt.AddPid(channel.Apid2(), 4);
if (channel.Dpid1()) if (channel.Dpid1())
CaPmt.AddPid(channel.Dpid1()); CaPmt.AddPid(channel.Dpid1(), 0);
if (ciHandler->SetCaPmt(CaPmt, Slot)) { if (ciHandler->SetCaPmt(CaPmt, Slot)) {
tunerStatus = tsCam; tunerStatus = tsCam;
startTime = 0; startTime = 0;