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

📄 keyproc.c

📁 MTK portableDVD 采用mtk1389方案的代码
💻 C
📖 第 1 页 / 共 4 页
字号:
      break;

    case IR_STOP:
      fgRet = fgISOStopKey();
      break;

    case IR_NEXT:
        fgRet = fgISONextKey();
       break;

    case IR_PREV:
      fgRet = fgISOPrevKey();
      break;

    case IR_REPEAT:
     #ifdef AUTO_REPEAT_ALL
     vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
     fgRet = UOP_OK;
       break;
     #endif    	
      if ( fgIsIsoPlay() )
      {
        fgRet = fgISORepeatKey();
      }
      else if ( fgIsPcdPlay() )
      {
        fgRet = fgPCDRepeatKey();
      }    
      break;

    case IR_RESUME:
      fgRet = fgISOResumeKey();
      break;

    case IR_FF:
      if ( fgIsIsoPlay() )
      {
        fgRet = fgISOFFKey();
      }
      else if ( fgIsPcdPlay() )
      {
        fgRet = fgPCDFFKey();
      }    
      break;

    case IR_FR:
      if ( fgIsIsoPlay() )
      {
        fgRet = fgISOFRKey();
      }
      else if ( fgIsPcdPlay() )
      {
        fgRet = fgPCDFRKey();
      }    
      break;

    case IR_SF:
      fgRet = fgISOSFKey();
      break;


#if 0//def PLAYER_VRMT
    case IR_VRMT:
#endif  
/*  case IR_SR: */
    case IR_STEPF:
      fgRet = fgISOStepFKey();
      break;

    case IR_STEPR:
      fgRet = fgISOStepRKey();
      break;
    
/*  case IR_REVERSE: */

    case IR_SET_A:
     #ifdef AUTO_REPEAT_ALL
       vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
       fgRet = UOP_OK;
       break;
     #endif
      fgRet = fgISOA2BKey();
      break;

/*  case IR_SET_B: */
/*  case IR_TITLE_MENU: */
/*  case IR_ROOT_MENU: */
/*  case IR_RETURN: */
/*  case IR_NEXT_DLIST: */
/*  case IR_PREV_DLIST: */
/*  case IR_HOME_DLIST: */
    case IR_AUDIO:
      fgRet = fgISOAudioKey();
      break;

#ifdef MPEG4_TXT_SP
    case IR_SUB_TITLE:
      //fgRet = fgISOSubtitleKey();		//guosong
      fgRet = fgISOSpKey();
      break;
#endif    
/*  case IR_SUB_TITLE_OFF: */
    case IR_ANGLE:
      fgRet = fgISOAngleKey();
      break;

    case IR_DISPLAY:
      if ( fgIsIsoPlay() )
      {
        fgRet = fgISORemainKey();
      }
      else if ( fgIsPcdPlay() )
      {
        fgRet = fgPCDDisplayKey();
      }    
      break;

/* case IR_REMAIN: */

    case IR_GOTO:
      fgRet = fgISOSearchKey();
      break;
	  
#ifdef SUPPORT_BROWSER
    case IR_BROWSER:
      fgRet = fgISOBrowserKey();
      break;
#endif

    case IR_MARK:
      fgRet = fgISOMarkKey();
      break;

/*  case IR_CLEAR: */
/*  case IR_PBC: */
      
    case IR_DIGEST:
      fgRet = fgISODigestKey();
      break;

    case IR_PROGRAM:
      fgRet = fgISOProgramKey();
      break;

    case IR_RANDOM:
       if ( fgIsIsoPlay() )
       {
         fgRet = fgISORepeatKey();
       }
       else if ( fgIsPcdPlay() )
       {
         fgRet = fgPCDShuffleKey();
       }   
       break;

