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

📄 dvd_cmd.h

📁 这是DVD中伺服部分的核心代码
💻 H
字号:
/*****************************************************************************
******************************************************************************
**                                                                          **
**  Copyright (c) 2003 Videon Central, Inc.                                 **
**  All rights reserved.                                                    **
**                                                                          **
**  The computer program contained herein contains proprietary information  **
**  which is the property of Videon Central, Inc.  The program may be used  **
**  and/or copied only with the written permission of Videon Central, Inc.  **
**  or in accordance with the terms and conditions stipulated in the        **
**  agreement/contract under which the programs have been supplied.         **
**                                                                          **
******************************************************************************
*****************************************************************************/

/**
 * @file dvd_cmd.h
 *
 * $Id: dvd_cmd.h,v 1.10 2006/10/26 18:35:27 eric Exp $
 */

#ifndef dvd_cmd_h
#define dvd_cmd_h

#ifdef __cplusplus
extern "C" {
#endif

#define RANDMULT 47989  /* linear congruential multiplier */

#define random(prevrand) (((USHORT)(RANDMULT * prevrand) & 0xffff))

/* navigation command results */
#define NAV_CONTINUE     0x0000 /* do not modify playback sequence */
#define NAV_STOP         0x0100 /* stop the current presentation */
#define NAV_BRANCH       0x0200 /* branch to a different program chain */
#define NAV_BREAK        0x0300 /* break in the current command phase */
#define NAV_PRE_CMD      0x0400
#define NAV_POST_CMD     0x0500
#define NAV_GOTO         0x0600
#define NAV_PG_PLAY      0x0700
#define NAV_LOOP_COUNT   0x0800
#define NAV_PGC_PT_INIT  0x0900
#define NAV_CELL_PLAY    0x0a00 /* play next/prev cell */
#define NAV_SUSPEND      0x0b00 /* suspend the current presentation, waiting
                                 * for messages */

#define SIZEOF_CMD   8  /* 8 bytes per command */

/* SetSystem Instruction Group Option */
#define SET_STN      0x01       /* set stream numbers */
#define SET_NVTMR    0x02       /* set navigation timers */
#define SET_GPRMMD   0x03       /* set general parameter mode & value */
#define SET_AMXMD    0x04       /* set player audio mixing mode */
#define SET_HL_BTNN  0x06       /* set highlighted button */

/* Link Sub-Instruction */
#define SINS_LINK_NO_LINK     0x00
#define SINS_LINK_TOP_C       0x01
#define SINS_LINK_NEXT_C      0x02
#define SINS_LINK_PREV_C      0x03
#define SINS_LINK_TOP_PG      0x05
#define SINS_LINK_NEXT_PG     0x06
#define SINS_LINK_PREV_PG     0x07
#define SINS_LINK_TOP_PGC     0x09
#define SINS_LINK_NEXT_PGC    0x0A
#define SINS_LINK_PREV_PGC    0x0B
#define SINS_LINK_GO_UP_PGC   0x0C
#define SINS_LINK_TAIL_PGC    0x0D
#define SINS_LINK_RSM         0x10

/* Link Instruction Group Option */
#define LINK_SINS    1  /* link by sub-instruction */
#define LINK_PGCN    4  /* link by program chain number */
#define LINK_PTTN    5  /* link by part of title number */
#define LINK_PGN     6  /* link by program number */
#define LINK_CN      7  /* link by cell number */

/* Compare Instruction Group Option */
#define CMP_BC       1  /* bitwise compare */
#define CMP_EQ       2  /* equal */
#define CMP_NE       3  /* bit equal */
#define CMP_GE       4  /* greater than or equal to */
#define CMP_GT       5  /* greater than */
#define CMP_LE       6  /* less than or equal to */
#define CMP_LT       7  /* less than */

/* Jump Instruction Group Option */
#define EXIT         1  /* terminate playback */
#define JUMP_TT      2  /* start presentation of a title */
#define JUMP_VTS_TT  3  /* start presentation of a title based on title no. */
#define JUMP_VTS_PTT 5  /* start presentation of the PTT in the VTS-space */
#define JUMP_SS      6  /* start presentation of a PGC in system-space */
#define CALL_SS      8  /* call the menu PGC in system-space */

/* Values of Domain ID for button command operand */
#define FP_DOM          0       /* First-Play Domain */
#define VMGM_DOM        1       /* Video Manager Domain with Menu ID */
#define VTSM_DOM        2       /* Video Title Set Menu Domain with Menu ID */
#define VMGM_DOM_PGCN   3       /* Video Manager Domain with Program Chain
                                 * No. */

/* Values of Menu ID for button command operand */
/* Consistent with VTSM_PGC_CAT Menu ID */
#define TITLE_MENU   2
#define ROOT_MENU    3
#define SPU_MENU     4
#define AUDIO_MENU   5
#define ANGLE_MENU   6
#define PTT_MENU     7

/* Set Instruction Group Option */
#define OP_MOV       1  /* assign */
#define OP_SWP       2  /* exchange */
#define OP_ADD       3  /* add */
#define OP_SUB       4  /* subtract */
#define OP_MUL       5  /* multiply */
#define OP_DIV       6  /* divide */
#define OP_MOD       7  /* remainder */
#define OP_RND       8  /* assign random value */
#define OP_AND       9  /* bitwise product */
#define OP_OR       10  /* bitwise sum */
#define OP_XOR      11  /* exclusive OR */

/* GoTo Instruction Group Options */
#define GO_TO        1  /* go to another navigation command */
#define BREAK        2  /* exit from the current navigation command area */
#define SET_TMP_PML  3  /* set temporary parental level */

extern UBYTE  jump_tt_flag;
extern USHORT next_pgcn;
extern USHORT next_cell;
extern UBYTE  next_pgn;
extern UBYTE  next_vtsn;
extern ULONG  next_vts_sa;
extern USHORT pgc_domain;
extern UBYTE  menu_rsm;

/* function prototypes */

USHORT dvd_cmd(UBYTE * buf, UBYTE what_cmd);
USHORT set_system_cmd(UBYTE set_i_flg, UBYTE set_sys_opt, UBYTE * operand);
USHORT link_sins_cmd(UBYTE * operand);
USHORT link_cmd(UBYTE link_opt, UBYTE * operand);
BOOLEAN compare_cmd(UBYTE, UBYTE, UBYTE, USHORT);
USHORT jump_cmd(UBYTE branch, UBYTE * operand);
void set_cmd(UBYTE, UBYTE, UBYTE, USHORT);
USHORT goto_cmd(UBYTE branch, UBYTE * operand);
USHORT resume(void);
BOOLEAN jump(USHORT pttn, USHORT vts_ttn, UBYTE vtsn);
USHORT jump_tt(USHORT ttn);
USHORT call_ss(UBYTE, UBYTE, UBYTE, USHORT);
USHORT jump_ss(UBYTE, UBYTE, UBYTE, UBYTE, USHORT);
USHORT go_up_pgc(void);
USHORT link_next_pg(void);
USHORT link_prev_pg(void);
USHORT link_top_pg(void);
USHORT link_pttn(USHORT);
USHORT jump_vts_ptt(UBYTE, USHORT);
void stop_nv_tmr(void);
USHORT get_pgc(void);
BOOLEAN IsValidCommand(BYTE *button);
BOOLEAN IsBranchCommand(BYTE *button);


#ifdef __cplusplus
}
#endif

#endif  /* dvd_cmd_h */
/* DON'T ADD STUFF AFTER THIS #endif */

⌨️ 快捷键说明

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