| 1 | /******************************************************************** |
|---|
| 2 | * |
|---|
| 3 | * PSI_Process.h - PSI Section Processing. (PSI). |
|---|
| 4 | * |
|---|
| 5 | * Copyright 2004~ DigitalSTREAMTechnology, Inc. |
|---|
| 6 | * All Rights Reserved |
|---|
| 7 | * |
|---|
| 8 | * _Id: PSI_Process.h ,v 1.0 2004/015/28 jina Exp |
|---|
| 9 | ********************************************************************/ |
|---|
| 10 | |
|---|
| 11 | #ifndef DST_PSI_PROCESS_H |
|---|
| 12 | #define DST_PSI_PROCESS_H |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | #ifdef __cplusplus |
|---|
| 16 | extern "C" { |
|---|
| 17 | #endif |
|---|
| 18 | |
|---|
| 19 | #if !defined (_DSTHALERROR_H_) |
|---|
| 20 | #include "dsthalerror.h" |
|---|
| 21 | #endif |
|---|
| 22 | |
|---|
| 23 | #ifndef DST_PSI_SECTGATHER_H_ |
|---|
| 24 | #include "dsthalPsiSectGather.h" |
|---|
| 25 | #endif |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | typedef void * DHL_PSI_HANDLE; |
|---|
| 29 | typedef void * DHL_TBL_HANDLE; |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | |
|---|
| 34 | typedef enum { |
|---|
| 35 | CHROMA_4_2_0 = 1, /* ATSC specified */ |
|---|
| 36 | CHROMA_4_2_2 = 2, |
|---|
| 37 | CHROMA_4_4_4 = 3 |
|---|
| 38 | } MPEG_CHROMA_FORMAT; |
|---|
| 39 | |
|---|
| 40 | typedef enum { |
|---|
| 41 | MVF_Component = 0, /* ATSC specified */ |
|---|
| 42 | MVF_PAL = 1, |
|---|
| 43 | MVF_NTSC = 2, |
|---|
| 44 | MVF_SECAM = 3, |
|---|
| 45 | MVF_MAC = 4, |
|---|
| 46 | MVF_Unspecified = 5 |
|---|
| 47 | } MPEG_VIDEO_FORMAT; |
|---|
| 48 | |
|---|
| 49 | typedef enum { |
|---|
| 50 | FRAMERATE_23_976 = 1, /* ATSC */ |
|---|
| 51 | FRAMERATE_24 = 2, /* ATSC */ |
|---|
| 52 | FRAMERATE_25 = 3, |
|---|
| 53 | FRAMERATE_29_97 = 4, /* ATSC */ |
|---|
| 54 | FRAMERATE_30 = 5, /* ATSC */ |
|---|
| 55 | FRAMERATE_50 = 6, |
|---|
| 56 | FRAMERATE_59_94 = 7, /* ATSC */ |
|---|
| 57 | FRAMERATE_60 = 8 /* ATSC */ |
|---|
| 58 | } MPEG_FRAME_RATE; |
|---|
| 59 | |
|---|
| 60 | typedef enum { |
|---|
| 61 | ITU_R_BT_709 = 1, /* ATSC Preferred */ |
|---|
| 62 | Unspecified_Video = 2, |
|---|
| 63 | ITU_R_BT_470_2_System_M = 4, |
|---|
| 64 | ITU_R_BT_470_2_System_BG = 5, |
|---|
| 65 | SMPTE_170M = 6, /* ATSC Alternate */ |
|---|
| 66 | SMPTE_240M = 7, |
|---|
| 67 | LinearTransferCharacteristics = 8, /* for Transfer Characteristics only */ |
|---|
| 68 | CIE_RGB = 9 |
|---|
| 69 | } MPEG_COLOUR_TYPE; |
|---|
| 70 | |
|---|
| 71 | typedef enum AudioType |
|---|
| 72 | { |
|---|
| 73 | AudioType_UNKNOWN = 0, /* Audio type Not detected, yet */ |
|---|
| 74 | AudioType_PCM, /* Audio is uncompressed PCM data */ |
|---|
| 75 | AudioType_AC3, /* Audio is AC3 compressed stream */ |
|---|
| 76 | AudioType_AAC, /* Audio is AAC compressed stream */ |
|---|
| 77 | AudioType_DTS, /* Audio is DTS compressed stream */ |
|---|
| 78 | AudioType_MPEG_1, /* Audio comforms to MPEG-1 audio stream */ |
|---|
| 79 | AudioType_MPEG_2, /* Audio comforms to MPEG-2 audio stream */ |
|---|
| 80 | AudioType_MPEG_4, /* Audio comforms to MPEG-4 audio stream */ |
|---|
| 81 | |
|---|
| 82 | AudioType_MPEG_L1, /* mpeg 1 layer 1 */ |
|---|
| 83 | AudioType_MPEG_L2, /* mpeg 1 layer 2 */ |
|---|
| 84 | AudioType_MPEG_L3, /* mpeg 1 layer 3 */ |
|---|
| 85 | AudioType_AIFF, /* PCM audio in AIFF format */ |
|---|
| 86 | AudioType_SineWave /* Sine wave generator*/ |
|---|
| 87 | } AudioType; |
|---|
| 88 | |
|---|
| 89 | |
|---|
| 90 | /*Public Function Declaration*/ |
|---|
| 91 | DHL_RESULT DHL_PSI_Init( DHL_PSI_HANDLE *pPsiHandle); |
|---|
| 92 | DHL_RESULT DHL_PSI_Close( DHL_PSI_HANDLE pPsiHandle ); |
|---|
| 93 | |
|---|
| 94 | DHL_RESULT DHL_PSI_Init_TVGOS( DHL_PSI_HANDLE *hPsiHandle ); |
|---|
| 95 | DHL_RESULT DHL_PSI_Close_TVGOS( DHL_PSI_HANDLE pPsiHandle ); |
|---|
| 96 | |
|---|
| 97 | DHL_RESULT DD_PSI_Init( void **pPsiHandle /*returned psi handle*/ ); |
|---|
| 98 | DHL_RESULT DD_PSI_Close( void *pPsiHandle ); |
|---|
| 99 | |
|---|
| 100 | DHL_RESULT DD_PSI_ReadPSIData( DHL_TBL_HANDLE hTblHandle , struct PSIDataArray_t **returnPsi); |
|---|
| 101 | void DD_PSI_FreePSIData( struct PSIDataArray_t *psiArray ); |
|---|
| 102 | |
|---|
| 103 | DHL_RESULT DD_PSI_CancelPSIPid( DHL_PSI_HANDLE hPsiHandle, /*PSI_SECTION_CTL_t **/ void * pSectionCtl ); |
|---|
| 104 | |
|---|
| 105 | DHL_RESULT DD_PSI_SetGemstar(void *pPsiInfo, DS_BOOL bEnable); |
|---|
| 106 | |
|---|
| 107 | DHL_RESULT DD_PSI_MonitorPSIPid( void *pPsiInfo, |
|---|
| 108 | DS_U16 pid, |
|---|
| 109 | PSIMode psiMode, |
|---|
| 110 | PSIUpdateMode updateMode, |
|---|
| 111 | PSIMask_t *prefList, |
|---|
| 112 | DS_U16 maxData, |
|---|
| 113 | DS_U16 maxSections, |
|---|
| 114 | PSIEventProc_f eventProc, |
|---|
| 115 | DS_U32 userParam, |
|---|
| 116 | void **returnPSIControl ); |
|---|
| 117 | |
|---|
| 118 | DHL_RESULT DD_PSI_MonitorPSIPidBig( void *pPsiInfo, |
|---|
| 119 | DS_U16 pid, |
|---|
| 120 | PSIMode psiMode, |
|---|
| 121 | PSIUpdateMode updateMode, |
|---|
| 122 | PSIMask_t *prefList, |
|---|
| 123 | DS_U16 maxData, |
|---|
| 124 | DS_U16 maxSections, |
|---|
| 125 | PSIEventProc_f eventProc, |
|---|
| 126 | DS_U32 userParam, |
|---|
| 127 | void **returnPSIControl ); |
|---|
| 128 | |
|---|
| 129 | void DD_PSI_SetSegmentNumber( void *p_section_ctl, int segment_number ); |
|---|
| 130 | |
|---|
| 131 | |
|---|
| 132 | DS_BOOL DD_PSI_ExistSectionCtl( void *pPsiInfra, |
|---|
| 133 | DS_U16 pid, |
|---|
| 134 | PSIMask_t *prefList |
|---|
| 135 | ); |
|---|
| 136 | |
|---|
| 137 | |
|---|
| 138 | |
|---|
| 139 | #ifdef __cplusplus |
|---|
| 140 | } |
|---|
| 141 | #endif |
|---|
| 142 | |
|---|
| 143 | #endif |
|---|
| 144 | /*DST_PSI_PROCESS_H*/ |
|---|
| 145 | |
|---|
| 146 | |
|---|