/*  case IR_INTRO: */
/*  case IR_MEMORY: */
/*  case IR_PLAY_MODE: */
/*  case IR_PAL_NTSC: */
/*  case IR_TV_MODE: */
/*  case IR_COMPONENT: */
/*  case IR_PSCAN: */
/*  case IR_VGA: */
    case IR_ZOOM_IN:
	#ifdef SUPPORT_DATA_DISC
		#ifdef JPG_DECODE_NO_ZOOM
		if (fgIsPcdPlay() || (fgIsIsoPlay() && fgFlCheckStatus(FL_STATUS_IN_JPEG)))
		{
		if(_bJpgDecode)
			{
				fgRet = UOP_FAIL;
				break;
			}
		}
	       #endif 
	#endif 
      if ( fgIsIsoPlay() || fgIsPcdPlay())
      {
        fgRet = fgISOZoomInKey();
      }
      //else if ( fgIsPcdPlay() )
      //{
        //fgRet = fgPCDZoomInKey();
      //}    
      break;

    case IR_ZOOM_OUT:
	if ( fgIsIsoPlay() || fgIsPcdPlay())
       {
        fgRet = fgISOZoomOutKey();
	}
      break;

#ifdef ENABLE_ZOOM_USER_MODE
    case IR_ZOOM_USER:
      fgRet = fgISOZoomUsrKey();
      break;
#endif /* ENABLE_ZOOM_USER_MODE */

#ifdef GUI_CANCEL_BUTTON
    case IR_CANCEL:
      fgRet = fgISOCancelKey();
			break;
#endif

    default:
       vOsdShowError(SV_ERR_DISC_NOT_SUPPORT, OSD_TIMEOUT_SHORT);
       fgRet = UOP_OK;
       break;
  }  
  return (fgRet);
}  

