📄 nmosd.c
字号:
tempRect.top = MODELITTLEBOXTOP - totalRect.top;
tempRect.bottom = MODELITTLEBOXHBOTTOM - totalRect.top;
tempRect.right = MODELITTLEBOXRIGHT - totalRect.left;
GUI_CreateButtonControl2(hMemDC, &tempRect, clLittleBk, clLittleBk, clLittleBk, clLittleBk, "", NORMAL_STRING, 0, 0);
for(i=0;i<consoleAudioItem.lineCount;i++)
{
tempRect.left = 0;
tempRect.top = 4 + i*(17+1);
tempRect.bottom = tempRect.top + 17;
tempRect.right = MODEBOXRIGHT -MLCSI_TXT_RIGHT_MG-totalRect.left;
GUI_CreateButtonControl2(hMemDC,&tempRect,CL_BKNOCARE,CL_BKNOCARE,CL_BKNOCARE, clText,consoleAudioItem.lpString[i],UNICODE_STRING, DT_RIGHT | DT_VCENTER | DT_SINGLELINE | DT_CHARCLIP, 0);
}
BitBlt(gui_hdc, totalRect.left, totalRect.top, totalRect.right-totalRect.left, totalRect.bottom-totalRect.top, hMemDC, 1,0,SRCCOPY);
DelMemoryDC(hMemDC, hOldBmp);
modeGuiType = MSG_VOICE;
/*
COLORREF clBk;
HBRUSH hbr;
RECT totalRect={48,32,96,192};
clBk = GetColorInDef256Palette(MODEBOX_COLOURE_BK);
hbr=CreateSolidBrush(clBk);
FillRect(gui_hdc, &totalRect, hbr);
DeleteObject((HGDIOBJ)hbr);
SPRINTF("totalRect.left=%d, totalRect.top=%d, totalRect.right=%d, totalRect.bottom=%d\r\n",totalRect.left,totalRect.top, totalRect.right,totalRect.bottom);
*/
}
/*----------------------------------------------------------------------------
* Function name: GetAudioInfo2Item
* Arguments: lpMLineConsItem lpMItem
* Return value: None
* Remark: get audio information to form the correct multiline string.
*----------------------------------------------------------------------------*/
void GetAudioInfo2Item(lpMLineConsItem lpMItem)
{
WORD wStrID;
BYTE i,pos;
AUDIOSTREAM AudioInfo;
DWORD acmode;
static DWORD oldacmode=0;
//static tAudType oldAudType=0;
BYTE dolby[] = {0xe0,0x0d,0x00,'D',0x00,0x00};
BYTE dts[] = {0x00,'D',0x00,'T',0x00,'S',0x00,0x00};
BYTE mpeg[] = "\0M\0P\0E\0G\0\0";
BYTE pcm[] = "\0P\0C\0M\0\0";
BYTE ppcm[] = "\0P\0P\0C\0M\0\0";
BYTE AC3TypeCh[16];
BYTE OtherTypeCh[] = {0x00,'0',0x00,'C',0x00,'H',0x00,0x00};
BYTE unknown[]="\0U\0N\0K\0N\0O\0W\0N\0\0";
BYTE None[]="\0 \0\0";
BYTE mono[]={0x00,'M',0x00,'o',0x00,'n',0x00,'o',0x00,0x00};
BYTE stereo[]={0x00,'S',0x00,'t',0x00,'e',0x00,'r',0x00,'e',0x00,'o',0x00,0x00};
BYTE dual[]={0x00,'D',0x00,'u',0x00,'a',0x00,'l',0x00,0x00};
BYTE main[]={0x00,'M',0x00,'a',0x00,'i',0x00,'n',0x00,0x00};
BYTE sub[]={0x00,'S',0x00,'u',0x00,'b',0x00,0x00};
BYTE mainsub[]={0x00,'M',0x00,'+',0x00,'S',0x00,0x00};
NVGetAudioInfo(&AudioInfo);
if((!AudioInfo.AStreamTotalNo)||(DiscType == C_FILEOPENDISC))
{
memcpy(lpMItem->lpString[0],None,sizeof(None));
}
else
{
if (AudioInfo.AStreamTotalNo == 1)
GetModeStr(MODESTR_NUMSTR,1,GUI_LANGUAGEID[NVGetLanguageID(1,AudioInfo.AStreamNo)],lpMItem->lpString[0]);
else
GetModeStr(MODESTR_NUMSTR, AudioInfo.AStreamNo,GUI_LANGUAGEID[NVGetLanguageID(1,AudioInfo.AStreamNo)],lpMItem->lpString[0]);
}
if(AudioInfo.AStreamTotalNo<=1)
{
lpMItem->curLine = 0;
}
//get audio type
switch(AudioType)
{
case C_AC3:
for(i=0;i<30;i++)
{
lpMItem->lpString[1][i]=dolby[i];
}
break;
case C_DTS:
for(i=0;i<30;i++)
{
lpMItem->lpString[1][i]=dts[i];
}
break;
case C_MPEG:
case C_MPEGI:
case C_MPEGII:
for(i=0;i<30;i++)
{
lpMItem->lpString[1][i]=mpeg[i];
}
break;
case C_LPCM_DVDV :
case C_LPCM_DVDA :
for(i=0;i<30;i++)
{
lpMItem->lpString[1][i]=pcm[i];
}
break;
case C_MLP:
for(i=0;i<30;i++)
{
lpMItem->lpString[1][i]=ppcm[i];
}
break;
default:
for(i=0;i<30;i++)
{
//lpMItem->lpString[1][i] = unknown[i];
lpMItem->lpString[1][i] = None[i];
}
}
#ifdef _DVD_VR_ENABLE_
if(DiscType==C_DVD_VR)
{
switch(AudioInfo.AStreamCHNo)
{
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
for(i=0;i<16;i++)
AC3TypeCh[i]=0;
AC3TypeCh[1]=AudioInfo.AStreamCHNo+'0';
AC3TypeCh[3]='/';
AC3TypeCh[5]='0';
for(i=0;i<16;i++)
{
lpMItem->lpString[2][i] = AC3TypeCh[i];
}
break;
case 10:
for(i=0;i<16;i++)
{
lpMItem->lpString[2][i] = dual[i];
}
break;
}
}
else
#endif
{
//gamble add for lg audio display spec
switch(AudioType)
{
case C_AC3:
case C_DTS:
//40218-hope :: Add For MPEG Channel Info Display
case C_MPEG:
case C_MPEGI:
case C_MPEGII:
case C_MPEG_MCH:
for(i=0;i<16;i++)
AC3TypeCh[i]=0;
acmode=GetACMode();
if((acmode&0x80)==0)// && oldAudType==AudioType)
{
acmode=oldacmode;
}
else
{
oldacmode=acmode;
//oldAudType=AudioType;
}
if(acmode)
{
//EPRINTF("acmode=%x\n",acmode);
if(acmode&0x20)
{
AC3TypeCh[7]='.';
AC3TypeCh[9]='1';
}
switch(acmode&0x1f)
{
case 0:
AC3TypeCh[1]='1';
AC3TypeCh[3]='+';
AC3TypeCh[5]='1';
break;
case 1:
AC3TypeCh[1]='1';
AC3TypeCh[3]='/';
AC3TypeCh[5]='0';
break;
case 2:
AC3TypeCh[1]='2';
AC3TypeCh[3]='/';
AC3TypeCh[5]='0';
break;
case 3:
AC3TypeCh[1]='3';
AC3TypeCh[3]='/';
AC3TypeCh[5]='0';
break;
case 4:
AC3TypeCh[1]='2';
AC3TypeCh[3]='/';
AC3TypeCh[5]='1';
break;
case 5:
AC3TypeCh[1]='3';
AC3TypeCh[3]='/';
AC3TypeCh[5]='1';
break;
case 6:
AC3TypeCh[1]='2';
AC3TypeCh[3]='/';
AC3TypeCh[5]='2';
break;
case 7:
AC3TypeCh[1]='3';
AC3TypeCh[3]='/';
AC3TypeCh[5]='2';
break;
case 8:
AC3TypeCh[1]='4';
AC3TypeCh[3]='/';
AC3TypeCh[5]='2';
break;
case 9:
AC3TypeCh[1]='4';
AC3TypeCh[3]='/';
AC3TypeCh[5]='4';
break;
case 10:
AC3TypeCh[1]='5';
AC3TypeCh[3]='/';
AC3TypeCh[5]='2';
break;
case 11:
AC3TypeCh[1]='5';
AC3TypeCh[3]='/';
AC3TypeCh[5]='3';
break;
case 12:
AC3TypeCh[1]='3';
AC3TypeCh[3]='/';
AC3TypeCh[5]='3';
break;
default:
AC3TypeCh[1]='?';
AC3TypeCh[3]='/';
AC3TypeCh[5]='?';
break;
}
if(acmode&0x40)
AC3TypeCh[5]++;
}
for(i=0;i<16;i++)
{
//EPRINTF("%02x ",AC3TypeCh[i]);
lpMItem->lpString[2][i] = AC3TypeCh[i];
}
//EPRINTF("\n");
break;
case C_LPCM_DVDV :
case C_LPCM_DVDA :
case C_MLP:
for(i=0;i<8;i++)
{
lpMItem->lpString[2][i] = OtherTypeCh[i];
}
lpMItem->lpString[2][1]='0'+AudioInfo.AStreamCHNo;
break;
default:
for(i=0;i<8;i++)
{
lpMItem->lpString[2][i] = 0x00;
}
break;
}
}
//JANE added for only show unknown when AStreamTotalNo=0
if (!AudioInfo.AStreamTotalNo)
{
memset(lpMItem->lpString[0],0,30);
lpMItem->lpString[0][1]='1';
lpMItem->lpString[0][3]=' ';
memcpy(lpMItem->lpString[1],None,sizeof(None));
memcpy(lpMItem->lpString[2],None,sizeof(None));
}
//get the bmp
lpMItem->lpbaseBmp->lpBitmapName = GET_IMNAME(IM_GUI_AUDIO);
lpMItem->lpbaseBmp->height =40;
lpMItem->lpbaseBmp->width =40;
}
/*----------------------------------------------------------------------------
* Function name: ShowPlayModeGui
* Arguments: WORD guiMode,WORD exInfo
* Return value: None
* Remark: show playmode gui,such as scan,slow,fast,reverse and so on.
*----------------------------------------------------------------------------*/
void ShowPlayModeGui(WORD guiMode,WORD exInfo)
{
int pos,i;
static BaseRect br=
{
// {MSGLEFT,MSGTOP, MSGRIGHT, MSGBOTTOM},
{MSGIMGLEFT,MSGIMGTOP,MSGIMGRIGHT,MSGIMGBOTTOM},
251,
251,
251
};
static BaseBmp bbp =
{
0,
MSGIMGLEFT,
MSGIMGTOP,
MSGIMGRIGHT-MSGIMGLEFT,MSGIMGBOTTOM-MSGIMGTOP
};
static BYTE strTail[] = {0x00,'1',0x00,'/',0x00,0x00};
static BYTE str100[] = {0x00,'1',0x00,'0',0x00,'0',0x00,0x00};
static BYTE strContent[40]={0x00,'N',0x00,'O',0x00,'S',0x00,'P',0x00,0x00};
#ifdef _MPLAY_ENABLE_
//--> Gordon. in Slide show, the dc is different, so the position was not correct if using old dc, to let it be the same as MPO, I reimplemented it.
if(FileType==C_JPGFILE )
{
gAuxParam.iPlayMode=&guiMode;
// MPA_RefreshAuxiliary(AT_PLAYMODE_CLR, &gAuxParam);
MPA_RefreshAuxiliary(AT_PLAYMODE_CHG, &gAuxParam);
}
else
//<-- Gordon
#endif //MPLAYER_ENABLE
{
if(infotype==MSG_INVALID||infotype==MSG_LOADING||infotype==MSG_NUM)
{
ClearRectArea(gui_hdc, GUITYPE_PLAYMODEGUI);//for lg bug2814
SetTimer(SHOWINVALID_TM_ID,ShowInvalidTimer,INFINITETIME);
infotype=MSG_NULL;
}
//-->Alan, bug fix: 205
else
{
ClearRectArea(gui_hdc, GUITYPE_PLAYMODEGUI);
}
//<--Alan, bug fix: 205
//DrawBaseRect(gui_hdc, &br);
pos = LoadText(guiMode, strContent,20);
pos--;
pos--;
if(guiMode==RS_FUN_OSD_SLOW || guiMode==RS_FUN_OSD_REV_SLOW)
{
UNStringCopy(strContent+pos,strTail);
i=4;
if(exInfo>10)
{
strContent[pos+i]=0x00;
i++;
strContent[pos+i]='0'+(exInfo/10)%10;
i++;
}
strContent[pos+i]=0x00;
i++;
strContent[pos+i]='0'+exInfo%10;
i++;
strContent[pos+i]=0x00;
i++;
strContent[pos+i]=0x00;
}
if(guiMode==RS_FUN_OSD_SCAN || guiMode==RS_FUN_OSD_REV_SCAN)
{
if(exInfo==16)
{
for(i=0;i<8;i++)
{
strContent[pos+i]=str100[i];
}
}
else
{
if(exInfo==8&&(DiscType == C_DVD))
{
exInfo=16;
}
i=0;
if(exInfo>10)
{
strContent[pos+i]=0x00;
i++;
strContent[pos+i]='0'+(exInfo/10)%10;
i++;
}
strContent[pos+i]=0x00;
i++;
strContent[pos+i]='0'+exInfo%10;
i++;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -