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

📄 nav_task.c

📁 这是DVD中伺服部分的核心代码
💻 C
📖 第 1 页 / 共 5 页
字号:

                    /* resume normal playmode */
                    DRSetDVDSpeed(tDR, DR_FWDI_NEXT, DR_NORMAL_PLAYBACK);

                    /* abort current play operation */
                    DRStop(tDR);

                    logo_display();
                }

                nav_state = FULL_STOPPED;   /* POWER_ON_FP; */
                pgc_domain = FP_PGC;

                out_msg[0] = VDVD_STATUS_STOP;
                out_msg[1] = 1; /* full stop */
                if (UsrEventHandler(out_msg) != USR_SUCCESS)
                {
                    DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                }

                /* In case of stop in menu domain, clear resume information */
                rsm_info.valid = 0;

                /* invalidate single-stop resume location */
                dvd_stop_location.rsm.valid = 0;

                if (fParental_Play)
                {
                    fParental_Play = FALSE;
                }

#if PROGRAM_MODE == PROGRAM_MODE_2
              /* exit program play mode at full stop, but keep the program data */
                user_program_enable = user_program_start = 0;
#endif
                /* clear the angle flag */
                angle_flag = 0;
            }
            else
            {
                switch (nav_state)      /* KEY_PLAY */
                {
                case NORMAL_PLAYING:
                case FAST_FORWARD:
                case FAST_REVERSE:
                case SLOW_FORWARD:
                case SLOW_REVERSE:
                    TMForwardPlay(PLAY_RATE_PAUSE);
                    break;
                default:
                    break;
                }

                spu_disp_force_off(); /* don't want to see spu when we go to logo */

#if REPEAT_MODE == REPEAT_MODE_1
                if (repeat_mode == REPEAT_A_B)
                {
                    A_B_count = 0;
                    repeat_mode = REPEAT_OFF;
                    UsrSendRepeatEvent(VDVD_INFO_REPEAT_OFF);
                }
#endif

#ifdef CONDITIONAL_RESUME_FROM_STOP
                if ( (pgc_domain != TT_PGC) || (pgc_gi.pgc_uop_ctl[1] & 0x08) ||
                    ((nvpck[CURRENT].pci_gi.vobu_uop_ctl[1] & 0x08) && (pgc_mode >= PGC_PG_PLAY)) ||
                    (0 != pgc_gi.pgc_nv_ctl.pg_playback_mode) )
                {
                    /* Clear all navigation related timers     */
                    clear_nav_timers();
                    wait_for_button_hl = 0;
                    nav_timer_counter  = 0;
                    /*******************************************/

                    resume_from_stop_prohibited = 1;

                    disable_venc_cc();
                    stop_spu_decode();

                    /* CELL_V1 */
                    if (last_vobu_flag == 1)
                    {
                        last_vobu_flag = 2;
                    }
                    clear_loader_queue();
                    /******************/

                    if (modify_video_mode)
                    {
                        modify_video_mode = 0;
                    }

                    /* resume normal playmode */
                    DRSetDVDSpeed(tDR, DR_FWDI_NEXT, DR_NORMAL_PLAYBACK);

                    /* abort current play operation */
                    DRStop(tDR);

                    power_on_flag = 0;     /* enable LOGO display */
                    logo_display();

                    /* Display cannot resume from where previously stop message */
                    /* Playback will start from beginning                       */
                    uop_prohibited_msg(1);

                    /* update the status immediately for fixing of an OSD bug  -- Ning 12/03/99*/
                    resume_prev_state = nav_state;
                    resume_from_stop_prohibited = 0;
                    nav_state = FULL_STOPPED;

                    out_msg[0] = VDVD_STATUS_STOP;
                    out_msg[1] = 1;
                    if (UsrEventHandler(out_msg) != USR_SUCCESS)
                    {
                        DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                    }

                    if (fParental_Play)
                    {
                        fParental_Play = FALSE;
                    }

                    /* In case of stop in menu domain, clear resume information */
                    rsm_info.valid = 0;

                    /* invalidate single-stop resume location */
                    dvd_stop_location.rsm.valid = 0;

#if PROGRAM_MODE == PROGRAM_MODE_2
                    /* exit program play mode at full stop, but keep the program data */
                    user_program_enable = user_program_start = 0;
#endif
                }
                else
#endif
                {
                    /* display splash screen */
                    navtaskSplashScreenShow();

                    /* display background color */
                    PEiConfigureSetVideoMute(tPE, (PE_ICONFIGURE_VIDEO_MUTE)dvd_system_params.background);

                    if (user_program_enable)
                    {
                        user_program_start = 2;   /* Resume from stop in program mode */
                    }

                    resume_from_stop_prohibited = 0;
                    resume_prev_state = nav_state;
                    nav_state = STOPPED;

                    /* invalidate single-stop resume location */
                    dvd_stop_location.rsm.valid = 0;

                    out_msg[0] = VDVD_STATUS_STOP;
                    out_msg[1] = 0; /* pre-stop */
                    if (UsrEventHandler(out_msg) != USR_SUCCESS)
                    {
                        DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                    }

                    if (message[1] & VDVD_STOP_MODE_DECODE_STOP)
                    {
                        DBGPRINT(DBG_ON(DBG_TRACE), ("nav_task: do full-stop and back up location\n"));

                        /* load location info into stop location handle */
                        set_location(&dvd_stop_location);
                        dvd_stop_location.rsm.valid = 1;

                        stop_spu_decode();

                        /* CELL_V1 */
                        if (last_vobu_flag == 1)
                        {
                            last_vobu_flag = 2;
                        }

                        clear_loader_queue();

                        /* resume normal playmode */
                        DRSetDVDSpeed(tDR, DR_FWDI_NEXT, DR_NORMAL_PLAYBACK);

                        /* abort current play operation */
                        DRStop(tDR);

                        logo_display();
                    }
                }

                astn_in_pre_stop = sprm[SPRM_ASTN_TT_DOM];


                /* Setting pgc_mode = PGC_STOP during an angle block causes angle change */
                /* to become prohibited after resuming since in nvpck processing */
                /* pgc_mode is not greater or equal to PGC_PG_PLAY. This code overcomes */
                /* the problem by saving the pgc_mode and then restoring it in KEY_PLAY */

                rsm_stop_pgc_mode = pgc_mode;
                pgc_mode = PGC_STOP;

                pause_scr();
                player_state = STOP;
            }

            /* disable macrovision */
            /* Clear all vbi information when stopping  */
            PEiConfigureSetVideoMacrovision(tPE, 0);
            PEiConfigureSetCGMS(tPE, 0);

            break;

