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

📄 linear.c

📁 ct952 source code use for Digital Frame Photo
💻 C
📖 第 1 页 / 共 5 页
字号:
BYTE LINEAR_Number( WORD wNumber ){    // in Input GoToTime mode//alex1.23,20040218 combine gototime , search,bookmark, Remove __btGotoTime , use __bSearhMode in Linear_Number function    //if (__btGoToTime)    if(__bSearchMode==SEARCH_MODE_TIME)    {        // do not allow the value larger        if ( wNumber>=10 )        {//            OSD_Output(MSG_INVALID,  OSD_ERR_KEY, 1 );            return FALSE;        }        else    // process this input        {            BYTE            bTemp;            // *** MULTI_DISC;  Count the I/P NO. of Time            __bGoToTimeNO++;//DVD_046-1// don;t support goto time number rounding#ifdef      GOTOTIME_NUMBER_NOROUND            if(__bGoToTimeNO>5) return FALSE ; // pxu 2000/09/05 for input number should not more than 5#endif#ifdef    GOTOTIME_LEFTTORIGHT            // LLY.037, support H:MM:SS format input mode            // and there is no limit for input digit            if(__bGoToTimeNO == 1)                __bTimeHour=(BYTE)wNumber;            else if(__bGoToTimeNO == 2)                __bTimeMin=(BYTE)wNumber*10;            else if(__bGoToTimeNO == 3)                __bTimeMin+=(BYTE)wNumber;            else if(__bGoToTimeNO == 4)                __bTimeSec=(BYTE)wNumber*10;            else                __bTimeSec+=(BYTE)wNumber;/*          // only support MM:SS format input mode            if ( __bGoToTimeNO == 1 )                __bTimeMin= bNumber* 10;            if ( __bGoToTimeNO == 2 )                __bTimeMin+= bNumber;            if ( __bGoToTimeNO == 3 )                __bTimeSec= bNumber* 10;            if ( __bGoToTimeNO == 4 )                __bTimeSec+= bNumber;*/#else            __bTimeHour = __bTimeMin/10; // LLY.0371, calculate hour part            bTemp= __bTimeMin% 10;            __bTimeMin= bTemp* 10+ __bTimeSec/ 10;            bTemp= __bTimeSec% 10;            __bTimeSec= bTemp* 10+ (BYTE)wNumber;#endif    // GOTOTIME_NORMALSEQUENCE            // LLY.037, it's unnecessary becasue MSG_GOTOTIME will reference            // __bTimeHour, __bTimeMin, __bTimeSec directly//            __wTemp= MAKEWORD ( __bTimeSec, __bTimeMin );//            OSD_OUTPUT_MACRO ( MSG_GOTOTIME, __wTemp, 0xff );        // DVD_099Micky, GOTOTIME clear//            OSD_OUTPUT_MACRO ( MSG_GOTOTIME, 0, 0xff );//LJY.pc908.060, removed            OSD_OUTPUT_MACRO ( MSG_GOTOTIME, __bGoToTimeNO, 0xff );#ifdef    GOTOTIME_LEFTTORIGHT            if ( __bGoToTimeNO == 5 )   // LLY.036            {            // DVD_277Micky,Fix DVD(GOTOTIME_LEFTTORIGHT) input 5 number-> always show invalid            // update cc/linear/input.h            // move the codes to KEY_GOTOTIME_VALUE            // calculate __dwGoToTIme at one place.                __bFWKey=KEY_GOTOTIME_VALUE;            }#endif    //#ifdef    GOTOTIME_LEFTTORIGHT            return TRUE;        }    }    // key 10+ still can't clear the program mode    // Key number(KEY_Nx) will clear the program status    // is playing program list    if ( __btPlayingProgram && !__btInputProgram && !(wNumber & 0x8000))    {        LINEAR_Program(LINEAR_PROGRAM_CLEAR,NULL_0);    }//Kevin0.86, GDI mode program UI doesn't process number keys    if ( __btProgram )    {    	return TRUE;    }    if ((__bAttrPlay == ATTR_JPG) && (__dwMMJPEGPreview == TRUE))        MM_ResetPreviewMode();    // LLY0.83b-2, return the status of LINEAR_ChangeTrack()    //LINEAR_ChangeTrack ( KEY_NUMBER, wNumber);    //return TRUE;    return LINEAR_ChangeTrack(KEY_NUMBER, wNumber);}//  *********************************************************************//  Function    :   LINEAR_Action//  Description ://  Arguments   :   KEY_GOTOTIME/ KEY_GOTOTIME_PLAY/ KEY_REPEAT_AB//  Return      ://  Side Effect ://  *********************************************************************BYTE LINEAR_Action(BYTE bKey, DWORD dwParam){    __btIntroMode=FALSE;    switch(bKey)    {// f/w 0.34        case    KEY_NUMBER:                return LINEAR_Number((WORD)dwParam);        case    KEY_GOTOTIME:                // PROGRAM / GOTIME can't exist at the same time                if (__btProgram)                {                    LINEAR_Program(LINEAR_PROGRAM_CLEAR,NULL_0);                }                // Micky1.23, LINEAR_Action(KEY_GOTOTIME) must reference __bSearchMode do action, can't modify __bSearchMode./*//                if ( __btGoToTime )                if(__bSearchMode==SEARCH_MODE_TIME)//alex1.23,20040218 combine gototime , search,bookmark                {                    OSD_OUTPUT_MACRO ( MSG_SETGOTOTIME, OSD_CANCEL_TIME, 0 );                    //__btGoToTime= FALSE;                    __bSearchMode=SEARCH_MODE_OFF;//alex1.23,20040218 combine gototime , search,bookmark                }                else*/                {                    // enable GOTOTIME in all kinds of play mode.                    // But after KEY_PLAY trigger, will goto normal play mode.                    // clear time key                    // disable key 10+ before entering GOTOTIME mode                    __dwTimeKey=0;                    //LJY1.24a, marked for reviewing initialization of MODE_LINEAR.                    //UTL_ModeInitial ( MODE_LINEAR );                    //__btGoToTime= TRUE;                    __bSearchMode=SEARCH_MODE_TIME;//alex1.23,20040218 combine gototime , search,bookmark                    //Kevin2.80, move before OSD_OUTPUT_MACRO ( MSG_SETGOTOTIME, OSD_INPUT_TIME, 0xFF ), 'cause 908 GOTOTIME UI needs the reset of the following                    __bTimeHour=0;  // LLY.036                    __bTimeMin= 0;                    __bTimeSec= 0;                    __bGoToTimeNO= 0;//LJY.pc908.060, removed                    OSD_OUTPUT_MACRO ( MSG_SETGOTOTIME, OSD_INPUT_TIME, 0xFF ); //always show goto time                }                return TRUE;        case    KEY_GOTOTIME_PLAY:        {                //__dwGoToTime will be input at entry                //__dwGoToTime is relative to the first playable track//DVD_050SRAM//                DWORD       dwTemp;//                BYTE    bTemp;//DVD_049Micky// remove it, as now won't disable IR//                EX0= 1;  //enable IR interrupt                //check if out of range                // DVD_161icky, remove it,(-150L)                // fix A-Bex(TCD-784)T26, pre-stop at 2 second, can't resume.                // as last track should be able to play to __dwTimeDiscEnd.//                if ( dwParam >= (__dwTimeDiscEnd-150) )    //last 2 seconds            // Micky1.25-2, move out the action to CC.c            /*                if ( dwParam >= (__dwTimeDiscEnd) )                {                    // ** 0.17; Add it, otherwise PANEL don't know the status                    //if ( __btGoToTime )                    if ( __bSearchMode==SEARCH_MODE_TIME)//alex1.23,20040218 combine gototime , search,bookmark                    {                    //__btGoToTime= FALSE;            	        __bSearchMode=SEARCH_MODE_OFF;//alex1.23,20040218 combine gototime , search,bookmark                        OSD_OUTPUT_MACRO ( MSG_SETGOTOTIME, OSD_CANCEL_TIME, 0 );                    }                    return FALSE;                }            */                // ** 0.17; Move from above "EX0= 1";                // Must clear GoToTime input mode                //if (__btGoToTime)                if (__bSearchMode==SEARCH_MODE_TIME)//alex1.23,20040218 combine gototime , search,bookmark                {//LJY1.20, clear it later in _PlayTimeA for fixing GOTOTIME OSD time incorrect issue.//                    __btGoToTime= FALSE;//LJY.pc908.060, removed                    OSD_OUTPUT_MACRO ( MSG_SETGOTOTIME, OSD_COMPLETE_TIME, 0 );                }                //enable GOTOTIME for any mode, special processing pause mode                // wyc1.21                /*if ( __bModeCmd == KEY_FF ) //must slow down CDROM speed                {                    UTL_ChangeCDROMSpeed (1);                }*/                // LLY0.85, support CDROM A/V gotime action.                // LLY2.05, support CDROM/ DVDROM audio only file gotime action.                if( (__bAttrPlay & TYPE_CDROM_AV) || (__bAttrPlay & TYPE_CDROM_AUDIO) )                {                    __dwTemp=__wPlayItem;                }                else                {                    // Micky1.10, Fix JVC-> segmeny play item-> resume-> will play wrong range begin                    // Only need to query PlayItem number for Track/ Entries                    if (__wPlayItem <= 599)                    {#ifndef NO_DISC_MODE //++CoCo2.37p                        __dwTemp=dwParam;                        // Get track number and new Play Range                        CDINFO_ParseInfo ( VCD_ENTRIES_TRACK, & __dwTemp, 0 );                        UTL_GetPlayRange ( (WORD)__dwTemp );#endif //#ifndef NO_DISC_MODE //++CoCo2.37p                    }                    else                        __dwTemp = __wPlayItem;                }                // Micky1.08, Fix JVC-> segmeny play item-> resume-> will play wrong range end                // f/w 0.45, remove these                // since in VCD2.0, this process will have problem                // In PBC mode, when __dwTimeBegin==__dwGoToTime, can't treas as KEY_Nx                // it will destroy PBC info.(in KEY_PRACTICE)                // go time cross another track                // or go time from stop mode                if ( (__wPlayItem != __dwTemp) || !__btPlaying )                {                    if (__wPlayItem != __dwTemp )                    {                        // Cross different track                        __btPlayFromBegin=TRUE;                        __btFromStopMode=TRUE;                    }                    else                    {                        if ( ! __btPause ) // From stop mode                        {                            __btPlayFromBegin=TRUE;                            __btFromStopMode=TRUE;                            __bModeCmd=KEY_PLAY;                        }                        else                        {                            __btPlayFromBegin=FALSE;                            __btFromStopMode=FALSE;                        }                    }                }                else    //go time within same track                {                    __btPlayFromBegin=FALSE;                    __btFromStopMode=FALSE;                }                __wPlayItem=(WORD)__dwTemp;                __btNewTime=TRUE;                // LLY1.05, set the desired playback command for _Play_TimeA() reference                // Since, it don't transfer playback mode as NPF within _Play_TimeA()                // Otherwise, the behavior maybe fail while FF --> GoTime                __bModeCmd=KEY_PLAY;                return TRUE;        }        case    KEY_REPEAT_AB:            // LLY0.96, don't support Repeat AB action while non-exist DivX index table            // LLY1.01, don't support Repeat AB action while audio only mode (video resolution > 720*576)            // LLY2.31, call parser API to check if index table build done.            __dwTemp = PARSER_QueryContainerAudioType(__dwSFStreamID, __bASTNO);            //if( (__bAttrPlay == ATTR_AVI) && (__bNoDivXIndexTbl || __bVideoID==HAL_THROW_VIDEO ||__dwTemp == PARSER_ESFMT_WMA_V1 || __dwTemp == PARSER_ESFMT_WMA_V2) )            if( (__bAttrPlay == ATTR_AVI) &&                (!PARSER_QueryAVIIndexTable() || __bVideoID==HAL_THROW_VIDEO /*||__dwTemp == PARSER_ESFMT_WMA_V1 || __dwTemp == PARSER_ESFMT_WMA_V2*/) )            {                return (FALSE);            }                // only work in NPF and SF                if (__btPlaying && ( (__bModeCmd == KEY_PLAY) || (__bModeCmd== KEY_SF)                    // wyc2.17-909S, for language study.#if (SLOW_MODE_CONFIG == NORMAL_SLOW_PLUS_LANGUAGE_STUDY)                    || (__bModeCmd == KEY_LAN_STUDY)#endif //                ) )                {                    // Do not allow repeat AB for still picture and GOTOTIME//alex1.23,20040218 combine gototime , search,bookmark, Remove __btGotoTime , use __bSearhMode in Linear_Acction function  (Key_Repeat AB)//                    if ( ( __bModePlay & MODE_STILL) || __btGoToTime )                    if ( ( __bModePlay & MODE_STILL) || __bSearchMode)                    {                        return FALSE;                    }                }                else                    return FALSE;                switch ( __bRepeatAB )                {                    case    REPEAT_NONE:                    default:

⌨️ 快捷键说明

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