/* DMW_ChannelDemux.h header file for ChannelDemux module various advanced Table Reception API */ #ifndef __DMW_CHANNELDEMUX_H__ #define __DMW_CHANNELDEMUX_H__ #ifndef __DMW_PLATFORM_H__ #include "DMW_Platform.h" #endif #if (DHL_SUPPORTED==DHL_CB2) #include "DLIB_PSI_Monitor.h" #include "DLIB_PSIP_Monitor.h" #include "DLIB_PSI_Parser.h" #include "DLIB_PSIP_Parser.h" #else #include "ATSC_PSIP.h" #endif // cafrii 060306 add bytebuf I/O struct byteBuf { UINT8* buffer; UINT32 bufSize; UINT32 offset; BOOLEAN overrunError; }; typedef struct byteBuf byteBuf_t, *byteBufPtr_t; void byteBufInit (byteBufPtr_t bt, UINT8 *buf, UINT32 bufSize); void byteBufSetBytesBuf (byteBufPtr_t bt, UINT8 *buf, UINT16 nBytes); void byteBufSetBytes (byteBufPtr_t bt, UINT32 data, UINT8 nBytes); STATUS byteBufGetBytesBuf (byteBufPtr_t bt, UINT8 *buf, UINT16 nBytes); UINT32 byteBufGetBytes (byteBufPtr_t bt, UINT8 nBytes); void byteBufSkipBytes (byteBufPtr_t bt, UINT8 nBytes); UINT32 byteBufGetOffset (byteBufPtr_t bt); BOOL byteBufCheckError (byteBufPtr_t bt); #define byteBufSet1Byte(bt,d) byteBufSetBytes((bt),(d),1) #define byteBufSet2Byte(bt,d) byteBufSetBytes((bt),(d),2) #define byteBufSet4Byte(bt,d) byteBufSetBytes((bt),(d),4) //--------------------------------- // cafrii 041126 add // /* typedef struct xvctChannel { UINT16 short_name[7]; UINT16 major_channel_number; UINT16 minor_channel_number; modulation_mode_k modulation_mode; UINT32 carrier_frequency; UINT16 channel_TSID; UINT16 program_number; ETM_location_k ETM_location; BOOLEAN access_controlled; BOOLEAN hidden; path_select_k path_select; // valid only when cvct BOOLEAN out_of_band; // valid only when cvct BOOLEAN processed; // ÀÌ bit´Â user¸¦ À§ÇØ reserve µÇ¾î ÀÖ´Ù. // µðÆúÆ®·Î 0ÀÇ °ªÀ» °¡Áö¸ç, ÇÊ¿äÇÒ ¶§ »ç¿ëµÈ´Ù. BOOLEAN show_guide; service_type_k service_type; UINT16 source_id; UINT16 descriptor_length; UINT8* descriptors; // un-parsed descriptors } xvctChannel_t, *xvctChannelPtr_t; typedef struct xvct { BOOLEAN is_cvct; // 041130, TRUE if cvct.. UINT16 transport_stream_id; UINT8 version_number; UINT8 numChannels; xvctChannelPtr_t channel; UINT16 additional_descriptor_length; UINT8* additional_descriptors; // un-parsed descriptors } xvct_t, *xvctPtr_t; */ void PrintXvct(xvctPtr_t xvctPtr); //--------------------------------- // cafrii 041129 add // typedef struct DmcMainTable_t { tvctPtr_t tvct; cvctPtr_t cvct; MPEG_PAT *pat; int num_programs; // cafrii 041209 add comment // pat->numPrograms ÀÇ °ªÀÇ »çº».. ¾Æ·¡ pmtList arrayÀÇ Å©±âÀÌ´Ù. // ½ÇÁ¦·Î À̸¸Å­ÀÇ PMT°¡ ´Ù Á¸ÀçÇÏÁö ¾ÊÀ» ¼öµµ ÀÖÀ¸¸ç, // VCTÀÇ subchannel °¹¼öµµ ÀÌ¿Í ´Ù¸¦ ¼öµµ ÀÖ´Ù.. MPEG_PMT **pmtList; } DmcMainTables; // advanced downloading APIs that can be cancelled // these functions are variations of GetXxx(). // these functions are designed to skip current process when command cancelled. // STATUS Dmc_GetPAT(tDHL_TSD tsd, MPEG_PAT **returnPat, int timeOut, BOOL (*ckfn)()); STATUS Dmc_GetPMT(tDHL_TSD tsd, UINT16 pid, UINT16 program_number, MPEG_PMT **returnPmt, int timeOut, BOOL (*ckfn)()); STATUS Dmc_GetMgtSection(tDHL_TSD tsd, mgtSectionPtr_t *mgtSectPtr, int timeOut, BOOL (*ckfn)()); STATUS Dmc_GetSttSection(tDHL_TSD tsd, sttSectionPtr_t *sttSectPtr, int timeOut, BOOL (*ckfn)()); STATUS Dmc_GetTvct(tDHL_TSD tsd, tvctPtr_t *tvctPtr, int timeOut, BOOL (*ckfn)()); STATUS Dmc_GetCvct(tDHL_TSD tsd, cvctPtr_t *cvctPtr, int timeOut, BOOL (*ckfn)()); STATUS Dmc_GetEit(tDHL_TSD tsd, UINT16 PID, UINT16 source_id, eitPtr_t *eitPtr, int timeOut, BOOL (*ckfn)()); STATUS Dmc_GetEttSection(tDHL_TSD tsd, UINT16 PID, UINT32 ETM_id, ettSectionPtr_t *ettSectPtr, int timeOut, BOOL (*ckfn)()); STATUS Dmc_GetRrtSection(tDHL_TSD tsd, UINT8 region, rrtSectionPtr_t *rrtSectPtr, int timeOut, BOOL (*ckfn)()); STATUS Dmc_MonitorRrt(tDHL_TSD tsd, tDHL_PSI_Update updateMode, tDHL_PSI_EventProc eventProc, UINT32 userParam, tDHL_PSI_ControlHandle *psiCtl); STATUS Dmc_RestoreRrt(UINT8 *buffer, rrtSectionPtr_t *prrt); // *prrt should be freeed using FreeAtscTable after use. // int Dmc_FlattenRrt(UINT8 *buffer, int bufsize, rrtSectionPtr_t rrt); // returns total required byte size for flatten. // if buffer is NULL, just calculate required buffer size. // Table de-allocation API that makes NULL pointer automatically. // it cannot be used for PAT/PMT but FreePAT/FreePMT is recommended in that case.. // ex: // Dmc_GetTvct(tsd, &tvct, 0, NULL); // Dmc_FreeAtscTable(&tvct); // void Dmc_FreeAtscTable(void *tablePtrPtr); // Simultaneous downloading APIs.. // // download (TVCT or CVCT) and PAT at the same time.. // //DHL_RESULT Dmc_GetVctAndPat(tDHL_TSD tsd, tvctPtr_t *tvctPtr, cvctPtr_t *cvctPtr, MPEG_PAT **mpatPtr, int timeOut, BOOL (*ckfn)(UINT32)); //BOOL (*chfn)()À¸·Î º¯°æÇÑ´Ù. caller¿¡¼­ »ç¿ëÇϰí Àִµ¥°¡ ¾ø´Ù. probability STATUS Dmc_GetVctAndPat(tDHL_TSD tsd, tvctPtr_t *tvctPtr, cvctPtr_t *cvctPtr, MPEG_PAT **mpatPtr, int timeOut, BOOL (*ckfn)()); // // cafrii 041129 add // STATUS Dmc_GetMainChannelTables(tDHL_TSD tsd, DmcMainTables *tbls, int timeOut, BOOL (*ckfn)(UINT32)); void Dmc_FreeMainChannelTables(DmcMainTables *tbls); // // cafrii 050624 add // STATUS Dmc_GetXvct(tDHL_TSD tsd, xvctPtr_t *xvctPtr, int timeOut, BOOL (*ckfn)(UINT32)); // download EITs/ETTs at the same time.. // simple : array of pointer STATUS Dmc_GetMultipleEITs(tDHL_TSD tsd, int nEit, UINT16 *aPID, UINT16 *aSourceID, eitPtr_t *aEitPtr, int timeOut, BOOL (*ckfn)(UINT32, UINT32), UINT32 userparam, void (*lockfn)(BOOL)); STATUS Dmc_GetMultipleETTs(tDHL_TSD tsd, int nETT, UINT16 *aEttPID, UINT32 *aETMID, ettSectionPtr_t *aEttSectPtr, int timeOut, BOOL (*ckfn)(UINT32, UINT32), UINT32 userparam, void (*lockfn)(BOOL)); // complex : array of pointer of pointer STATUS Dmc_GetMultipleEITsEx(tDHL_TSD tsd, int nEit, UINT16 *aPID, UINT16 *aSourceID, eitPtr_t **aEitPtrPtr, int timeOut, BOOL (*ckfn)(UINT32, UINT32), UINT32 userparam, void (*lockfn)(BOOL)); STATUS Dmc_GetMultipleETTsEx(tDHL_TSD tsd, int nETT, UINT16 *aEttPID, UINT32 *aETMID, ettSectionPtr_t **aEttPtrPtr, int timeOut, BOOL (*ckfn)(UINT32, UINT32), UINT32 userparam, void (*lockfn)(BOOL)); // Relayed multiple Reception API STATUS Dmc_GetRelayEITs(tDHL_TSD tsd, int nEit, UINT16 *aPID, UINT16 *aSourceID, eitPtr_t *aEitPtr, int timeOut, BOOL (*chkfn)(UINT32, UINT32), UINT32 userparam, void (*lockfn)(BOOL)); STATUS Dmc_GetRelayETTs(tDHL_TSD tsd, int nETT, UINT16 *aEttPID, UINT32 *aETMID, ettSectionPtr_t *aEttSectPtr, int timeOut, BOOL (*ckfn)(UINT32, UINT32), UINT32 userparam, void (*lockfn)(BOOL)); STATUS Dmc_GetRelayEITsEx(tDHL_TSD tsd, int nEit, UINT16 *aPID, UINT16 *aSourceID, eitPtr_t **aEitPtrPtr, int timeOut, BOOL (*chkfn)(UINT32, UINT32), UINT32 userparam, void (*lockfn)(BOOL)); STATUS Dmc_GetRelayETTsEx(tDHL_TSD tsd, int nETT, UINT16 *aEttPID, UINT32 *aETMID, ettSectionPtr_t **aEttPtrPtr, int timeOut, BOOL (*ckfn)(UINT32, UINT32), UINT32 userparam, void (*lockfn)(BOOL)); // cafrii 041126 add STATUS Dmc_TranslateCvct (cvctPtr_t cvctPtr, xvctPtr_t *xvctPtr); STATUS Dmc_TranslateTvct (tvctPtr_t tvctPtr, xvctPtr_t *xvctPtr); void Dmc_RegisterChannelDemuxSymbols(void); #endif // __DMW_CHANNELDEMUX_H__ /******************************************************************** $Log: DMW_ChannelDemux.h,v $ 1.01 2004/11/30 is_cvct À§Ä¡ À̵¿ 1.00 2004/11/29 History °ü¸® ½ÃÀÛ ********************************************************************/