// *********************************************************************
// NonISO(DVD,VCD,CDDA,AUDIO_IN) key dispatch function
// *********************************************************************
BOOL fgNonISOKeyProc(void) large
{
  BOOL fgRet = UOP_OK;
  #ifdef RUSSIAN_BUYER_REQUEST2		//songchen 061211
    BYTE bPbcState = bSharedInfo(SI_PBC_STATE);
  #endif	
  
  switch (_bIRKey)
  {
    case IR_NUM0:
    case IR_NUM1:
    case IR_NUM2:
    case IR_NUM3:
    case IR_NUM4:
    case IR_NUM5:
    case IR_NUM6:
    case IR_NUM7:
    case IR_NUM8:
    case IR_NUM9:
#ifndef NO_ADD10_KEY
    case IR_ADD10:
#endif
// megaa ADD5 begin
#ifndef NO_ADD5_KEY
    case IR_ADD5:
#endif
// megaa ADD5 end
      fgRet = fgNonISONumKey();
      break;
#ifdef RUSSIAN_BUYER_REQUEST2		//songchen 061211
     case IR_DOWN:
       if(fgIsDvdPlay() || fgIsVcdPlay())
      {
        if ((bPbcState == SV_PAUSE) || (bPbcState == SV_STEP))
        {
          fgSetPlayPostKey(IR_STEPF);
		fgRet = UOP_OK;
		break;
        }
      }
#endif

/*  case IR_ADD20: */
/*  case IR_ADD5: */

    case IR_UP:
    case IR_LEFT:
    case IR_RIGHT:
#ifndef RUSSIAN_BUYER_REQUEST2
    case IR_DOWN:
#endif
      fgRet = fgNonISODirKey();
      break;

    case IR_ENTER:
      fgRet = fgNonISOEnterKey();
      break;

    case IR_PLAY:
      fgRet = fgNonISOPlayKey();
      break;

    case IR_PAUSE:
      fgRet = fgNonISOPauseKey();
      break;

    case IR_STOP:
      fgRet = fgNonISOStopKey();
      break;

    case IR_NEXT:
      fgRet = fgNonISONextKey();
      break;

    case IR_PREV:
      fgRet = fgNonISOPrevKey();
      break;

    case IR_REPEAT:
     #ifdef AUTO_REPEAT_ALL
       vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
       fgRet = UOP_OK;
       break;
     #endif    	
      fgRet = fgNonISORepeatKey();
      break;

    case IR_RESUME:
      fgRet = fgNonISOResumeKey();
      break;

    case IR_FF:
      fgRet = fgNonISOFFKey();
      break;

    case IR_FR:
      fgRet = fgNonISOFRKey();
      break;

    case IR_SF:
      fgRet = fgNonISOSFKey();
      break;

    case IR_SR:
      fgRet = fgNonISOSRKey();
      break;

    case IR_STEPF:
      fgRet = fgNonISOStepFKey();
      break;

    case IR_STEPR:
      fgRet = fgNonISOStepRKey();
      break;

/* case IR_REVERSE: */

    case IR_SET_A:
     #ifdef AUTO_REPEAT_ALL
       vOsdShowError(SV_ERR_INVALID_OPERATION, OSD_TIMEOUT_SHORT);
       fgRet = UOP_OK;
       break;
     #endif    	
      fgRet = fgNonISOA2BKey();
      break;

/* case IR_SET_B: */

    case IR_TITLE_MENU:
      fgRet = fgNonISOTitleKey();
      break;

    case IR_ROOT_MENU:
      fgRet = fgNonISOMenuKey();
      break;

#ifdef YJT_CTL
    case IR_DEFAULT:
   	  fgRet = fgNONAutoPlayKey();
   	  break;
#endif

    case IR_RETURN:
      fgRet = fgNonISOReturnKey();
      break;

#ifdef SUPPORT_DVD_AUDIO
    case IR_NEXT_DLIST:
      fgRet = fgNonISODANextDlist();
      break;

    case IR_PREV_DLIST:
      fgRet = fgNonISODAPrevDlist();
      break;

/*  case IR_HOME_DLIST: */
#endif /* SUPPORT_DVD_AUDIO */

    case IR_AUDIO:
      fgRet = fgNonISOAudioKey();
      break;

    case IR_SUB_TITLE:
      fgRet = fgNonISOSpKey();
      break;

/* case IR_SUB_TITLE_OFF: */

    case IR_ANGLE:
      fgRet = fgNonISOAngleKey();
      break;

    case IR_DISPLAY:
      fgRet = fgNonISODisplayKey();
      break;

/* case IR_REMAIN: */

    case IR_GOTO:
#ifdef GOTO_SEPARATE_KEY
      fgRet = fgNonISOSearchKey(FALSE);  // enter original search interface
      break;
    case GOTO_SEPARATE_KEY:         // separate key for entering Goto
      fgRet = fgNonISOSearchKey(TRUE);
      break;
#else
      fgRet = fgNonISOSearchKey(TRUE);   // enter combined original search and new Goto
      break;
#endif
#ifdef SUPPORT_BROWSER
    case IR_BROWSER:
      fgRet = fgNonISOBrowser();
      break;
#endif

    case IR_MARK:
      fgRet = fgNonISOMarkKey();
      break;

/* case IR_CLEAR: */
    case IR_PBC: 
      fgRet = fgNonISOPbcKey();
      break;

    case IR_DIGEST:
      fgRet = fgNonISODigestKey();
      break;

    case IR_PROGRAM:
      fgRet = fgNonISOProgramKey();
      break;

    case IR_RANDOM:
       fgRet = fgNonISOShuffleKey();
       break;

 #ifdef PLAYER_VRMT
    case IR_VRMT:
       fgRet = fgNonISOVremoteKey();
       break;
 #endif /* PLAYER_VRMT */

#ifdef MEMORY_SUPPORT
    case IR_MEMORY:
      fgRet = fgNonISOMemoryKey();
      break;
#endif /* MEMORY_SUPPORT */

/* case IR_PLAY_MODE: */
/* case IR_PAL_NTSC: */
    case IR_TV_MODE:
      fgRet = fgNonISOTvModeKey();
      break;

/* case IR_COMPONENT: */
/* case IR_PSCAN: */
/* case IR_VGA: */
    case IR_ZOOM_IN:
      fgRet = fgNonISOZoomInKey();
      break;

    case IR_ZOOM_OUT:
      fgRet = fgNonISOZoomOutKey();
      break;

#ifdef ENABLE_ZOOM_USER_MODE
    case IR_ZOOM_USER:
      fgRet = fgNonISOZoomUsrKey();
      break;
#endif /* ENABLE_ZOOM_USER_MODE */

#ifdef SUPPORT_DVD_AUDIO
   case IR_AUD_KEY_PLUS: 
     fgSetPlayPostKey(IR_NEXT_DLIST);
     break;
   case IR_AUD_KEY_MINUS: 
     fgSetPlayPostKey(IR_PREV_DLIST);
     break;
#endif   
/* case IR_AUD_KEY_RESUME: */
/* case IR_ECHO_PLUS: */
/* case IR_ECHO_MINUS: */
/* case IR_SURROUND: */
/* case IR_VOCAL_ASSIST: */
/* case IR_KARAOKE: */
/* case IR_ECHO_TYPE: */
/* case IR_EQUALIZER: */
/* case IR_VOICE_CANCEL: */
/* case IR_SPK_BALANCE: */
/* case IR_SPDIF: */
/* case IR_MUTE: */
/* case IR_VOLUME_UP: */
/* case IR_VOLUME_DOWN: */
/* case IR_AUD_LR: */
#ifdef AUDIO_IN_EN
 case IR_FUNCTION: 
    fgRet = fgNonFunctionKey();
    break;
#endif /* AUDIO_IN_EN */
    
 case IR_PASSWORD: 
    fgRet = fgNonISOPasswordKey();
    break;

#ifdef SUPPORT_DVD_AUDIO
    case IR_HDN_PASSWORD:
      fgRet = fgNonISODAHdnPasswordKey();
      break;
#endif

#ifdef GUI_CANCEL_BUTTON
    case IR_CANCEL:
      fgRet = fgNonISOCancelKey();
		break;
#endif
#ifdef SUPPORT_HDVD_CHANNEL_CHANGE                                             //linshangbo    040605   bg
   case IR_CHANNEL_CHANGE:
    fgRet = fgNonISOChannelChangeKey();
      break;
#endif
  case IR_CMD_DONE:
  	   break;
    default:
       vOsdShowError(SV_ERR_DISC_NOT_SUPPORT, OSD_TIMEOUT_SHORT);
       fgRet = UOP_OK;
       break;
  }  
  return (fgRet);
}  