#if (KARAOKE_TYPE != KARAOKE_1) && (KARAOKE_TYPE != NO_KARAOKE)
         case KEY_ECHOJUST:
            if (nav_state != NORMAL_PLAYING)
            {
                uop_prohibited_msg(0);
                break;
            }
#if SUBTITLE_MODE == SUBTITLE_1
            if (subtitle_menu)
            {
                break;
            }
#endif
            if (echomenu_on == TRUE)
            {
                echomenu_on = FALSE;
            }
            else
            {
                echomenu_on = TRUE;
            }

            if (search_on == TRUE)
            {
                search_on = FALSE;
                out_msg[0] = VDVD_STATUS_GOTO;
                out_msg[1] = 0;
                if (UsrEventHandler(out_msg) != USR_SUCCESS)
                {
                    DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                }
            }
            if (program_on == TRUE)
            {
                program_on = FALSE;
                out_msg[0] = VDVD_STATUS_PROGRAM;
                out_msg[1] = program_on;
                if (UsrEventHandler(out_msg) != USR_SUCCESS)
                {
                    DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                }
            }
            if (keymenu_on == TRUE)
            {
                keymenu_on = FALSE;
                out_msg[0] = VDVD_STATUS_KEY_SHIFT;
                out_msg[1] = keymenu_on;
                if (UsrEventHandler(out_msg) != USR_SUCCESS)
                {
                    DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                }
            }
            out_msg[0] = VDVD_STATUS_ECHO;
            out_msg[1] = echomenu_on;
            if (UsrEventHandler(out_msg) != USR_SUCCESS)
            {
                DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
            }
            break;

        case KEY_KEYJUST:
            if (nav_state != NORMAL_PLAYING)
            {
                uop_prohibited_msg(0);
                break;
            }
#if SUBTITLE_MODE == SUBTITLE_1
            if (subtitle_menu)
            {
                break;
            }
#endif
            if (keymenu_on == TRUE)
            {
                keymenu_on = FALSE;
            }
            else
            {
                keymenu_on = TRUE;
            }

            if (search_on == TRUE)
            {
                search_on = FALSE;
                out_msg[0] = VDVD_STATUS_GOTO;
                out_msg[1] = 0;
                if (UsrEventHandler(out_msg) != USR_SUCCESS)
                {
                    DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                }
            }
            if (program_on == TRUE)
            {
                program_on = FALSE;
                out_msg[0] = VDVD_STATUS_PROGRAM;
                out_msg[1] = program_on;
                if (UsrEventHandler(out_msg) != USR_SUCCESS)
                {
                    DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                }
            }
            if (echomenu_on == TRUE)
            {
                echomenu_on = FALSE;
                out_msg[0] = VDVD_STATUS_ECHO;
                out_msg[1] = echomenu_on;
                if (UsrEventHandler(out_msg) != USR_SUCCESS)
                {
                    DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
                }
            }

            out_msg[0] = VDVD_STATUS_KEY_SHIFT;
            out_msg[1] = keymenu_on;
            if (UsrEventHandler(out_msg) != USR_SUCCESS)
            {
                DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
            }
            break;
#endif

#if (KARAOKE_TYPE != KARAOKE_1) && (KARAOKE_TYPE != NO_KARAOKE)
        case KEY_KARAOKE: /* Turn on/off Karaoke play mode */

            if (get_karaoke_on()==FALSE)
            {
                set_karaoke_on(TRUE);
                if (repeat_mode != REPEAT_A_B && (repeat_mode != REPEAT_OFF) )
                {
                    repeat_mode = REPEAT_OFF;
                    repeat_count = 0;
                    UsrSendRepeatEvent(VDVD_INFO_REPEAT_OFF);
                }
                if (shuffle_on)
                {
                    Exit_shuffle_mode();
                }

                /* Send "Karaoke On"message to OSD */
                out_msg[1] = TRUE;
            }
            else
            {
                set_karaoke_on(FALSE);
                /* Send "Karaoke Off"message to OSD */
                out_msg[1] = FALSE;
            }
            out_msg[0] = VDVD_STATUS_KARAOKE;
            if (UsrEventHandler(out_msg) != USR_SUCCESS)
            {
                DbgPrint(("\nUsrEventHandler FAILURE, %s, %d\n\n", __FILE__, __LINE__));
            }
            break;
      case KEY_VOCAL:         /* Vocal Fade */
          out_msg[0] = VDVD_STATUS_VOCALFADE;
          switch (get_vocal_fade_mode())
          {
          case VOCAL_CHANGER:
              set_vocal_fade_mode(VOCAL_OFF);
              /* Send "VOCAL_OFF"message to OSD */
              out_msg[1] = VOCAL_OFF;

⌨️ 快捷键说明

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