📄 console.c
字号:
if(g_UiCoreState!=UI_CORE_STOP)
{
ConsoleModifyAngle();
}
break;
case C_VCD_PBCOFF:
OSD_Setup_Parameter.bPBC = C_OFF;
break;
case C_DVD_SUBPICCHK:
if(g_UiCoreState!=UI_CORE_STOP)
ConsoleModifySubPic();
break;
case C_DVD_CHGDOMAIN:
if(CurrentDomain == VMGM_DOM || CurrentDomain == VTSM_DOM)
{/* Menu or Title */
CloseConsole();
}
break;
case C_NV_CMD_STOP:
CloseConsole();
break;
/*When press "Mute" key, normal will send the message to console to modify the osd*/
}
/* all message should send to Basal to update VFD */
return UI_NOUSE_FUNC_MSG;
}
//30925 gamble for closeconsole show in vcd pbc off state
WORD ConsoleRespondPlaybackManage(DWORD MsgInput)
{
switch(MsgInput)
{
case C_NV_SEG_END:
if ((g_UiPlaybackRepeatRange== UI_PLAYBACKRANGE_REPEATNONE)&&
(g_UiPlaybackMethod == UI_PLAYBACKMETHOD_NORMAL)&&(g_UiCoreState!=UI_CORE_REVERSE))
if((DiscType==C_VCD20||DiscType==C_SVCD)&&OSD_Setup_Parameter.bPBC==C_OFF)
{
CloseConsole();
}
break;
/*When press "Mute" key, normal will send the message to console to modify the osd*/
}
/* all message should send to Basal to update VFD */
return UI_NOUSE_FUNC_MSG;
}
//30925 gamble for closeconsole show in vcd pbc off state end
WORD ConsoleRespondHALNotice(DWORD MsgInput)
{
extern tPEMsg PEOprParam;
AUDIOSTREAM AudioInfo;
switch(MsgInput)
{
case C_DISC_AUDIOTYPECHG:
NVGetAudioInfo(&AudioInfo);
if(!AudioInfo.AStreamTotalNo)
return UI_IS_FUNC_MSG;
if(DiscType ==C_DVD || DiscType== C_DVD_VR)
{
if(CheckIfActive(CNSL_BOX_AUDIO_DVD))
CONSOLEHighLightItem(gui_hdc, CNSL_BOX_AUDIO_DVD,TRUE);
else
ShowConsleItem(gui_hdc, CNSL_BOX_AUDIO_DVD);
}
SendVFDPart1Show();
break;
default :
break;
}
/* all message should send to Basal to update VFD */
return UI_IS_FUNC_MSG;
}
/*----------------------------------------------------------------------------
* Function : ConsoleRespondUINotice
* Arguments : DWORD MsgInput:IN.
* Return value : WORD:OUT, indicate if message still need BASAL to process.
* Remark : process message sent by UI itself.
* Author: Lily Ma,030429-01lily
*----------------------------------------------------------------------------*/
WORD ConsoleRespondUINotice(DWORD MsgInput)
{
switch(MsgInput)
{
case C_UI_MUTE:
case C_UI_VOCAL:
ConsoleModifyVocal();
return UI_IS_FUNC_MSG;
case C_CONSOLEUPDATE:
return UI_IS_FUNC_MSG;
}
}
WORD ConsoleRespondTimer(DWORD MsgInput)
{
BOOL ifexit=FALSE; //030807-02lily
BYTE str[30];
BYTE playKey; //haiyuan030818 for tell if PTT or TITLE
PLAYPOINT TempPoint; //added by jane
switch(MsgInput)
{
case C_CONSOLE_TIMER://close console
menus[cnsl_cur_item].baseRect.bkColor = 241;
menus[cnsl_cur_item].baseRect.leftEdgeColor = 61;
if (g_UiCrntFunc == UI_FUNC_NORMAL)
{
CloseConsole();
}
return UI_IS_FUNC_MSG;
case C_CONSOLE_AUDIO_TIMER:
return UI_IS_FUNC_MSG;
case C_CONSOLE_PTT_TIMER://new parameters validate
if(DiscType == C_DVD || C_DVD_VR)
{
if(cnsl_cur_item == 0)
{
playKey = KEY_TITLE;
if(NVIsUOPPermit(UOP2)!=TRUE && g_UiCoreState != UI_CORE_STOP)
{
ItemState = EDIT_STATE;
return UI_IS_FUNC_MSG;
}
if(RepeatAB_Counter==REPEAT_AB_A )//&& (DiscType==C_DVD||DiscType==C_DVD_VR))
{
RepeatAB_Counter=REPEAT_AB_OFF;
g_UiPlaybackRepeatRange=UI_PLAYBACKRANGE_REPEATNONE;
}
}
else if(cnsl_cur_item == 1)
{
playKey = KEY_PTT;
if(NVIsUOPPermit(UOP1)!=TRUE || NVIsUOPPermit(UOP5)!=TRUE)
{
//ItemState = EDIT_STATE;
//return UI_IS_FUNC_MSG;
ShowDiscInfo(MSG_INVALID,MSG_NULL);
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
curpgnum = OSD_Console_Parameter.PlayPoint.wPTTN;
temppttn=curpgnum;
totalpg=NVGetTTPTTNs(OSD_Console_Parameter.PlayPoint.wTTN);
// if ((DiscType==C_DVD)||(DiscType == C_DVD_VR))
{
BOOL flag;
GetModeStr(MODESTR_NUMSELECT,curpgnum,totalpg,str);
if(totalpg > 1)
flag = CheckIfActive(CNSL_BOX_CHAPTER_DVD);
else
flag = 0;
ShowBoxWithMemdc(gui_hdc,&menus[1],str,flag);
}
return UI_IS_FUNC_MSG;
}
}
else
playKey = KEY_NULL;
}
//030807-02lily
if(g_UiCoreState==UI_CORE_STOP)
{
ifexit=TRUE;
CurrentDomain = TT_DOM;
}
else
ifexit=FALSE;
//end 030807-02lily
NVGetCurInfo(&TempPoint);
{
BOOL chkflag;
if (g_UiCoreState != UI_CORE_PLAY)
{
ClearRectArea(gui_hdc,GUITYPE_PLAYMODEGUI);
bActionCtl = 0;
SendVFDPart1Show();
NVPlayModeChg(C_NV_Play,0);
ScrSaver(SCRSAVER_CANCEL);
ShowPlayModeGui(RS_FUN_OSD_PLAY, MSG_NULL );
g_UiCoreState = UI_CORE_PLAY;
}
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
OSD_Console_Parameter.PlayPoint.bDomain = 3;
if (!NVNoneSPECPTTPlay(&OSD_Console_Parameter.PlayPoint, C_STOP_SKIPPG,playKey))
{
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
curpgnum = OSD_Console_Parameter.PlayPoint.wTTN;
GetModeStr(MODESTR_NUMSELECT,OSD_Console_Parameter.PlayPoint.wTTN,NVGetTTNsOrTrks(),str);
if((DiscType==C_DVD)||(DiscType == C_DVD_VR)){
chkflag = CheckIfActive(CNSL_BOX_TITLE_DVD);
}
else{
chkflag = CheckIfActive(CNSL_BOX_TITLE_VCD);
}
ShowBoxWithMemdc(gui_hdc,&menus[0],str,chkflag);
if ((DiscType == C_DVD)) //030530-01ba//dvd audio sh
{
/*if(NVIsUOPPermit(UOP1)!=TRUE || (NVIsUOPPermit(UOP5)!=TRUE) )
{
UNStringCopy(str, "\0-\0-\0\0");
}
else*/
{
GetModeStr(MODESTR_NUMSELECT,OSD_Console_Parameter.PlayPoint.wPTTN,NVGetTTPTTNs(curpgnum),str);
}
ShowBoxWithMemdc(gui_hdc,&menus[1],str,CheckIfActive(CNSL_BOX_CHAPTER_DVD));
}
}
else
{
if(cnsl_cur_item_id==CNSL_BOX_TITLE_DVD)
tmpcurtt=OSD_Console_Parameter.PlayPoint.wTTN;
else
tmpcurtt=OSD_Console_Parameter.PlayPoint.wPTTN;
bitcount=0;
}
if( (g_UiPlaybackRepeatRange!=UI_PLAYBACKRANGE_REPEATALL&&RepeatAB_Counter!=REPEAT_AB_A) || //added by jane
((cnsl_cur_item == 0)&& ((DiscType==C_DVD||DiscType==C_DVD_VR) && (RepeatAB_Counter==REPEAT_AB_A||g_UiPlaybackRepeatRange==UI_PLAYBACKRANGE_REPEATALL))))
UiClearPlaybckMd();
}
if(ifexit) //030807-02lily
CloseConsole();
//changed by gamble
SendVFDPart1Show();
ItemState=DISPLAY_STATE;
return UI_IS_FUNC_MSG;
case C_ZOOM_TIMER:
gZoomFuncPlus=FALSE;
SetTimer(OSD2_TM_ID, CancelZoom, INFINITETIME);
if((DiscType==C_FILEOPENDISC&&FileType==C_JPGFILE)||bMixPlay)
Send_UI_Message(0x44,0,0);
ClearRectArea(gui_hdc, GUITYPE_ZOOM);
return UI_IS_FUNC_MSG;
default:
return UI_NOUSE_FUNC_MSG;
}
}
void ConsoleModifyTT_PTT_SRC(void)
{
BYTE bIsInv;
//int tmpcurtt;
BYTE str[30];
int totalTT,totalPTT;
BOOL inSymbol;
BOOL chkflag;
if((ItemState == EDIT_STATE)||(ItemState ==WAITING_STATE))
return;
NVGetCurInfo(&OSD_Console_Parameter.PlayPoint);
totalTT=NVGetTTNsOrTrks(); //modified by jane
if ((DiscType == C_DVD)||(DiscType == C_DVD_VR))
{
/*get title message*/
GetModeStr(MODESTR_NUMSELECT,OSD_Console_Parameter.PlayPoint.wTTN,NVGetTTNsOrTrks(),str);
if (totalTT>1)
chkflag = CheckIfActive(CNSL_BOX_TITLE_DVD);
else
chkflag = 0;
ShowBoxWithMemdc(gui_hdc,&menus[0],str,chkflag);
tmpcurtt=OSD_Console_Parameter.PlayPoint.wTTN;
//modify chapter
totalPTT=NVGetTTPTTNs(OSD_Console_Parameter.PlayPoint.wTTN); //modified by jane
if (NVChkIsMultiPGC()) //|| NVIsUOPPermit(UOP1)!=TRUE || (NVIsUOPPermit(UOP5)!=TRUE) )
{
//31013 gamble for UOP for PTT_search display in console
//UNStringCopy(str, "\0-\0-\0\0");
if(cnsl_cur_item==1)
{
CONSOLEHighLightItem(gui_hdc,1,FALSE);
CONSOLEHighLightItem(gui_hdc,0,TRUE);
cnsl_cur_item=0;
}
else
{
UNStringCopy(str, "\0-\0-\0\0");
if (totalPTT>1)
chkflag = CheckIfActive(CNSL_BOX_CHAPTER_DVD);
else
chkflag = 0;
ShowBoxWithMemdc(gui_hdc,&menus[1],str,chkflag);
}
}
else
{
GetModeStr(MODESTR_NUMSELECT,OSD_Console_Parameter.PlayPoint.wPTTN,NVGetTTPTTNs(OSD_Console_Parameter.PlayPoint.wTTN),str);
temppttn=OSD_Console_Parameter.PlayPoint.wPTTN;
if (totalTT>1)
chkflag = CheckIfActive(CNSL_BOX_CHAPTER_DVD);
else
chkflag = 0;
ShowBoxWithMemdc(gui_hdc,&menus[1],str,0);
}
//31013 gamble for UOP for PTT_search display in console end
}
else/*get track message*/
{
if(OSD_Setup_Parameter.bPBC!=C_ON||DiscType==C_VCD10)
{
GetModeStr(MODESTR_NUMSELECT,OSD_Console_Parameter.PlayPoint.wTTN,NVGetTTNsOrTrks(),str);
//modified by jane
if (totalTT>1)
chkflag = CheckIfActive(CNSL_BOX_TITLE_VCD);
else
chkflag = 0;
ShowBoxWithMemdc(gui_hdc,&menus[0],str,chkflag);
tmpcurtt=OSD_Console_Parameter.PlayPoint.wTTN;
}
}
}
void ConsoleModifyVoice(void)
{
if(DiscType==C_DVD||DiscType==C_DVD_VR)
{
if(CheckIfActive(CNSL_BOX_AUDIO_DVD))
CONSOLEHighLightItem(gui_hdc, CNSL_BOX_AUDIO_DVD,TRUE);
else
ShowConsleItem(gui_hdc, CNSL_BOX_AUDIO_DVD);
}
else
{
if(CheckIfActive(CNSL_BOX_AUDIO_VCD))
CONSOLEHighLightItem(gui_hdc, CNSL_BOX_AUDIO_VCD-CNSL_BOX_TITLE_VCD,TRUE);
else
ShowConsleItem(gui_hdc, CNSL_BOX_AUDIO_VCD);
}
}
//31022 GAMBLE for change to normal show when mic in
void ConsoleModifyVocal(void) //NORMAL OR 3D-SUR
{
#if 1
ShowConsleItem(gui_hdc, (DiscType==C_DVD||DiscType==C_DVD_VR)?CNSL_BOX_SOUND_DVD : CNSL_BOX_SOUND_VCD);
#else
if(DiscType==C_DVD||DiscType==C_DVD_VR)
{
ShowConsleItem(gui_hdc,CNSL_BOX_SOUND_DVD);
}
else
ShowConsleItem(gui_hdc,CNSL_BOX_SOUND_VCD);
#endif
}
//31022 GAMBLE for change to normal show when mic in end
void ConsoleModifySubPic(void)
{
if(DiscType==C_DVD||DiscType==C_DVD_VR)
ShowConsleItem(gui_hdc,CNSL_BOX_SUBTITLE_DVD);
}
void ConsoleModifyAngle(void)
{
ShowConsleItem(gui_hdc, CNSL_BOX_ANGLE_DVD);
}
/*--------------------------------------------------------------------
* Function_Name SetConsoleTimer()
*
* Description:
* 1. Set Console Timer
*
* Arguments: DWORD playtime: Play time
*
* Return Value: ER : Error Code of set timer
*
*------------------------------------------------------------------*/
ER SetConsoleTimer(DWORD playtime)
{
T_DALM pk_dalm;
pk_dalm.almatr = TA_HLNG;
pk_dalm.tmmode = TTM_REL;
pk_dalm.name = (B*) NADR;
pk_dalm.almhdr = ConsoleTimer;
pk_dalm.almtim.utime = 0;
pk_dalm.almtim.ltime = playtime;
return(def_alm(CONSOLE_TM_ID, &pk_dalm));
}
/*--------------------------------------------------------------------
* Function_Name SetConsoleTimer()
*
* Description:
* 1. Set Console Timer
*
* Arguments: DWORD playtime: Play time
*
* Return Value: ER : Error Code of set timer
*
*------------------------------------------------------------------*/
ER SetConsolePTTTimer(DWORD playtime)
{
T_DALM pk_dalm;
pk_dalm.almatr = TA_HLNG;
pk_dalm.tmmode = TTM_REL;
pk_dalm.name = (B*) NADR;
pk_dalm.almhdr = ConsolePTTTimer;
pk_dalm.almtim.utime = 0;
pk_dalm.almtim.ltime = playtime;
return(def_alm(CONSOLE_PTT_TM_ID, &pk_dalm));
}
void ConsolePTTTimer(void)
{
if(PollCmdUIMsg(C_TIMER_ACTIVE, C_CONSOLE_PTT_TIMER)==FALSE)
{
SetConsolePTTTimer(C_WAIT_MSG_TIME);
}
}
void ConsoleTimer(void)
{
if(PollCmdUIMsg(C_TIMER_ACTIVE, C_CONSOLE_TIMER)==FALSE)
{
SetConsoleTimer(C_WAIT_MSG_TIME);
}
}
void ConsoleModifyTimeSRC(void)
{
// printf("ConsoleModifyTimeSRC---------------->\r\n");
if ((DiscType==C_DVD)||(DiscType == C_DVD_VR))
{
if(cnsl_cur_item==2)
return;
}
else//vcds
if(cnsl_cur_item == 1){
// if((DiscType == C_VCD10 || DiscType == C_VCD20 || DiscType == C_SVCD)&&(cnsl_cur_item == 1))
return;
}
#if 1
{
BYTE mode;
BYTE index;
if(DiscType == C_DVD || DiscType == C_DVD_VR){
mode = C_DISC_TM;
index = 2;//C_CONSOLE_DVDTIMESRC;
}
else{
mode = C_TRACK_TM;
index = 1;//C_CONSOLE_VCDTIMESRC;
}
GetTimeStr(NVGetVideoTime(mode),C_DISC_TM,timestr);
ShowBoxWithMemdc(gui_hdc, &menus[index], timestr,0);
}
#else
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
{
GetTimeStr(NVGetVideoTime(C_DISC_TM), C_DISC_TM, timestr);
ShowBoxWithMemdc(gui_hdc, &menus[C_CONSOLE_DVDTIMESRC], timestr,0);
// ShowBoxWithMemdc(gui_hdc, &brc[C_CONSOLE_DVDTIMESRC], &bmpbox[C_CONSOLE_DVDTIMESRC], timestr,0);
}
else
{
GetTimeStr(NVGetVideoTime(C_TRACK_TM), C_DISC_TM, timestr);
ShowBoxWithMemdc(gui_hdc, &menus[C_CONSOLE_VCDTIMESRC], timestr,0);
}
#endif
}
BYTE GetCurItem(void)
{
if((DiscType==C_DVD)||(DiscType == C_DVD_VR))
{
//haiyuan030821 for uop
/* if(cnsl_cur_item == 1 && (NVIsUOPPermit(UOP1)!=TRUE) || (NVIsUOPPermit(UOP5)!=TRUE) ) //modified by jane (NVIsUOPPermit(UOP2)!=TRUE || NVIsUOPPermit(UOP1)!=TRUE)
cnsl_cur_item = 0;*/
if(cnsl_cur_item == 2 && (NVIsUOPPermit(UOP0)!=TRUE) || (NVIsUOPPermit(UOP5)!=TRUE) )
cnsl_cur_item = 0;
//-------------------
// return cnsl_cur_item;
}
// else
return cnsl_cur_item;
}
WORD CnslItemTitle(WORD msgtype)
{
int temp, totalpg,ifexit;
BYTE str[30];
totalpg=NVGetTTNsOrTrks();
if(NVIsUOPPermit(UOP2)!=TRUE)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -