From 93a94b18b540fbcb9bcdaaea9abd26cdf23d6ee6 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 4 Jan 2004 18:00:00 +0100 Subject: Version 1.3.0 - Changed thread handling to make it work with NPTL ("Native Posix Thread Library"). Thanks to Jon Burgess, Andreas Schultz, Werner Fink and Stefan Huelswitt. - The cThread class now accepts a 'Description' parameter, which is used to log the beginning and end of the thread, together with its process and thread id. For descriptions that need additional parameters you can use the function cThread::SetDescription(), which accepts 'printf()' like arguments. Existing plugins that use threads should be changed to use this functionality instead of explicit 'dsyslog()' calls inside their Action() function in order to support logging the thread ids. - Added "Slovak Link" and "Czech Link" to 'ca.conf' (thanks to Emil Petersky). However, 'ca.conf' is now pretty much obsolete due to the automatic CA handling. - Mutexes are now created with PTHREAD_MUTEX_ERRORCHECK_NP, which makes the 'lockingTid' stuff obsolete (thanks to Stefan Huelswitt). - Changed font handling to allow language specific character sets. - Adopted the small font character set from the "Elchi" patch (originally provided by Alessio Sangalli). - Greek language texts now use iso8859-7 character set (thanks to Dimitrios Dimitrakos). - Rearranged section data handling, so that the actual data handling can be done separately, even from within plugins. - The EPG data structures have been moved from eit.[hc] to epg.[hc] and have been adapted to the general VDR coding style. Plugins that use these data structures may need to change some function names (which should be obvious). The name 'subtitle' has been changed to 'shortText' to avoid clashes with actual subtitles that are part of a movie. The name 'extendedDescription' has been shortened to 'description'. - Replaced 'libdtv' with 'libsi' (thanks to Marcel Wiesweg), which is thread safe and can be used by multiple section filters simultaneously. - Added 'cRwLock' to 'thread.[hc]'. Note that all plugin Makefiles need to define _GNU_SOURCE for this to work (see the example plugin Makefiles and 'newplugin'). - Fixed a problem with crc32 in SI handling on 64bit systems (thanks to Pedro Miguel Sequeira de Justo Teixeira for reporting this one). - Fixed an alignment problem in CAM access on 64bit systems (thanks to Pedro 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). - Now the CA descriptors are sent to the CAM in the 'program' or 'ES level' sections, depending on where they are found in the PMT (thanks to Hans-Peter Raschke for reporting this one). This should make SkyCrypt CAMs work. - Now using the 'version number' of EPG events to avoid unnecessary work. - Channel data is now automatically derived from the DVB data stream (inspired by the 'autopid' patch from Andreas Schultz). - The current channel is now automatically re-tuned if the PIDs or other settings change. If a recording is going on on a channel that has a change in its settings, the recording will be stopped and immediately restarted to use the new channel settings. - EPG events now use the complete channel ID with NID, TID and SID. - Channel names in 'channels.conf' can now have a short form, as provided by some tv stations (see man vdr(5)). Currently channels that provide short names in addition to long ones are listed in the OSD as "short,long name", as in "RTL,RTL Television". The short names will be used explicitly later. - The Ca parameter in 'channels.conf' has been extended and now contains all the CA system ids for the given channel. When switching to a channel VDR now tests for a device that provides one of these CA system ids. The devices automatically get their supported ids from the CI handler. - The values in 'ca.conf' are currently without any real meaning. Whether or not a channel with conditional access can be received is now determined automatically by evaluating its CA descriptors and comparing them to the CA system ids provided by the installed CAM. Only the special values 1-16 are used to assign a channel to a particular device. - Increased the maximum number of possible OSD colors to 256. - Limited the line length in the EPG bugfix report, which appears to fix a buffer overflow that caused a crash when cleaning up the EPG data (at 05:00 in the morning). --- libdtv/liblx/liblx.h | 449 --------------------------------------------------- 1 file changed, 449 deletions(-) delete mode 100644 libdtv/liblx/liblx.h (limited to 'libdtv/liblx/liblx.h') diff --git a/libdtv/liblx/liblx.h b/libdtv/liblx/liblx.h deleted file mode 100644 index 2e12295..0000000 --- a/libdtv/liblx/liblx.h +++ /dev/null @@ -1,449 +0,0 @@ -/* - * - * liblx.h: definitions necessary for the liblx package - * - * - * $Revision: 1.2 $ - * $Date: 2001/06/25 19:39:00 $ - * $Author: hakenes $ - * - * (C) 1992-2001 Rolf Hakenes , under the GNU GPL. - * - * liblx is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * liblx is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You may have received a copy of the GNU General Public License - * along with liblx; see the file COPYING. If not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - * - */ - -#ifndef LIBLX_H -#define LIBLX_H - -#ifndef NULL -#define NULL 0 -#endif - - -/* - * - * list support structures - * - */ -struct NODE -{ - struct NODE *Succ; - struct NODE *Pred; - char *Name; - unsigned short HashKey; -}; - -struct LIST -{ - struct NODE *Head; - struct NODE *Tail; - char *Name; - unsigned long Size; -}; - - -/* - * - * memory managment structures - * - */ -struct MEM_ENTRY -{ - struct MEM_ENTRY *Succ; - struct MEM_ENTRY *Pred; - unsigned long Size; -}; - -struct MEM_CHUNK -{ - struct MEM_CHUNK *Succ; - struct MEM_CHUNK *Pred; - unsigned long Size; - struct MEM_ENTRY *FirstFreeMemEntry; - struct MEM_ENTRY *FirstUsedMemEntry; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * - * list functions (package xList) - * - */ - unsigned short xHashKey (char *); - struct LIST *xNewList (char *); - struct NODE *xNewNode (char *, unsigned long); - struct NODE *xFindName (struct LIST *, char *); -/* - * - * memory management - * - */ - void xMemAllo (unsigned long, unsigned char **); - void xMemFre (unsigned char *); - void xMemFreeAll (struct MEM_CHUNK **); - void xMemMerge (struct MEM_CHUNK **); - struct MEM_CHUNK **xGetRemember (void); - void xSetRemember (struct MEM_CHUNK **); - void xPrintMemList (struct MEM_CHUNK **); - unsigned long xGetMemSize (struct MEM_CHUNK **); -extern unsigned long xAllocatedMemory; - char *xSetText (char *); - -#ifdef __cplusplus -} -#endif - - -#define MEM_CHUNK_SIZE 65536 - -#define xMemAlloc(size, ptr) \ - xMemAllo (((unsigned long)((size))), ((unsigned char **)((ptr)))) -#define xMemFree(ptr) xMemFre (((unsigned char *)((ptr)))) -/* - * - * list support macros - * - */ -/*---------------------------------------------------------------------* - | | - | xCreateNode (NodeStruct,Name) allocates a correctly sized and | - | typed node struct. | - | | - *---------------------------------------------------------------------*/ -#define xCreateNode(NodeStruct,Name) \ - (NodeStruct) = (void *) xNewNode(Name, sizeof(*(NodeStruct))) - - -/*---------------------------------------------------------------------* - | | - | xSize (List) scans for the ->Size field of a list struct | - | | - *---------------------------------------------------------------------*/ -#define xSize(List) ((List) ? ((struct LIST *)(List))->Size : 0) - - -/*---------------------------------------------------------------------* - | | - | xName (NodeStruct) scans for the ->Node.Name of a node struct | - | | - *---------------------------------------------------------------------*/ -#define xName(NodeStruct) (((struct NODE *)(NodeStruct))->Name) - - -/*---------------------------------------------------------------------* - | | - | xSucc (NodeStruct) scans for the ->Node.Succ of a node struct | - | | - *---------------------------------------------------------------------*/ -#define xSucc(NodeStruct) (((struct NODE *)(NodeStruct))->Succ) - - -/*---------------------------------------------------------------------* - | | - | xPred (NodeStruct) scans for the ->Node.Pred of a node struct | - | | - *---------------------------------------------------------------------*/ -#define xPred(NodeStruct) (((struct NODE *)(NodeStruct))->Pred) - - -/*---------------------------------------------------------------------* - | | - | xForeach(List,NodeStruct) builds a loop to process each list | - | element. | - | | - *---------------------------------------------------------------------*/ -#define xForeach(List,NodeStruct) \ - if (List) for ((NodeStruct) = (void *) ((struct LIST *)(List))->Head; \ - (NodeStruct); (NodeStruct) = (void *) xSucc (NodeStruct)) - - -/*---------------------------------------------------------------------* - | | - | xForeachReverse(List,NodeStruct) builds a loop to process each | - | element in reverse order. | - | | - *---------------------------------------------------------------------*/ -#define xForeachReverse(List,NodeStruct) \ - if (List) for ((NodeStruct) = (void *) ((struct LIST *)(List))->Tail; \ - NodeStruct; (NodeStruct) = (void *) xPred (NodeStruct)) - - -/*---------------------------------------------------------------------* - | | - | xRemove(List,NodeStruct) unchains a node struct out of a list. | - | | - *---------------------------------------------------------------------*/ -#define xRemove(List,NodeStruct) \ - do \ - { \ - struct NODE *TmpNode; \ - struct LIST *TmpList; \ - \ - TmpNode = ((struct NODE *)(NodeStruct)); \ - TmpList = ((struct LIST *)(List)); \ - \ - if (TmpNode->Pred) \ - (TmpNode->Pred)->Succ = TmpNode->Succ; \ - else TmpList->Head = TmpNode->Succ; \ - if (TmpNode->Succ) \ - (TmpNode->Succ)->Pred = TmpNode->Pred; \ - else TmpList->Tail = TmpNode->Pred; \ - TmpList->Size --; \ - } while (0) - - -/************************************************************************* - * * - * function : xAddHead * - * * - * arguments : List - pointer to a LIST structure * - * * - * Node - pointer to a NODE structure * - * * - *-----------------------------------------------------------------------* - * * - * xAddHead() inserts 'Node' at the head of 'List'. * - * * - *************************************************************************/ -#define xAddHead(List, NodeStruct) \ - do { \ - struct NODE *TmpNode; \ - struct LIST *TmpList; \ - \ - TmpNode = ((struct NODE *)(NodeStruct)); \ - TmpList = ((struct LIST *)(List)); \ - \ - if (TmpList->Head) { \ - TmpNode->Pred = NULL; \ - TmpNode->Succ = TmpList->Head; \ - (TmpList->Head)->Pred = TmpNode; \ - TmpList->Head = TmpNode; } \ - else { \ - TmpList->Head = TmpNode; \ - TmpList->Tail = TmpNode; \ - TmpNode->Pred = NULL; \ - TmpNode->Succ = NULL; } \ - TmpList->Size++; \ - } while (0) - - -/************************************************************************* - * * - * function : xAddTail * - * * - * arguments : List - pointer to a LIST structure * - * * - * Node - pointer to a NODE structure * - * * - *-----------------------------------------------------------------------* - * * - * xAddTail() inserts 'Node' at the tail of 'List'. * - * * - *************************************************************************/ -#define xAddTail(List, NodeStruct) \ - do { \ - struct NODE *TmpNode; \ - struct LIST *TmpList; \ - \ - TmpNode = ((struct NODE *)(NodeStruct)); \ - TmpList = ((struct LIST *)(List)); \ - \ - if (TmpList->Head) { \ - TmpNode->Succ = NULL; \ - TmpNode->Pred = TmpList->Tail; \ - (TmpList->Tail)->Succ = TmpNode; \ - TmpList->Tail = TmpNode; } \ - else { \ - TmpList->Head = TmpNode; \ - TmpList->Tail = TmpNode; \ - TmpNode->Pred = NULL; \ - TmpNode->Succ = NULL; } \ - TmpList->Size++; \ - } while (0) - - -/************************************************************************* - * * - * function : xRemHead * - * * - * arguments : List - pointer to a LIST structure * - * * - *-----------------------------------------------------------------------* - * * - * xRemHead() removes a Node from head of 'List'. * - * * - *************************************************************************/ -#define xRemHead(List) \ - do { \ - struct LIST *TmpList; \ - \ - TmpList = ((struct LIST *)(List)); \ - \ - if (TmpList->Head) \ - { \ - TmpList->Head = (TmpList->Head)->Succ; \ - if (TmpList->Head) (TmpList->Head)->Pred = NULL; \ - else TmpList->Tail = NULL; \ - TmpList->Size--; \ - } \ - } while (0) - - -/************************************************************************* - * * - * function : xRemTail * - * * - * arguments : List - pointer to a LIST structure * - * * - *-----------------------------------------------------------------------* - * * - * xRemTail() removes a Node from the tail of 'List'. * - * * - *************************************************************************/ -#define xRemTail(List) \ - do { \ - struct LIST *TmpList; \ - \ - TmpList = ((struct LIST *)(List)); \ - \ - if (TmpList->Tail) \ - { \ - TmpList->Tail = (TmpList->Tail)->Pred; \ - if (TmpList->Tail) (TmpList->Tail)->Succ = NULL; \ - else TmpList->Head = NULL; \ - TmpList->Size--; \ - } \ - } while (0) - - -/************************************************************************* - * * - * function : xConCat * - * * - * arguments : DestinationList - pointer to the destination * - * LIST structure * - * * - * SourceList - pointer to the source LIST structure * - * * - *-----------------------------------------------------------------------* - * * - * xConCat() concats 'SourceList' with 'DestinationList' and clears * - * 'SourceList'. * - * * - *************************************************************************/ -#define xConCat(DestinationList, SourceList) \ - do { \ - struct LIST *SrcList; \ - struct LIST *DstList; \ - \ - SrcList = ((struct LIST *)(SourceList)); \ - DstList = ((struct LIST *)(DestinationList)); \ - \ - if (DstList && SrcList) \ - { \ - if (DstList->Head) { \ - if (SrcList->Head) { \ - (DstList->Tail)->Succ = SrcList->Head; \ - (SrcList->Head)->Pred = DstList->Tail; \ - DstList->Tail = SrcList->Tail; \ - DstList->Size += SrcList->Size; \ - SrcList->Size = 0; \ - SrcList->Head = NULL; \ - SrcList->Tail = NULL; } } \ - else { \ - DstList->Head = SrcList->Head; \ - DstList->Tail = SrcList->Tail; \ - DstList->Size += SrcList->Size; \ - SrcList->Size = 0; \ - SrcList->Head = NULL; \ - SrcList->Tail = NULL; } \ - } \ - else if (SrcList) ((struct LIST *)(DestinationList)) = SrcList; \ - } while (0) - - - -#define xJoinList(SourceList, DestinationList, NodeStruct) \ - do { \ - struct NODE *KeyNode; \ - struct NODE *TmpNode; \ - struct LIST *SrcList; \ - struct LIST *DstList; \ - \ - KeyNode = ((struct NODE *)(NodeStruct)); \ - SrcList = ((struct LIST *)(SourceList)); \ - DstList = ((struct LIST *)(DestinationList)); \ - \ - if (SrcList->Head) \ - { \ - TmpNode = KeyNode->Succ; \ - KeyNode->Succ = SrcList->Head; \ - SrcList->Tail->Succ = TmpNode; \ - SrcList->Head->Pred = KeyNode; \ - if (!TmpNode) DstList->Tail = SrcList->Tail; \ - else TmpNode->Pred = SrcList->Tail; \ - DstList->Size += SrcList->Size; \ - SrcList->Size = 0; \ - SrcList->Head = NULL; \ - SrcList->Tail = NULL; \ - } \ - } while (0) - -#define xJoin(SourceNode, DestinationList, NodeStruct) \ - do { \ - struct NODE *KeyNode; \ - struct NODE *TmpNode; \ - struct NODE *SrcNode; \ - struct LIST *DstList; \ - \ - KeyNode = ((struct NODE *)(NodeStruct)); \ - SrcNode = ((struct NODE *)(SourceNode)); \ - DstList = ((struct LIST *)(DestinationList)); \ - \ - if (SrcNode) \ - { \ - TmpNode = KeyNode->Succ; \ - KeyNode->Succ = SrcNode; \ - SrcNode->Succ = TmpNode; \ - SrcNode->Pred = KeyNode; \ - if (!TmpNode) DstList->Tail = SrcNode; \ - else TmpNode->Pred = SrcNode; \ - DstList->Size += 1; \ - } \ - } while (0) - -#define xClearList(SrcList) \ - do { \ - (SrcList)->Size = 0; \ - (SrcList)->Head = NULL; \ - (SrcList)->Tail = NULL; \ - } while (0) - -#define xSetName(nodestruct, name) \ - do { \ - struct NODE *TmpNode; \ - \ - TmpNode = (struct NODE *) (nodestruct); \ - \ - TmpNode->Name = xSetText (name); \ - TmpNode->HashKey = xHashKey (name); \ - } while (0) - -#endif -- cgit v1.2.3