| 1 | /** |
|---|
| 2 | @file |
|---|
| 3 | DLIB_PSIP_Monitor.h |
|---|
| 4 | |
|---|
| 5 | @brief |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | */ |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | #ifndef __DLIB_PSIP_MONITOR_H__ |
|---|
| 12 | #define __DLIB_PSIP_MONITOR_H__ |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | #include "DHL_PSI.h" |
|---|
| 16 | #include "DHL_Demux.h" |
|---|
| 17 | |
|---|
| 18 | #include "DLIB_PSIP.h" |
|---|
| 19 | |
|---|
| 20 | |
|---|
| 21 | #ifdef __cplusplus |
|---|
| 22 | extern "C" { |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | |
|---|
| 27 | #if COMMENT |
|---|
| 28 | ____Overview____(){} |
|---|
| 29 | #endif |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | #if COMMENT |
|---|
| 34 | ____Config____(){} |
|---|
| 35 | #endif |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | #if COMMENT |
|---|
| 40 | ____Types____(){} |
|---|
| 41 | #endif |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | |
|---|
| 45 | |
|---|
| 46 | #if COMMENT |
|---|
| 47 | ____Defines____(){} |
|---|
| 48 | #endif |
|---|
| 49 | |
|---|
| 50 | |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | #if COMMENT |
|---|
| 56 | ____API____(){} |
|---|
| 57 | #endif |
|---|
| 58 | |
|---|
| 59 | /** @name Asynchronous Monitor calls |
|---|
| 60 | @{ |
|---|
| 61 | The set of asynchronous monitor functions allow continuous or one-time monitoring |
|---|
| 62 | of ATSC PSIP sections and/or tables. For a detailed description of these |
|---|
| 63 | parameters, see the explanation in PSI.h. |
|---|
| 64 | |
|---|
| 65 | Parameter Description \n |
|---|
| 66 | tsd - Specifies from which Transport Stream Demultiplexor the monitored stream is coming. |
|---|
| 67 | psiMode - Specifies the notification type for PSIP sections. For PSIP |
|---|
| 68 | applications, one of the following PSIMode options should be |
|---|
| 69 | used: |
|---|
| 70 | sectionMode: Event triggered for each section received. |
|---|
| 71 | tableMode: Event triggered when a complete table received. |
|---|
| 72 | eagerTableMode: Event triggered for each new section of a |
|---|
| 73 | table as well as an event when the table is |
|---|
| 74 | complete. |
|---|
| 75 | |
|---|
| 76 | For the STT, MGT, RRT, and ETT tables, the PSIMode is internally set to sectionMode |
|---|
| 77 | because these tables reside within a single section. |
|---|
| 78 | |
|---|
| 79 | updateMode - Specifies the update frequency of the monitor. For PSIP applications, |
|---|
| 80 | one of the following tDHL_PSI_Update options should be used: |
|---|
| 81 | psiOneShot: Section or table event triggered only once. |
|---|
| 82 | psiVersionChange:Table trigger reset when version changes. |
|---|
| 83 | psiContinuous: Sections/Tables continously trigger events. |
|---|
| 84 | |
|---|
| 85 | eventProc - The callback function to receive monitor events. |
|---|
| 86 | |
|---|
| 87 | userParam - A user-specified field which is sent to the eventProc callback |
|---|
| 88 | function with events. |
|---|
| 89 | |
|---|
| 90 | **psiCtl - Returns a pointer to the Monitor descriptor to the caller. This identifies the |
|---|
| 91 | specific PSI monitor and can be used to cancel a set monitor. |
|---|
| 92 | |
|---|
| 93 | */ |
|---|
| 94 | DHL_RESULT MonitorStt (tDHL_TSD tsd, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, |
|---|
| 95 | UINT32 userData, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 96 | DHL_RESULT MonitorMgt (tDHL_TSD tsd, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, |
|---|
| 97 | UINT32 userData, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 98 | DHL_RESULT MonitorTvct (tDHL_TSD tsd, tDHL_PSI_Mode psiMode, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, |
|---|
| 99 | UINT32 userParam, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 100 | DHL_RESULT MonitorCvct (tDHL_TSD tsd, tDHL_PSI_Mode psiMode, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, |
|---|
| 101 | UINT32 userParam, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 102 | DHL_RESULT MonitorRrt (tDHL_TSD tsd, UINT8 region, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, UINT32 userData, |
|---|
| 103 | tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 104 | DHL_RESULT MonitorEit (tDHL_TSD tsd, UINT16 PID, UINT16 source_id, tDHL_PSI_Mode psiMode, tDHL_PSI_Update updateMode, |
|---|
| 105 | tDHL_PSI_EventProc eventProc, UINT32 userParam, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 106 | DHL_RESULT MonitorEtt (tDHL_TSD tsd, UINT16 PID, UINT32 ETM_id, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, |
|---|
| 107 | UINT32 userData, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 108 | DHL_RESULT MonitorDcct (tDHL_TSD tsd, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, |
|---|
| 109 | UINT32 userData, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 110 | DHL_RESULT MonitorDccsct (tDHL_TSD tsd, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, |
|---|
| 111 | UINT32 userData, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 112 | DHL_RESULT MonitorEAS(tDHL_TSD tsd, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, |
|---|
| 113 | UINT32 userParam, tDHL_PSI_ControlHandle *psiCtl); |
|---|
| 114 | /*@}*/ |
|---|
| 115 | |
|---|
| 116 | /** @name Synchronous calls |
|---|
| 117 | @{ |
|---|
| 118 | The set of synchronous monitor functions allow one-time retrieval of a PSIP |
|---|
| 119 | section or table. The function suspends until the data is retrieved from the |
|---|
| 120 | Transport Stream or until the timeOut period expires. For the STT, MGT, RRT, |
|---|
| 121 | and ETT a section is returned. For the TVCT, CVCT, and EIT, a table is returned. |
|---|
| 122 | |
|---|
| 123 | The timeout period 'timeOut' is specified in milliseconds. |
|---|
| 124 | |
|---|
| 125 | The parsed section/table must be freed using FreeAtscSection()/FreeAtscTable(). |
|---|
| 126 | */ |
|---|
| 127 | DHL_RESULT GetSttSection (tDHL_TSD tsd, sttSectionPtr_t *sttSectPtr, int timeOut); |
|---|
| 128 | DHL_RESULT GetMgtSection (tDHL_TSD tsd, mgtSectionPtr_t *mgtSectPtr, int timeOut); |
|---|
| 129 | DHL_RESULT GetRrtSection (tDHL_TSD tsd, UINT8 region, rrtSectionPtr_t *rrtSectPtr, int timeOut); |
|---|
| 130 | DHL_RESULT GetEttSection (tDHL_TSD tsd, UINT16 PID, UINT32 ETM_id, ettSectionPtr_t *ettSectPtr, int timeOut); |
|---|
| 131 | DHL_RESULT GetDcctSection (tDHL_TSD tsd, dcctSectionPtr_t *dcctSectPtr, int timeOut); |
|---|
| 132 | DHL_RESULT GetDccsctSection (tDHL_TSD tsd, dccsctSectionPtr_t *dccsctSectPtr, int timeOut); |
|---|
| 133 | DHL_RESULT GetEASSection (tDHL_TSD tsd, easSectionPtr_t *easSectPtr, int timeOut); |
|---|
| 134 | |
|---|
| 135 | DHL_RESULT GetTvct (tDHL_TSD tsd, tvctPtr_t *tvctPtr, int timeOut); |
|---|
| 136 | DHL_RESULT GetCvct (tDHL_TSD tsd, cvctPtr_t *cvctPtr, int timeOut); |
|---|
| 137 | DHL_RESULT GetEit (tDHL_TSD tsd, UINT16 PID, UINT16 source_id, eitPtr_t *eitPtr, int timeOut); |
|---|
| 138 | /*@}*/ |
|---|
| 139 | |
|---|
| 140 | |
|---|
| 141 | #ifdef __cplusplus |
|---|
| 142 | } /* extern "C" */ |
|---|
| 143 | #endif |
|---|
| 144 | |
|---|
| 145 | |
|---|
| 146 | |
|---|
| 147 | #endif /* __DLIB_PSIP_MONITOR_H__ */ |
|---|
| 148 | |
|---|