FireBirdLib - Topfield TMS PVR TAP Programming Library
HDD_GetPvrRecTsInfoPointer.c
Go to the documentation of this file.
1#include <string.h>
2#include "FBLib_rec.h"
3
5{
7
8 static byte *__pvrRecTsInfo = NULL;
9 static byte *__pvrRecTsPlayInfo = NULL;
10 static int infSize = 1412;
11 byte *ret;
12
13 if(Slot > HDD_NumberOfRECSlots())
14 {
15 TRACEEXIT();
16 return NULL;
17 }
18
19 if(!HDD_GetRecSlotFiles(Slot, NULL, NULL, NULL))
20 {
21 TRACEEXIT();
22 return NULL;
23 }
24
25 if(!__pvrRecTsInfo)
26 {
27 __pvrRecTsInfo = (byte*)FIS_vPvrRecTsInfo();
28 if(!__pvrRecTsInfo)
29 {
30 TRACEEXIT();
31 return NULL;
32 }
33 }
34
35 if(!__pvrRecTsPlayInfo)
36 {
37 __pvrRecTsPlayInfo = (byte*)FIS_vPvrRecTsPlayInfo();
38 if(!__pvrRecTsPlayInfo)
39 {
40 TRACEEXIT();
41 return NULL;
42 }
43
44 infSize = ((dword)__pvrRecTsPlayInfo - (dword)__pvrRecTsInfo) / (HDD_NumberOfRECSlots() + 1);
45 }
46
47 ret = &__pvrRecTsInfo[infSize * Slot];
48
49 TRACEEXIT();
50 return ret;
51}
dword FIS_vPvrRecTsInfo(void)
dword FIS_vPvrRecTsPlayInfo(void)
byte * HDD_GetPvrRecTsInfoPointer(byte Slot)
bool HDD_GetRecSlotFiles(byte Slot, TYPE_File **RecFile, TYPE_File **InfFile, TYPE_File **NavFile)
#define TRACEEXIT()
Definition: libFireBird.h:1244
#define TRACEENTER()
Definition: libFireBird.h:1243
dword HDD_NumberOfRECSlots(void)