#ifndef _EIA608B_H_ #define _EIT608B_H_ //#include "DMW_EpgStructsDef.h" #include "DHL_Types.h" #ifdef __cplusplus extern "C" { #endif typedef struct DescKeyword { UINT8 hexCode; const UINT8 *keyWord; }DescKeyword_t; /*Language for Audio Services*/ typedef enum AudioLanguage { AL_UNKNOWN = 0, AL_AENGLISH = 1, AL_SPANISH = 2, AL_FRENCH =3, AL_GERMAN = 4, AL_ITALIAN = 5, AL_OTHER = 6, AL_NONE= 7 }AudioLanguage; typedef enum AudioType1 { AT_UNKNOWN = 0, AT_MONO = 1, AT_SIMUL_STEREO = 2, AT_TRUE_STEREO = 3, AT_STEREO_SURROUND = 4, AT_DATA_SERVICE = 5, AT_OTHER = 6, AT_NONE = 7, /*Second Audio Program Only*/ AT_VIDEO_DESCRIPTION = 8, AT_NON_PROGRAM_AUDIO = 9, AT_SPECIAL_EFFECTS = 10, }AudioType1; #define programNameReceiveOk 0x01 #define programTypeReceiveOk 0x02 #define lengthTimeInShowReceiveOk 0x04 #define programIdReceiveOk 0x08 #define allReceiveOk 0x0f #define sosoOK 0x0D typedef struct NtscBasicEpgInfo { /*It is from ProgramIdentificationNumber : start time & date*/ UINT8 startMinute; UINT8 startHour; UINT8 startDate; UINT8 startMonth; UINT8 bTapeDelay; /*determine if an offest is necessary because of local station tape delay*/ /*It is from LengthTimeInShow : scheduled length of the program ,elapsed time*/ UINT8 minLength; UINT8 hourLength; UINT8 minElapsed; UINT8 hourElapsed; UINT8 secElapsed; /*It is from ProgramName*/ UINT8 programNameLength; UINT8 programName[32]; /*It is from ProgramType*/ UINT8 programType[32]; struct NtscBasicEpgInfo *pNext; UINT8 receiveStatus; }NtscBasicEpgInfo; typedef struct NtscEpgInfoHeader { NtscBasicEpgInfo *pNext; int iElemCount; UINT8 iInternalVersion; } NtscEpgInfoHeader; typedef struct NtscCaptionInfo { /*It is from CaptionServices*/ UINT8 capLanguage[8]; UINT8 capServiceType[8]; } NtscCaptionInfo; typedef struct NtscAudioInfo { /*It is from AudioServices*/ UINT8 mainAudioLanguage; UINT8 mainAudioType; UINT8 sapLanguage; UINT8 sapType; } NtscAudioInfo; typedef struct NtscCGMSA { /*It is from CopyGenerationManagementSystemA*/ UINT8 CGMS_A; /*Copy Generation Management System for Analog*/ UINT8 APS; /*Analog Protection System*/ UINT8 ASB; /*Analog Source Bit*/ }NtscCGMSA; typedef struct NtscAspectRatioInfo { /*It is from AspectRatioInformation*/ UINT8 startLine; UINT8 endLine; UINT8 squeezed; }NtscAspectRatioInfo; typedef struct NtscTimeInfo { /*It is from TimeOfDay*/ UINT8 iMinute; UINT8 iHour; UINT8 iDate; UINT8 iMonth; UINT8 iDay; UINT8 iYear; UINT8 bDaylightSaving; UINT8 bFeb28or29; UINT8 bSecondReset; UINT8 bTapeDelay; /*It is from Local Time Zone & DST USE*/ UINT8 timeZoneOffset; UINT8 daylightSaving; } NtscTimeInfo; typedef struct NtscProgramDescription { UINT8 row[8][32]; } NtscProgramDescription; typedef struct NtscChannelInfo { /*It is from Network Name*/ UINT8 networkNameLength; UINT8 networkName[32]; /*It is from Call Letters.*/ UINT8 stationId[6]; /*It is from Transmission Signal Identifier*/ UINT16 tsid; /*It is from Tape Delay*/ UINT8 tapeMinute; UINT8 tapeHour; } NtscChannelInfo; typedef enum { xdsProgramIdentificationNumber=0, xdsProgramName, xdsNetworkName, xdsContentAdvisory } EpgNtscPacketType; typedef enum { US_Entire_Audience = 0x0, US_Children = 0x1, US_MPAA = 0x2, CANADA_English = 0x3, CANADA_French = 0x4, /*reserved*/ /*reserved*/ NO_INFORMATION = 0x7 } rating_type_k; typedef struct { rating_type_k ratingType; UINT8 ratingValue; /* : dimention 0 or 5 or 7*/ UINT8 FV; /*Fantasy Violence : dimention 6*/ UINT8 V; /*Violence : dimention 4*/ UINT8 S; /*Sex : dimention 3*/ UINT8 L; /*Language : dimention 2*/ UINT8 D; /*Dialogue : dimention 1*/ } NtscRatingInfo; /*EIA608B API Declaration (for users)*/ STATUS DMW_608B_GetCaptionInfo ( NtscCaptionInfo *pCaptionInfo ); STATUS DMW_608B_GetChannelInfo ( NtscChannelInfo *pNtscChannelInfo ); STATUS DMW_608B_GetProgramDescription( NtscProgramDescription *pDescription ); STATUS DMW_608B_GetAudioInfo ( NtscAudioInfo *pAudioInfo ); STATUS DMW_608B_GetTimeInfo( NtscTimeInfo *pTimeInfo ); STATUS DMW_608B_GetAspectRatioInfo( NtscAspectRatioInfo *pAspectRatioInfo ); STATUS DMW_608B_GetProgramDescription( NtscProgramDescription *pDescription ); STATUS DMW_608B_GetRating( NtscRatingInfo *pRating ); void DMW_608B_SetValidRatingTimeout(UINT32 timeout); /*the unit of timeout is msec.*/ STATUS DMW_608B_InitNtscEpgDb(); void DMW_608B_CloseNtscEpgDb(); /*It will be used by Epg task..for constructing epg db.*/ STATUS DMW_608B_GetProgramInfo ( NtscBasicEpgInfo **aNtscProgramInfo , int *iNtscProgramInfoCount , int iTimeOut ); STATUS DMW_608B_FreeProgramInfo( NtscBasicEpgInfo *aNtscProgramInfo ); /*EIA608B local function declaration.*/ void ProgramIdentificationNumber( UINT8 *inBuff, UINT8 inSize); void LengthTimeInShow ( UINT8 *inBuff , UINT8 inSize); void ProgramName( UINT8 *inBuff , UINT8 inSize); const UINT8 * DescriptiveKeyword( UINT8 iHexCode ); void ProgramType( UINT8 *inBuff , UINT8 inSize ); void ContentAdvisory ( UINT8 *inBuff , UINT8 inSize ); void AudioServices ( UINT8 *inBuff , UINT8 inSize ); void CaptionServices ( UINT8 *inBuff , UINT8 inSize ); void CopyGenerationManagementSystemA( UINT8 *inBuff , UINT8 inSize ); void AspectRatioInformation( UINT8 *inBuff , UINT8 inSize); void CompositePacket1( UINT8 *inBuff , UINT8 inSize ); void CompositePacket2( UINT8 *inBuff , UINT8 inSize ); void NetworkName ( UINT8 *inBuff , UINT8 inSize ); void CallLetters ( UINT8 *inBuff , UINT8 inSize ); void TimeOfDay( UINT8 *inBuff , UINT8 inSize ); void TransmissionSignalIdentifier ( UINT8 *inBuff , UINT8 inSize ); void TimeOfDelay( UINT8 *inBuff , UINT8 inSize ); void ImpulseCaptureID( UINT8 *inBuff , UINT8 inSize ); void SupplementDataLocation (UINT8 *inBuff , UINT8 inSize); void LocalTimeZone_DSTUse (UINT8 *inBuff , UINT8 inSize ); void OutOfBandChannelNumber( UINT8 *inBuff , UINT8 inSize ); void ChannelMapPointer( UINT8 *inBuff , UINT8 inSize ); void ChannelMapHeaderPacket( UINT8 *inBuff , UINT8 inSize ); void ChannelMapPacket( UINT8 *inBuff , UINT8 inSize ); void NationalWeatherServiceCode( UINT8 *inBuff , UINT8 inSize ); void TapeDelay ( UINT8 *inBuff , UINT8 inSize ); void ProgramDescription( UINT8 *inBuff , UINT8 inSize , UINT8 rowIndex ); BOOLEAN DMW_608B_IsCurrentOnlyMode(); #ifdef __cplusplus } #endif #endif