⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 eds.lst

📁 此程序为twell8806驱动程序
💻 LST
📖 第 1 页 / 共 3 页
字号:
                              Printf("\r\n DisplayBlockedRating_Content==> %s",ContentLStr);
                      #endif
                              pos++;
                      }
                      if( content & CONTENT_TV_D_MASK )       //D
                      {       WriteStringToAddr(pos, ContentDStr,  strlen(ContentDStr));
                      #ifdef DEBUG_CCEDS
                              Printf("\r\n DisplayBlockedRating_Content==> %s",ContentDStr);
                      #endif
                      }
              }
              
              void DisplayBlockedTVRating(void)
              {
                              PanelBlack(1);//ForceDecoderOutput(BLUE_DECODER);
                              DisplayBlockedRating(OSDBlockedTVStr[CurrentTVRating&TVRATING_MASK]);
                              DisplayBlockedRating_Content( CurrentTVRating );        // same as content_D
                              Block_On = 1;
              
                              AudioOff();
                              //SetAudioMute(1);
              
              }
              
              void CheckAndBlockInputForTV(BYTE rating, BYTE content_D)
              {
                      #ifdef DEBUG_CCEDS
                      Printf("\r\n CheckAndBlockInputForTV==> rating:%2x  content_D:%2x", (WORD)rating, (WORD)content_D);
                      #endif
                      //rating: xxVS Lrrr, content_D: xxDx xxxx 
                      content_D = (content_D & 0x20) << 1 ;   // 0D00 0000
                      content_D |= ( rating & 0x3f) ;                 // 0DVS Lrrr
              
                      if( CurrentTVRating != content_D ) {
                              CurrentTVRating = content_D;
                              CurrentMovieRating = 0;
                              if( GetDisplayedOSD() & CC )            ClearClosedCaption();
                              //ClearClosedCaption();
                              DisplayBlockedTVRating();
                              /*PanelBlack(1);//ForceDecoderOutput(BLUE_DECODER);
                              DisplayBlockedRating(OSDBlockedTVStr[CurrentTVRating&TVRATING_MASK]);
                              DisplayBlockedRating_Content( CurrentTVRating );        // same as content_D
                              Block_On = 1;*/
                      }
              }
              
              
              BYTE EnabledVChip(void)
              {
                      BYTE val;
                      val = ( BlockedTV || BlockedMovie 
                              || BlockedTV_Content[1] // TV-Y
                              || BlockedTV_Content[2] // TV-Y7
                              || BlockedTV_Content[3] // TV-G
                              || BlockedTV_Content[4] // TV-PG
                              || BlockedTV_Content[5] // TV-14
                              || BlockedTV_Content[6] // TV-MA
                              );
                      return val;
C51 COMPILER V7.50   EDS                                                                   08/20/2007 10:23:30 PAGE 5   

              }
              
              void ChangeTVRating_Content(void)
              {
                      BYTE i, content=0;
                      #ifdef DEBUG_CCEDS
                      Printf("\r\n ChangeTVRating_Content");
                      #endif
              
                      BlockedTV_Content[0] = 0;
                      for(i=1; i<7; i++){
                              //if(BlockedTV == 0 ) BlockedTV_Content[i] = 0;
                              //else 
                              BlockedTV_Content[i] = GetBlockedTV_FLDSLEE(i);
              
                              #ifdef DEBUG_CCEDS
                              Printf("\r\n+++ Content of %s:%2x",OSDBlockedTVStr[i],(WORD)BlockedTV_Content[i]);
                              #endif
                      }
              }
              
              void ClearBlockedInput(void)
              {
                      CurrentMovieRating = 0;
                      CurrentTVRating = 0;
                      //ljy061303...ClearBlockedRating();
                      //ClearForcedDecoderOutput();
                      if( GetDisplayedOSD() & RATINGINFO ) {
                              ClearDisplayedOSD (RATINGINFO);
                              #ifdef DEBUG_CCEDS
                              Printf("\r\n ===> ClearDisplayedOSD : RATINGINFO \n\n\n");
                              #endif
                              ShowOSDWindow(RATINGINFO_OSDWIN,FALSE);
                      }
              }
              
              void CheckAndClearBlockedInput(void)
              {
                      //if( GetDisplayedOSD() & RATINGINFO ) {
                      if( Block_On == 1){
                              #ifdef DEBUG_CCEDS
                              dPuts("\r\n(CheckAndClearBlockedInput)");
                              #endif
                              ClearBlockedInput();
                              PanelBlack(0);////ClearForcedDecoderOutput();
                              InitClosedCaption();
                              if( DisplayInputHold ) DisplayInput();
                              else    
                              if( IsAudioMuteOn() ) DisplayMuteInfo();
                              else  AudioOn();                        //SetMSPVol();
              
                              Block_On = 0;
              
                              //SetAudioMute(0);
              
                      }
              }
              
              BYTE IsBlock_On(void)
              {
                      return Block_On;
              }
C51 COMPILER V7.50   EDS                                                                   08/20/2007 10:23:30 PAGE 6   

              
              void InitEDS(void)
              {
                      //dPuts("\r\n++(InitEDS)--");
                      EDS_control = 0;
                      EnableEDS();
              }
              
              void ClearEDS(void)
              {
                      CheckAndClearBlockedInput();
                      DisableEDS();
              }
              
              //----------------------------------------------------------------------
              //      eds_data
              //              0                       .To make pair or checksum for end of packet command(0x0f)
              //                                      .Can come as second byte.
              //              <=0xF           .Control code or Type
              //                                      .If EDS_control==0, Control code
              //                                       else, type code
              //              <=0x1F          .Only for checksum
              //              <=0xFF          .Information or checksum
              //                                      
              //----------------------------------------------------------------------
              //ljy012304...CC_ACURATE_EDS
              #define  IsSecondCharInPair                             (cc_status %2)          //( !(EDS_packet_len%2) )
              #define  IsFirstCharInPair                              ( !(cc_status%2) )      //( EDS_packet_len%2 )
              #define  CHECKSUM                                               0x0f
              #define  CURRENT_CLASS_START_RATING             0x15
              #define  CURRENT_CLASS_CONT_RATING              0x25
              #define  _CLEAR_EDS_CONTROL_                    {       EDS_control = 0;                EDS_packet_len = 0;     }
              #ifdef SUPPORT_TW88_CC_DECODER
              #define  _SET_EDS_CONTROL_                              {       EDS_control = eds_data; EDS_packet_len = 1;     \
                                                                                                      if(     DoesCCFlagNeedDataFor(FIELD2) ) \
                                                                                                              ClearCCControl();} 
                                                                                                      //Clear CC_Control_byte1 if CC3,4,T3, or 4 want to be captured
                                                                                                      //because in this case, EDS and CC info data can not be mixed.
              #else                                   
              #define  _SET_EDS_CONTROL_      ;
              #endif                                                                  
              #define  IsChecksumPair                                 ( (EDS_control==CHECKSUM) && (EDS_packet_len==2) )
              
              BYTE CheckVchip(BYTE cc_status,BYTE eds_data) 
              {
              
                      EDS_packet_len++;
              
                      if( eds_data==0 ) {  //last char for pair or checksum
                              if( IsChecksumPair || ( EDS_control && IsSecondCharInPair )  )
                                      _CLEAR_EDS_CONTROL_
                              else {
                                      //maybe CC data??
                                      #ifdef DEBUG_CCEDS1
                                      dPrintf("*** v-chip : maybe CC data(0)");
                                      #endif
                                      return FALSE;
                              }
                      }
                      else if( eds_data <= 0x0f ) {   //first or second control code or checksum
                              if( IsChecksumPair )                                                                            //checksum value
                                      _CLEAR_EDS_CONTROL_
C51 COMPILER V7.50   EDS                                                                   08/20/2007 10:23:30 PAGE 7   

                              else if( EDS_control ) {                                                                        //second control code or new control code
                                      if( EDS_packet_len==2 ) {                                                                       //second control code
                                              EDS_control = (EDS_control <<4)| eds_data;                                      //make combined control code.
                                      }
                                      else if( IsFirstCharInPair )                                                            //new contol code
                                              _SET_EDS_CONTROL_
                                      else {
                                              ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -