DSMCC  17.9.0
 All Data Structures Files Functions Typedefs
Macros | Typedefs | Functions
dsm_si.c File Reference

DSM-CC SI support. More...

#include <string.h>
#include "stb_os.h"
#include "stb_filter.h"
#include "dsm_control.h"
#include "dm_debug.h"
#include "dsm_si.h"

Go to the source code of this file.

Macros

#define PAT_PID   0
 
#define PAT_TID   0
 
#define PMT_TID   2
 
#define TIMEOUT_PAT   700
 
#define TIMEOUT_PMT   1000
 
#define TIMEOUT_DEFAULT   0x7FFF
 
#define DSI_RQST_MAGIC   0xBA000000
 
#define dsmctrl   dsi->ctrl
 

Typedefs

typedef struct s_tablerequest S_TableRequest
 
typedef struct s_DsiInstance S_DsiInstance
 

Functions

U32BIT TimeoutPeriod (U8BIT tid)
 
S_TableRequest * FindTableRqst (H_DsiInstance dsi, U16BIT xid, U8BIT tid)
 
H_DsiInstance DSI_CreateInstance (H_DsmControl ctrl, F_FILTER_CALLBACK cbfunc, S_DsmccConfig *config)
 Create instance of DSI. More...
 
void DSI_DestroyInstance (H_DsiInstance dsi)
 Destroy instance created by SIQ_CreateInstance. More...
 
BOOLEAN DSI_Start (H_DsiInstance dsi, U16BIT transId, DMXREF dmxref)
 Start getting SI data from Demux. More...
 
void DSI_Stop (H_DsiInstance dsi)
 Stop getting SI data from Demux. More...
 
U32BIT DSI_RequestTable (H_DsiInstance dsi, U16BIT pid, U16BIT xid, U8BIT tid)
 Request Table data. It supplies Table soon after the call to this function, and then, whenever the Table version changes. This state continues until DSI_CancelTable is called. More...
 
void DSI_CancelTable (H_DsiInstance dsi, U32BIT rid)
 Cancel request for table data made by DSI_RequestTable() More...
 
U32BIT DSI_CheckRequests (H_DsiInstance dsi, U32BIT now)
 Check outstanding PMT (and PAT) requests to see whether any need to be refreshed. More...
 
BOOLEAN DSI_RequireTable (H_DsiInstance dsi, U8BIT *hdr, U16BIT *pXid, U8BIT *pVer)
 Check whether SI table section data is required. More...
 

Detailed Description

DSM-CC SI support.

Date
24 April 2014
Author
Adam Sturtridge

Definition in file dsm_si.c.

Function Documentation

void DSI_CancelTable ( H_DsiInstance  dsi,
U32BIT  rid 
)

Cancel request for table data made by DSI_RequestTable()

Parameters
dsiDSI instance handle
ridRequest Id returned by DSI_RequestTable()
Returns
void

Definition at line 337 of file dsm_si.c.

U32BIT DSI_CheckRequests ( H_DsiInstance  dsi,
U32BIT  now 
)

Check outstanding PMT (and PAT) requests to see whether any need to be refreshed.

Parameters
dsiDSI instance handle
Returns
U32BIT time when need to call this function again

Definition at line 373 of file dsm_si.c.

H_DsiInstance DSI_CreateInstance ( H_DsmControl  ctrl,
F_FILTER_CALLBACK  cbfunc,
S_DsmccConfig config 
)

Create instance of DSI.

Parameters
cbfuncFunction to process SI section data
configConfiguration of DSM-CC
Returns
DSI Instance handle

Definition at line 197 of file dsm_si.c.

void DSI_DestroyInstance ( H_DsiInstance  dsi)

Destroy instance created by SIQ_CreateInstance.

Parameters
H_DsiInstancedsi DSI instance handle.
Returns

Definition at line 229 of file dsm_si.c.

U32BIT DSI_RequestTable ( H_DsiInstance  dsi,
U16BIT  pid,
U16BIT  xid,
U8BIT  tid 
)

Request Table data. It supplies Table soon after the call to this function, and then, whenever the Table version changes. This state continues until DSI_CancelTable is called.

Parameters
dsiDSI instance handle
pidPID for this table
xidTable extension ID
tidTable ID (e.g. PMT is 0x02)
Returns
zero is failure, non-zero is success

Definition at line 284 of file dsm_si.c.

BOOLEAN DSI_RequireTable ( H_DsiInstance  dsi,
U8BIT *  hdr,
U16BIT *  pXid,
U8BIT *  pVer 
)

Check whether SI table section data is required.

Parameters
dsiDSI instance handle
datapointer to section data (starting at table Id byte
pXidpointer to return table extension
pVerpointer to return table version
Returns
BOOLEAN - TRUE if required, otherwise FALSE

Definition at line 439 of file dsm_si.c.

BOOLEAN DSI_Start ( H_DsiInstance  dsi,
U16BIT  transId,
DMXREF  dmxref 
)

Start getting SI data from Demux.

Parameters
dsiDSI instance handle.
transIdTransport stream ID
dmxrefDemux reference handle
Returns

Definition at line 242 of file dsm_si.c.

void DSI_Stop ( H_DsiInstance  dsi)

Stop getting SI data from Demux.

Parameters
H_DsiInstancedsi DSI instance handle.
Returns

Definition at line 253 of file dsm_si.c.