mirror of
https://github.com/vdr-projects/vdr.git
synced 2025-03-01 10:50:46 +00:00
Version 1.7.9
- Fixed storing the current OSD size in case the device has changed it in its setup menu (reported by Reinhard Nissl). - Fixed cDevice::PlayTsVideo() and cDevice::PlayTsAudio() in case only part of the buffer has been accepted by the device (reported by Udo Richter). - Changed the EIT filter setup to save a few handles on devices that do hardware filtering. - Fixed deleting expired timers if they have the VPS flag set, but the event they are assigned to doesn't have a VPS tag. - Fixed handling file name length on VFAT systems in case they contain UTF-8 characters (thanks to Rolf Ahrenberg). - Fixed generating CaPmts in case audio and video are encrypted using different ECM pids. - Updated vdr.1 to use the new file names in recording directories. - Fixed cRecordings::DelByName() to avoid compilation errors with gcc 4.4 (thanks to Matthias Schwarzott). - Increased the value of MAXFRAMESIZE to better suit HD recordings (thanks to Reinhard Nissl). - Implemented full handling of subtitling descriptors (thanks to Mikko Tuumanen).
This commit is contained in:
40
ci.c
40
ci.c
@@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: ci.c 2.1 2008/04/13 13:28:52 kls Exp $
|
||||
* $Id: ci.c 2.3 2009/08/16 13:21:07 kls Exp $
|
||||
*/
|
||||
|
||||
#include "ci.h"
|
||||
@@ -551,6 +551,8 @@ bool cCiApplicationInformation::EnterMenu(void)
|
||||
|
||||
// --- cCiCaPmt --------------------------------------------------------------
|
||||
|
||||
#define MAXCASYSTEMIDS 64
|
||||
|
||||
// Ca Pmt List Management:
|
||||
|
||||
#define CPLM_MORE 0x00
|
||||
@@ -574,9 +576,10 @@ private:
|
||||
int length;
|
||||
int esInfoLengthPos;
|
||||
uint8_t capmt[2048]; ///< XXX is there a specified maximum?
|
||||
int caDescriptorsLength;
|
||||
uint8_t caDescriptors[2048];
|
||||
bool streamFlag;
|
||||
int source;
|
||||
int transponder;
|
||||
int programNumber;
|
||||
int caSystemIds[MAXCASYSTEMIDS + 1]; // list is zero terminated!
|
||||
void AddCaDescriptors(int Length, const uint8_t *Data);
|
||||
public:
|
||||
cCiCaPmt(uint8_t CmdId, int Source, int Transponder, int ProgramNumber, const int *CaSystemIds);
|
||||
@@ -589,7 +592,17 @@ public:
|
||||
cCiCaPmt::cCiCaPmt(uint8_t CmdId, int Source, int Transponder, int ProgramNumber, const int *CaSystemIds)
|
||||
{
|
||||
cmdId = CmdId;
|
||||
caDescriptorsLength = GetCaDescriptors(Source, Transponder, ProgramNumber, CaSystemIds, sizeof(caDescriptors), caDescriptors, streamFlag);
|
||||
source = Source;
|
||||
transponder = Transponder;
|
||||
programNumber = ProgramNumber;
|
||||
int i = 0;
|
||||
if (CaSystemIds) {
|
||||
for (; CaSystemIds[i]; i++)
|
||||
caSystemIds[i] = CaSystemIds[i];
|
||||
}
|
||||
caSystemIds[i] = 0;
|
||||
uint8_t caDescriptors[512];
|
||||
int caDescriptorsLength = GetCaDescriptors(source, transponder, programNumber, caSystemIds, sizeof(caDescriptors), caDescriptors, 0);
|
||||
length = 0;
|
||||
capmt[length++] = CPLM_ONLY;
|
||||
capmt[length++] = (ProgramNumber >> 8) & 0xFF;
|
||||
@@ -597,8 +610,9 @@ cCiCaPmt::cCiCaPmt(uint8_t CmdId, int Source, int Transponder, int ProgramNumber
|
||||
capmt[length++] = 0x01; // version_number, current_next_indicator - apparently vn doesn't matter, but cni must be 1
|
||||
esInfoLengthPos = length;
|
||||
capmt[length++] = 0x00; // program_info_length H (at program level)
|
||||
capmt[length++] = 0x00; // program_info_length L
|
||||
if (!streamFlag)
|
||||
capmt[length++] = 0x01; // program_info_length L
|
||||
capmt[length++] = cmdId;
|
||||
if (caDescriptorsLength > 0)
|
||||
AddCaDescriptors(caDescriptorsLength, caDescriptors);
|
||||
}
|
||||
|
||||
@@ -610,14 +624,17 @@ void cCiCaPmt::SetListManagement(uint8_t ListManagement)
|
||||
void cCiCaPmt::AddPid(int Pid, uint8_t StreamType)
|
||||
{
|
||||
if (Pid) {
|
||||
uint8_t caDescriptors[512];
|
||||
int caDescriptorsLength = GetCaDescriptors(source, transponder, programNumber, caSystemIds, sizeof(caDescriptors), caDescriptors, Pid);
|
||||
//XXX buffer overflow check???
|
||||
capmt[length++] = StreamType;
|
||||
capmt[length++] = (Pid >> 8) & 0xFF;
|
||||
capmt[length++] = Pid & 0xFF;
|
||||
esInfoLengthPos = length;
|
||||
capmt[length++] = 0x00; // ES_info_length H (at ES level)
|
||||
capmt[length++] = 0x00; // ES_info_length L
|
||||
if (streamFlag)
|
||||
capmt[length++] = 0x01; // ES_info_length L
|
||||
capmt[length++] = cmdId;
|
||||
if (caDescriptorsLength > 0)
|
||||
AddCaDescriptors(caDescriptorsLength, caDescriptors);
|
||||
}
|
||||
}
|
||||
@@ -625,8 +642,7 @@ void cCiCaPmt::AddPid(int Pid, uint8_t StreamType)
|
||||
void cCiCaPmt::AddCaDescriptors(int Length, const uint8_t *Data)
|
||||
{
|
||||
if (esInfoLengthPos) {
|
||||
if (length + Length < int(sizeof(capmt))) {
|
||||
capmt[length++] = cmdId;
|
||||
if (length + Length <= int(sizeof(capmt))) {
|
||||
memcpy(capmt + length, Data, Length);
|
||||
length += Length;
|
||||
int l = length - esInfoLengthPos - 2;
|
||||
@@ -643,8 +659,6 @@ void cCiCaPmt::AddCaDescriptors(int Length, const uint8_t *Data)
|
||||
|
||||
// --- cCiConditionalAccessSupport -------------------------------------------
|
||||
|
||||
#define MAXCASYSTEMIDS 64
|
||||
|
||||
// CA Enable Ids:
|
||||
|
||||
#define CAEI_POSSIBLE 0x01
|
||||
|
||||
Reference in New Issue
Block a user