// *********************************************************************
// Screen saver key dispatch function
// *********************************************************************
BOOL fgSCRSAVKeyProc(void ) large
{
  BYTE bScrSaverSwitch;
  
  if ((_bIRKey < IR_INTERNAL_KEY_START) 
#ifdef SUPPORT_EMD
      || (_bIRKey == IR_ESCAPE_SCRSAV)
#endif      
       )
  {
    /* if we turned on the screen saver */
    bScrSaverSwitch = bEepromReadByte(SCR_SAVER_POSITION);
    if (bScrSaverSwitch == EV_ON)
    {
      vScrSaveExit();
    }
    /* enter power active mode */
    vSendPlayerActive();
    vScrSaverSetTimeOut(SCR_SAVER_TIMEOUT);
#ifdef SUPPORT_EMD
    if(_bIRKey == IR_ESCAPE_SCRSAV)
    {
      if (fgIsIsoPlay())
      {
        vISOExit();
      }  
    }  
    else 
#endif    
    if (fgIsHiPriorityKey(_bIRKey) || (bScrSaverSwitch != EV_ON))
    {
      /* we need to process the first key */
      fgSetPlayPostKey(_bIRKey);
    }
    _bIRKey = IR_NONE;
    return UOP_OK;
  }
  else /* don't care internal key */
  {
    return UOP_OK;
  }
}  

⌨️ 快捷键说明

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