repeat.c
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:5k
源码类别:
DVD
开发平台:
C/C++
- /**************************************************************************
- * *
- * Copyright (c) 2002 by Sunplus Technology Co., Ltd. *
- * *
- * This software is copyrighted by and is the property of Sunplus *
- * Technology Co., Ltd. All rights are reserved by Sunplus Technology *
- * Co., Ltd. This software may only be used in accordance with the *
- * corresponding license agreement. Any unauthorized use, duplication, *
- * distribution, or disclosure of this software is expressly forbidden. *
- * *
- * This Copyright notice MUST not be removed or modified without prior *
- * written consent of Sunplus Technology Co., Ltd. *
- * *
- * Sunplus Technology Co., Ltd. reserves the right to modify this *
- * software without notice. *
- * *
- * Sunplus Technology Co., Ltd. *
- * 19, Innovation First Road, Science-Based Industrial Park, *
- * Hsin-Chu, Taiwan, R.O.C. *
- **************************************************************************/
- /*--------------------------------------------------------------------------
- | File Name : v11.c
- |
- | Description : .... pseudo hook for 1.1 playback.
- |
- | Version : 0.1
- |
- | Rev Date Author(s) Status & Comments
- |-----------------------------------------------------------------------------------------
- | 0.1 Creating
- | 0.1 2004/11/30 Linrc Add Comments
- |-----------------------------------------------------------------------------------------*/
- #include "config.h"
- #include "global.h"
- #include "macro.h"
- #include "util.h"
- #include "func.h"
- #include "user_init.h"
- //#include "cfont.h"
- //#include "ircmd.h"
- //#include "osd.h"
- #ifdef SP1000_NO_DVD
- #include "repeat_null.c"
- #else
- //#define REPEAT_DBG 1
- /**************************************************************************
- * Function Name: int repeat_func(void) *
- * Purposes: *
- * DO repeat function *
- * Descriptions: *
- * DO repeat function *
- * Arguments: *
- * input:None *
- * Returns: Track will play *
- * See also: None *
- **************************************************************************/
- int
- repeat_func(void)
- {
- int play_trk_now =cd_trk_now;
- int func=GET_CMD_SELECT();
- //repeat state check here
- if(rep_mode==REPEAT_TRACK)
- {
- play_trk_now = rep_track;
- ShowRepInfo();
- }else
- {
- if (IS_CMD_FUNC())
- {
- if(func==CMD_FUNC_PREV)
- {
- if (cd_trk_now == cd_trk_lo_now) {
- cd_trk_now = cd_trk_hi;
- } else {
- cd_trk_now--;
- }
- }else if(func==CMD_FUNC_NEXT)
- {
- if (cd_trk_now == cd_trk_hi) {
- cd_trk_now = cd_trk_lo_now;
- //osd_print2(OS_REP_ALL); //zhyf unmark it 1-3-4 21:18
- //PrintOsdMsg(STR_OS_REP_ALL, REGION2, 1, 0); /* alan 02-05-27 modified */
- ShowRepInfo();
- } else {
- cd_trk_now++;
- }
- }else if(func==CMD_FUNC_TIMEOUT)
- {
- if (prog_cnt==0) { //jjding 2001/4/2 02:59PM
- if (play_state!=VCD_STATE_FASTBACKWARD) {
- if(cd_trk_now > cd_trk_hi) { //zyf 2000/10/30 to solve Repeat ALL
- cd_trk_now = cd_trk_lo_now;
- //osd_print2(OS_REP_ALL); //zhyf unmark it 1-3-4 21:18
- ShowRepInfo();
- }
- } else {
- if(cd_trk_now<cd_trk_lo_now) {
- #ifdef CD_VCD_FB_ONETIME_WHEN_REPEAT //linrc 2004-8-10 14:33
- cd_trk_now = cd_trk_lo_now;
- rep_mode = REPEAT_IDLE;
- ircmd_play();
- #else
- cd_trk_now=cd_trk_hi;
- #endif
- }
- }
- } // end of if (prog_cnt)
- }
- } // end of if ((sys_cmd&0xff00)==CMD_FUNC)
- if (prog_cnt) {
- if(play_state!=VCD_STATE_FASTBACKWARD)
- prog_next();
- else
- prog_prev();
- cd_trk_now = adjust_trk_num(prog[prog_index][0]);
- }
- play_trk_now = cd_trk_now;
- }
- return play_trk_now;
- }
- #endif //#ifdef SP1000_NO_DVD