/** @file DHL_PSI_Priv.h @brief DHL PSI ¸ðµâ Private header Copyright 2006~2010 Digital STREAM Technology, Inc. All Rights Reserved */ #ifndef __DHL_PSI_PRIV_H__ #define __DHL_PSI_PRIV_H__ #include "DHL_Types.h" #include "DHL_PSI.h" #ifdef __cplusplus extern "C" { #endif #if COMMENT ____Overview____(){} #endif /** @file DHL_PSI_Priv.h À̰÷¿¡ ÀÌ ¸ðµâ¿¡ ´ëÇØ ¼³¸íÀÌ ÇÊ¿äÇÑ °¢Á¾ ³»¿ë ±â¼ú.. module overview - - APIs implementations dependencies nv parameters */ #if COMMENT ____Config____(){} #endif // section ¼ö½Å½Ã crc¸¦ ´Ù½Ã Çѹø °Ë»çÇÏ°Ô ÇÑ´Ù. #define DST_CRC_RECHECK 0 //BKTODO: 1->0 // section ¼ö½Å½Ã filteringÀÌ Á¦´ë·Î µÆ´ÂÁö sw ¹æ½ÄÀ¸·Î È®ÀÎÇÏ°Ô ÇÑ´Ù. #define DST_SW_FILTERING 1 #if COMMENT ____Types____(){} #endif typedef struct { tDHL_PSI_Mode psiMode; tDHL_PSI_Update updateMode; UINT16 maxData; UINT16 maxSections; tDHL_PSI_EventProc eventProc; UINT32 userParam; } tDHL_PSI_StartParam; typedef struct { int index; // ÇÊÅÍÄÁÆ®·Ñ array(g_fc in DHL_PSI_Rx.c)ÀÇ index, ÃʱâÈ­ ÇÒ¶§ °ªÀÌ Á¤ÇØÁø´Ù. void* Filter_ID; // µå¶óÀ̹ö¿¡¼­ »ç¿ëÇÏ´Â ÇÊÅÍÀÇ ID, event ¹ß»ýÇÑ filter¸¦ ãÀ» ¶§ »ç¿ë. (pointer to smessage_stream_t) tDHL_PSI_ControlHandle handle; // psi ÇÊÅÍ ÄÁÆ®·Ñ ÇÚµé, »ç¿ëÀÚ´Â ¿ÀÁ÷ ÀÌ ÇÚµéÀ» ÅëÇØ¼­ ÇÊÅÍ ÄÁÆ®·Ñ¿¡ Á¢±Ù ÇÒ ¼ö ÀÖÀ½. BOOL active; BOOL isPaused; UINT16 pid; tDHL_PSI_Filter *pFltData; tDHL_PSI_StartParam param; // operation parameters INT32 curSection; /* The last section received */ // crc parameters UINT32 lastCRC; /* Used for psiCRCChange */ UINT32 runningCRC; /* Used to combine all CRC's for sections in table */ BOOLEAN lastCRCValid; /* TRUE if lastCRC has valid data */ // version parameters INT32 curVersion; /* Version number of previous completed section/table */ INT32 nextVersion; /* Version number for table being gathered. no meaning for section */ tDHL_PSI_DataArray *curDataArray; /* A complete descriptor waiting to be taken */ // section ¸ðµå¿¡¼­´Â Ç×»ó ¸¶Áö¸·À¸·Î ¼ö½ÅµÈ data array¸¦ °¡Áö°í ÀÖ´Ù. // »¡¸® °¡Á®°¡Áö ¾ÊÀ¸¸é »õ data·Î overwrite µÇ¾î ¹ö¸°´Ù. tDHL_PSI_DataArray *nextDataArray; /* An incomplete descriptor for data still being gathered */ // section mode¿¡¼­´Â nextDataArray´Â »ç¿ëÇÏÁö ¾Ê´Â´Ù. // debugging UINT32 receiveCount; /* Accumulated reception count of this section */ UINT32 goodCount; UINT8* pRawBuff; } tDHL_PSI_FiltCtl; #if COMMENT ____Defines____(){} #endif /* defines for flags of dhl_psi_alloc_memory.. */ #define DHL_PSI_MEMORY_SM_POOL 0x1 // alloc from SM POOL #define DHL_PSI_MEMORY_CLEAR 0x2 /* for dhl_psi_set_filter_value */ typedef enum { eFILTERATTR_TID=0x1, eFILTERATTR_CURNEXTINDICATOR=0x2, eFILTERATTR_TIDEXTENSION=0x4, eFILTERATTR_TOPFIELD=0x20, // MSB only of TID extension eFILTERATTR_BOTTOMFIELD=0x40, // LSB only of TID extension eFILTERATTR_ETMID=0x80, eFILTERATTR_FIRSTPAYLOAD=0x100, eFILTERATTR_VERSION=0x200, // do not receive specific version } tDHL_FilterAttr; #if COMMENT ____Functions____(){} #endif void dhl_psi_set_filter_value(tDHL_PSI_Filter *pFilter, tDHL_FilterAttr attrType, UINT32 value); void *dhl_psi_alloc_memory(UINT32 size, UINT32 flags); void dhl_psi_free_memory(void *block); void dhl_psi_free_data_array(tDHL_PSI_DataArray *psi); void dhl_psi_set_filter_value(tDHL_PSI_Filter *pFilter, tDHL_FilterAttr attrType, UINT32 value); /** @brief ÀÔ·ÂÀ¸·Î µé¾î¿Â psi µ¥ÀÌÅÍ·Î ÇÊÅÍ ÄÁÆ®·Ñ ³»ºÎ¿¡ data array¸¦ ¸¸µç´Ù. ¼½¼Ç¿¡ Æ÷ÇÔµÈ ±æÀÌ Á¤º¸¸¸Å­¸¸ ó¸®Çϸç ó¸®µÈ µ¥ÀÌÅÍ Å©±â¸¦ ¸®ÅÏÇÑ´Ù. @param pFltCtl[out] ÇÊÅÍ ÄÁÆ®·Ñ. pFltCtl->curDataArray¿¡ ¼½¼ÇorÅ×ÀÌºí µ¥ÀÌÅ͸¦ ÇÒ´ç. @param pdata[in] ¼ö½ÅµÈ psi µ¥ÀÌÅÍÀÇ ½ÃÀÛÁÖ¼Ò. @param len[in] ¼ö½ÅµÈ psi µ¥ÀÌÅÍÀÇ ÃÑ ±æÀÌ. ¿©·¯°³ÀÇ ¼½¼ÇÀÌ Æ÷Ç﵃ ¼ö ÀÖÀ¸¹Ç·Î ¼½¼Ç³» ±æÀÌ °ªº¸´Ù ´õ Ŭ ¼ö ÀÖÀ½. @param procLen[out] ¼ö½ÅµÈ psi µ¥ÀÌÅÍÀÇ ÃÑ ±æÀÌ. ¿©·¯°³ÀÇ ¼½¼ÇÀÌ Æ÷Ç﵃ ¼ö ÀÖÀ¸¹Ç·Î ¼½¼Ç³» ±æÀÌ °ªº¸´Ù ´õ Ŭ ¼ö ÀÖÀ½. @return ó¸®µÈ µ¥ÀÌÅÍÀÇ ±æÀÌ. */ tDHL_PSI_Event dhl_psi_post_data_received( tDHL_PSI_FiltCtl *pFltCtl, UINT8 *pdata, int len, int *procLen); void update_psi_filter(tDHL_PSI_FiltCtl *pFltCtl); // oneshot ¿ëµµ void pause_psi_filter(tDHL_PSI_FiltCtl* pFltCtl); void resume_psi_filter(tDHL_PSI_FiltCtl* pFltCtl); DHL_RESULT dhl_psi_start(tDHL_TSD tsd, UINT16 pid, tDHL_PSI_Filter *pref, tDHL_PSI_StartParam *param, tDHL_PSI_ControlHandle *pHandle); void dhl_psi_stop(tDHL_PSI_ControlHandle handle); DHL_RESULT dhl_psi_read_data(tDHL_PSI_ControlHandle handle, tDHL_PSI_DataArray **ppData); void dhl_psi_init(void); void dhl_psi_uninit(void); void dhl_psi_show(void); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* __DHL_PSI_PRIV_H__ */