📄 dvd_def.h
字号:
/****************************************************************************
* File name
* Dvd_def.h
*
* Start date
* 2002.10.1
*
* By
* Inseo Han
*
* Contact
* ishan@samsung.com
*
* Description
* This file contains the definitions for DVD-Video and
* DVD-Audio Navigator.
*
* HISTORY
*
* NAME DATE REMARKS
*
*
*
*****************************************************************************/
#ifndef _DVD_DEF_H_
#define _DVD_DEF_H_
/***************************************************************************
* INCLUDES
**************************************************************************/
#ifdef _DVD_CONT_FF_4X
#define DVD_CONT_FF_MAX_SPEED PM_SPEED_X4
#else
#define DVD_CONT_FF_MAX_SPEED PM_SPEED_X2
#endif
/**************************************************************************
*
* DVD trick play parameters for customization
*
* Each step value should be the number of 0.5 sec unit.
* For example, if you want to set step 4 secs, set 8
*
* The available time step is
*
* - 1~15 unit (0.5 sec ~ 7.5 sec)
* - 20, 60, 120, 240 unit (10 sec, 30 sec, 60 sec, 120 sec)
*
*
*************************************************************************/
#ifdef _DVD_SMALL_JUMP_STEP
#define DVD_FORWARD_4X_STEP 1
#define DVD_FORWARD_8X_STEP 4
#define DVD_FORWARD_16X_STEP 6
#define DVD_FORWARD_32X_STEP 8
#define DVD_FORWARD_128X_STEP 16
#define DVD_BACKWARD_2X_STEP 1
#define DVD_BACKWARD_4X_STEP 2
#define DVD_BACKWARD_8X_STEP 4
#define DVD_BACKWARD_16X_STEP 6
#define DVD_BACKWARD_32X_STEP 8
#define DVD_BACKWARD_128X_STEP 16
#else
#define DVD_FORWARD_4X_STEP 4 // 2 sec
#define DVD_FORWARD_8X_STEP 8 // 4 sec
#define DVD_FORWARD_16X_STEP 15 // 7.5 sec
#define DVD_FORWARD_32X_STEP 20 // 10 sec
#define DVD_FORWARD_128X_STEP 120 // 60 sec
#define DVD_BACKWARD_2X_STEP 2 // 1 sec
#define DVD_BACKWARD_4X_STEP 4 // 2 sec
#define DVD_BACKWARD_8X_STEP 8 // 4 sec
#define DVD_BACKWARD_16X_STEP 15 // 7.5 sec
#define DVD_BACKWARD_32X_STEP 20 // 10 sec
#define DVD_BACKWARD_128X_STEP 120 // 60 sec
#endif
/********************************************
*
* DVD block size in bytes
*
********************************************/
#define SIZE_DVD_BLOCK 2048
/********************************************
*
* Maximum number of DVD-Video Navigator
*
********************************************/
#define MIN_DVD_V_VTSN 1
#define MAX_DVD_V_VTSN 99
#define MIN_DVD_V_TTN 1
#define MAX_DVD_V_TTN 99
#define MIN_DVD_V_CTY_N 1
#define MAX_DVD_V_CTY_N 255
#define MIN_DVD_V_TTU_N 1
#define MAX_DVD_V_TTU_N 99
#define MIN_DVD_V_PGN 0
#define MAX_DVD_V_PGN 99
#define MIN_DVD_V_CN 0
#define MAX_DVD_V_CN 255
#define MIN_DVD_V_CMD_N 0
#define MAX_DVD_V_CMD_N 128
/********************************************
*
* Size of DVD-Video Navigation Data
*
********************************************/
#define SIZE_DVD_V_TT_SRPTI 8
#define SIZE_DVD_V_TT_SRT 12
#define SIZE_DVD_V_PTL_MAITI 8
#define SIZE_DVD_V_PTL_MAI_SRP 8
#define SIZE_DVD_V_PGCI_UTI 8
#define SIZE_DVD_V_PGCI_LU_SRP 8
#define SIZE_DVD_V_PGCI_LUI 8
#define SIZE_DVD_V_PGCITI SIZE_DVD_V_PGCI_LUI
#define SIZE_DVD_V_PGCI_SRP 8
#define SIZE_DVD_V_C_ADT 8
#define SIZE_DVD_V_TMAPTI 8
#define SIZE_DVD_V_TMAP_SRP 4
#define SIZE_DVD_V_IT_TXT_SRP 4
#define SIZE_DVD_V_TXTDT 4
#define SIZE_DVD_V_TXTDT_LU_SRP 8
#define SIZE_DVD_V_TXTDT_MG 20
#define SIZE_DVD_V_PTT_SRPTI 8
#define SIZE_DVD_V_PTT_SRP 4
#define SIZE_DVD_V_HLI 694
#define SIZE_DVD_A_HLI 694
#define SIZE_DVD_V_PCI 979
#define SIZE_DVD_V_DSI 1017
/********************************************
*
* Size of DVD-Audio Navigation Data
*
********************************************/
#define SIZE_DVD_ATT_SRPTI 4
#define SIZE_DVD_ATT_SRP 14
#define SIZE_DVD_ATS_PGCITI 8
#define SIZE_DVD_ATS_PGCI_SRP 8
#define SIZE_DVD_ATS_PGI 20
#define SIZE_DVD_ATS_PG_ASV_PBI_SRP 6
#define SIZE_DVD_ATS_C_PBI 12
#define SIZE_DVD_ASV_SRP 2
#define SIZE_DVD_DLIST 10
#define SIZE_DVD_ASVU_GI 8
/********************************************
*
* DVD-Video GPRM Mode
*
********************************************/
#define GPRM_MODE_REGISTER 0
#define GPRM_MODE_COUNTER 1
/********************************************
*
* DVD-Video Navigation State
*
********************************************/
/* Masks */
#define STATE_READ_MASK 0x10000
#define STATE_STATIONARY_MASK 0x1000
#define STATE_STILL_MASK 0x0100
typedef enum {
STATE_NULL = 0,
/******************************************
* For DVD-Video
******************************************/
/* Read State */
STATE_READ_VMGI = 0x10001,
STATE_READ_VTSI = 0x10002,
STATE_READ_PGCIT = 0x10004,
STATE_READ_PGCI = 0x10005,
/* Transitory state */
STATE_PRE_CMD = 0x0006,
STATE_PGC_START = 0x0007,
STATE_PG_PREPARE = 0x0008,
STATE_PG_RANDOM = 0x0009,
STATE_PG_START = 0x000a,
STATE_CELL_START = 0x000b,
STATE_UNIT_PLAY = 0x000c,
STATE_CELL_CMD = 0x000d,
STATE_CELL_END = 0x000e,
STATE_PG_END = 0x000f,
STATE_POST_CMD = 0x0010,
STATE_PGC_END = 0x0011,
STATE_EMERGENCY = 0x0012,
STATE_NV_TIMER = 0x0013,
STATE_STILL_OFF = 0x0014,
STATE_STILL_EMERGENCY = 0x0015,
STATE_UNIT_START_PLAY = 0x0016,
#ifdef _DVD_NEW_NV_HANDLE
STATE_UNIT_PLAY_NSML = 0x0017,
#endif
/******************************************
* For DVD-Audio
******************************************/
/* Read State */
STATE_READ_AMGI = 0x10020,
STATE_ATT_START = 0x10021,
STATE_READ_TSI = 0x10022,
STATE_READ_ATS_PGCIT = 0x10023,
STATE_READ_ATS_PGCI = 0x10024,
/* Transitory state */
STATE_ATS_PG_START = 0x0025,
STATE_ATS_CELL_START = 0x0026,
STATE_ATS_CELL_END = 0x0027,
STATE_ATS_PG_END = 0x0028,
/* Stationary Only State */
STATE_WAIT = 0x1001,
STATE_STOP = 0x1002,
STATE_ATS_WAIT = 0x1003,
STATE_ABNORMAL = 0x1004,
STATE_PTL_NVCMD = 0x1005,
STATE_PTL_CHANGE = 0x1006,
/* Stationary & Still State */
#ifdef _DVD_NEW_VOBU_STILL
STATE_VOBU_STILL_READY = 0x1100,
#endif
STATE_VOBU_STILL = 0x1101,
STATE_CELL_STILL = 0x1102,
STATE_PGC_STILL = 0x1103
} NaviState_t;
/* Macro function to check the navigation state */
#define IS_READ_STATE(state) ((state) & STATE_READ_MASK )
#define IS_STATIONARY_STATE(state) ( (state) & STATE_STATIONARY_MASK )
#define IS_STILL_STATE(state) ( (state) & STATE_STILL_MASK )
/********************************************
*
* PGCN
*
********************************************/
#define DVD_PGCN_UNSPECIFIED 0
/********************************************
*
* DVD-Video MENU ID
*
********************************************/
typedef unsigned char DvdMenuId_t;
#define DVD_MENU_TITLE 2
#define DVD_MENU_ROOT 3
#define DVD_MENU_SUBPICTURE 4
#define DVD_MENU_AUDIO 5
#define DVD_MENU_ANGLE 6
#define DVD_MENU_PTT 7
/********************************************
*
* DVD-Audio MENU ID
*
********************************************/
#define DVD_MENU_VISUAL DVD_MENU_TITLE /* AMGM Menu */
/****************************************************
*
* Player Configuration for Video
* (DVD-Video)
*
* These types and macros are used in SPRM[14]
* and Used in UOP param of UOP_DVDV_DISPLAY_CHANGE.
*
****************************************************/
/* Display Aspect Ratio */
typedef unsigned char DvdvAspect_t;
#define DVD_ASPECT_4_3 0
#define DVD_ASPECT_UNSPECIFIED 1
#define DVD_ASPECT_RESERVED 2
#define DVD_ASPECT_16_9 3
/* Display Mode */
typedef unsigned char DvdvDisplayMode_t;
#define DVD_DISPLAY_NORMAL 0 /* 4:3 or 16:9 */
#define DVD_DISPLAY_PANSCAN 1
#define DVD_DISPLAY_LETTERBOX 2
#define DVD_DISPLAY_RESERVED 3
/****************************************************
*
* Parental Level
*
****************************************************/
#define UNDEFINED_PTL_LVL 0x0f /* undefined parental level */
#define UNDEFINED_PTL_ID 0xFFFF
#define UNDEFINED_CTY_CD 0x5A5A /* undefined country code 'ZZ'*/
/****************************************************
*
* Navigation Pack
*
****************************************************/
/* Starting position of the PCI in the pointer
which is passed with NV_PACK notification */
#define NV_NOTI_OFFSET_PCI 0
/* Starting position of the DSI in the pointer
which is passed with NV_PACK notification */
#define NV_NOTI_OFFSET_DSI (4*(1024))//980//1024
#define NVPACK_OFFSET_PCI 45 /* from the first byte of NV pack */
#define NVPACK_OFFSET_DSI 1031 /* from the first byte of NV pack */
/* Starting position of HLI from the first byte
of PCI */
#define OFFSET_HLI_FROM_PCI 96
/* invalid LBA */
#define DVD_INVALID_LBA 0xffffffff
/* When need to find ILVU_EA in resuming */
#define DVD_FIND_ILVU_EA 0xffffffff
/****************************************************
*
* Language Code
*
****************************************************/
#define LANG_CD_NONE (0xffff)
#define LANG_CD_ENGLISH (('e'<<8) | 'n')
#define LANG_CD_KOREAN (('k'<<8) | 'r')
#define LANG_CD_JAPAN (('j'<<8) | 'a')
/****************************************************
*
* Country Code
*
****************************************************/
#define CTY_CD_USA (('U' << 8) | 'S')
/****************************************************
*
* Audio Stream
*
****************************************************/
#define AST_LCEXT_NONE 0
/* No AST or ASTN is not selected */
#define AST_NONE 0x0f
/****************************************************
*
* Subpicture Stream
*
****************************************************/
#define SP_LCEXT_NONE 0
#define SP_LCEXT_FORCED_CAPTION 0x09
#define SP_STREAM_NONE 62
#define SP_STREAM_DUMMY 63
#define SP_STREAM_ID_NULL 62 /* There's no valid subpicture decoding stream_id to display */
/****************************************************
*
* ASV Display Mode - Display timing mode
*
****************************************************/
#define ASV_TIMING_SLIDESHOW 0
#define ASV_TIMING_BROWSABLE 1
/****************************************************
*
* ASV Display Mode - Display order mode
*
****************************************************/
#define ASV_ORDER_SEQUENTIAL 0
#define ASV_ORDER_RANDOM 2
#define ASV_ORDER_SHUFFLE 3
/****************************************************
*
* DVD Information level to copy
*
****************************************************/
typedef BYTE1 DvdInfoLevel_t;
#define DVD_COPY_CELL_INFO 0x01
#define DVD_COPY_PG_INFO 0x02
#define DVD_COPY_ALL_INFO (DVD_COPY_CELL_INFO | DVD_COPY_PG_INFO)
/****************************************************
*
* DLIST type
*
****************************************************/
typedef BYTE1 DvdAsvType_t;
#define DVD_ASV_EFF_FIRST 0
#define DVD_ASV_EFF_MIDDLE 1
#define DVD_ASV_EFF_LAST 2
typedef BYTE1 DlistFind_t;
#define DLIST_FIND_NONE 0
#define DLIST_FIND_CELL 1
#define DLIST_FIND_PTS 2
/****************************************************
*
* Repeat A-B minimum interval time (in sec)
*
****************************************************/
#define REPEAT_AB_MIN_INTERVAL 5
/****************************************************
*
* Threshold between PrevPG and TopPG (in sec)
*
****************************************************/
#ifdef _LG_RPT
#define TH_PREV_TOP_PG 4
#else
#define TH_PREV_TOP_PG 2
#endif
/****************************************************
*
* Threshold of the emergency case (in sec)
*
****************************************************/
#define TH_DVD_EMERG_FIRST_PLAY 6
#define TH_DVD_EMERG_SLOW_X1_2 8
#define TH_DVD_EMERG_SLOW_X1_4 16
#define TH_DVD_EMERG_SLOW_X1_8 32
#define TH_DVD_EMERG_FAST 4
/* The minimum should be 3 sec.
Because One sec timer works independently with PCI update,
2 sec results in emergency state even in normal condition (20050729, ishan) */
/* Max VOBU length is 1.2 sec.
Decrease the wait time to emergency in order to handle the emergency
routine quickly. (20050715, ishan) */
#if _API_CAP_USE_COMM_TOOL
/* Increase the emergency timer to 5 sec in order that Communcation command
works properly as reqeust of YK Han. (20060220) */
#define TH_DVD_EMERG_NORMAL 5
#else
#define TH_DVD_EMERG_NORMAL 5// 3 //5
#endif
/****************************************************
*
* Retry count of the dump data
*
****************************************************/
/* maximum accumulated read count */
/* Adjust the retry count (20050731, ishan) */
/* VMGI is very important information. Retry cound should be enough */
#define DVD_VMGI_RETRY_COUNT 6
/* Decrease the retry count for VTSI */
#define DVD_VTSI_RETRY_COUNT 2
/* maximum accumulated PGC retry count */
#define DVD_PGC_RETRY_COUNT 6
/* maximum retry count in reading the one navigation data unit */
#define DVD_RETRY_COUNT 2
/* Threshold to using IFO backup data */
#define TH_DVD_BUP_READ (DVD_RETRY_COUNT/2)
/* maximum retry count in dump data */
#define DVD_DUMP_RETRY_COUNT 2
/* maximum number of emergency handled */
#define DVD_MAX_EMERGENCY_TRY 10
/* maximum number of abnormal state count */
#define DVD_MAX_ABNORMAL_COUNT 1 //3//3
/* Time to jump using "Time Search" when emergency state happens (in sec) */
#define DVD_EMERG_STEP 2
/* Time to jump according to the EDC NG Counter (2 * this_value sec) */
#define DVD_EDC_NG_JUMP_STEP 1
/* The maximum number of Update Cell info to be queued */
#define NUM_UPDATE_CELL_ARRAY 20
#ifdef _DVD_PROGRAM
#define NUM_HISTORY_ARRAY 125 /* Max 999 PTTN for random playmode
Max 99 programs for random/shuffle PGC */
#else
#define NUM_HISTORY_ARRAY 13 /* Max 99 programs, each bit represets each program */
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -