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

📄 dvd_prv_types.h

📁 SAMSUNG 5009的源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
#define GET_P_AMXMD()		(gState.registers.sprm[11])
#define SET_P_AMXMD(mode)	(gState.registers.sprm[11] = (mode))

#define GET_CTY_CD()		(gState.registers.sprm[12])
#define SET_CTY_CD(code)	(gState.registers.sprm[12] = (code))

#define GET_PTL_LVL()		(gState.registers.sprm[13] & 0x0f)
#define SET_PTL_LVL(level)	(gState.registers.sprm[13] = ((((level) & 0x0f) >0 && ((level) & 0x0f)<=9) || ((level) & 0x0f)==0x0f)? ((level) & 0x0f) : gState.registers.sprm[13] )

#define GET_VIDEO_CFG()		(gState.registers.sprm[14])
#define SET_VIDEO_CFG(cfg)	(gState.registers.sprm[14] = (cfg))
#define GET_DISP_ASPECT()	((gState.registers.sprm[14]>>10) & 0x03)
#define SET_DISP_ASPECT(ratio)	(gState.registers.sprm[14] = \
									((gState.registers.sprm[14]&0x0300) | (BYTE2)(((ratio)&0x03)<<10)) )
#define GET_DISP_MODE()		((gState.registers.sprm[14]>>8) & 0x03)
#define SET_DISP_MODE(mode)	(gState.registers.sprm[14] = \
								((gState.registers.sprm[14]&0x0c00) | (BYTE2)(((mode)&0x03)<<8)))

#define GET_AUDIO_CFG()		(gState.registers.sprm[15])
#define SET_AUDIO_CFG(cfg)	(gState.registers.sprm[15] = (cfg))

#define GET_AST_LCD()		(gState.registers.sprm[16])
#define SET_AST_LCD(lcd)	(gState.registers.sprm[16] = (lcd))

#define GET_AST_LCD_EXT()	(gState.registers.sprm[17])
#define SET_AST_LCD_EXT(ext)	(gState.registers.sprm[17] = (ext))

#define GET_SPST_LCD()		(gState.registers.sprm[18])
#define SET_SPST_LCD(lcd)	(gState.registers.sprm[18] = (lcd))

#define GET_SPST_LCD_EXT()	(gState.registers.sprm[19])
#define SET_SPST_LCD_EXT(ext)	(gState.registers.sprm[19] = (ext))

#define GET_P_RCD()			(gState.registers.sprm[20] & 0x00ff)
#define SET_P_RCD(rcd)		(gState.registers.sprm[20] = ((rcd)&0x00ff))

#endif

/**********************************************
 *	For DVD-Audio
 **********************************************/
#define GET_U_ASLN()			((gState.registers.sprm[1]>>8) & 0x1)
#define SET_U_ASLN(asln)		(gState.registers.sprm[1] = \
								( ((BYTE2)(asln)<<8) | (gState.registers.sprm[1] & 0xff) ))
#define GET_C_ASLN()			(gState.registers.sprm[1] & 0x1)
#define SET_C_ASLN(asln)		(gState.registers.sprm[1] = \
								( (gState.registers.sprm[1]&0xff00) | (BYTE2) (asln) ) )


#define GET_TT_GR_PGN()			(gState.registers.sprm[7])
#define SET_TT_GR_PGN(pgn)		(gState.registers.sprm[7] = (pgn))

#define GET_ATT_GRN()			(gState.registers.sprm[21] & 0x0f)
#define SET_ATT_GRN(att_grn)	(gState.registers.sprm[21] = (att_grn))

#define GET_ATTN()			(gState.registers.sprm[22] & 0x7f)
#define SET_ATTN(attn)		(gState.registers.sprm[22] = (attn))

#define GET_TKN()			(gState.registers.sprm[23] & 0x7f)
#define SET_TKN(tkn)		(gState.registers.sprm[23]= (tkn))

#define GET_DLISTN()		(Dlistn_t)((gState.registers.sprm[24]>>8)&0x7f)
#define SET_DLISTN(dlistn)	(gState.registers.sprm[24] = \
								((gState.registers.sprm[24]&0x7f) | (BYTE2)((dlistn)<<8))  )

#define GET_ASVN()			(gState.registers.sprm[24]&0x7f)
#define SET_ASVN(asvn)		(gState.registers.sprm[24] = \
								((gState.registers.sprm[24]&0x7f00) | (BYTE2)(asvn)) )

#define SET_DLISTN_ASVN(dlistn, asvn)	(gState.registers.sprm[24] = \
								( (BYTE2)((dlistn)<<8) | (BYTE2)(asvn) ) )

/**********************************************************
 * 
 *		Structure of DVD-Video Navigator 
 *		Permanet Flags which are set once and kept during the same DVD disc.
 *
 *********************************************************/
typedef struct {
 	BOOL	is_resource_created;	/* TRUE when system resources are created successfully */
	BOOL	is_loop_valid;
	BOOL	is_copy_protected_disc;	
	BOOL	is_letterbox_preferred;
	BOOL	is_mgi_loaded;	/* TRUE if VMGI or AMGI is loaded successfully */
	BYTE1	abnormal_state_count;	/* The occurrence of the Abnomal State */	
	BOOL	is_first_play;	/* TRUE if this is the first time to play dvd after loading */
	BOOL	is_abnormal_handle;	/* TRUE if the current state is abnormal state handling */
} DvdPermFlag_t;


/**********************************************************
 * 
 *		Structure of DVD-Video Navigator 
 *		Flags
 *
 *********************************************************/

typedef enum {
	
	/* There's no PTM marker set nor need to set */
	DVD_PTM_MARKER_NONE,

	/* PTM marker is necessary to set when it's time to set end PTM
		This state is for non-seamless playback end handling 
		(Non-seamless cell end, PGC end) */
	DVD_PTM_MARKER_READY_NSML,


	/* PTM marker is set and waiting for marker notification 
		for non-seamless playback end notification	
		or for PG end notification in order to handle RepeatCH or Random/Program 
		or VOBU Still */
	DVD_PTM_MARKER_SET,


	/* PTM marker is set for PG end notification and also necessary to
		set for non-seamless playback end handling */
	DVD_PTM_MARKER_SET_AND_READY_NSML

} DvdSetEndTimeMarker_t;

#if 0
/* Enum types for DVD stop state */
typedef enum {
	DVD_PLAYING = 0,	/* Set when the new PCI is updated (Playing) */
	DVD_STOPPING,		/* in the middle of processing stop */
	DVD_PRE_PLAY		/* Set when the new PCI is not updated after stop */
} DvdStopState_t;
#endif

/* Enum types for DVD play cmd state (20050819,ishan) */
/* 
	The normal sequence is 

  	DVD_STOPPING -> DVD_STOPPED -> DVD_PLAY_ISSUED 
  	-> DVD_DSI_RECEIVED -> DVD_PCI_UPDATE 

 */
typedef enum {
	DVD_STOPPED = 0,	/* stop completed after DVD_STOPPING */
	DVD_STOPPING,		/* starting stop */
	DVD_PLAY_ISSUED,	/* issued play cmd after DVD_STOPPED state */
	DVD_DSI_RECEIVED,	/* received DSI after DVD_PLAY_ISSED */
	DVD_PCI_UPDATED	/* PCI is updated after DVD_PCI_FIRST_UPDATED */
} DvdPlayCmdState_t;

typedef struct 
{
	/********************************************
	 *		Common
	 ********************************************/
	BOOL	is_valid_resume_info;	/* TRUE, if the valid resume info is saved */
#ifdef _DVD_MENU_RESUME_STOP
	/* TRUE, if the resume info for TT is valid. 
		Separate the TT resume info to keep the TT resume info after menu resume is executed. 
		(20060220,ishan) */
	/* (Fix the bug) "Species" TT play -> Root menu -> Setup open/close[Or R.Stop -> R.Play] 
				-> select "Play", then it goes to stop state because there's no resume info for TT. */
	BOOL	is_valid_resume_tt_info;		
#endif
	DvdResumeType_t		now_resuming;			/* Non-zero if now in resuming */
	BOOL	menu_lang_changed;		/* Menu language code changed */
	BOOL	ptl_changed;	/* Parental level changed */
#ifdef _DVD_RUNTIME_SETUP	
	BOOL	ast_lcd_changed;		/* Audio stream Language code changed */
	BOOL	spst_lcd_changed;			/* SP stream Language code changed */
	BOOL	aspect_changed;		/* Aspect ratio changed */
#endif
#ifdef _DVD_SP_OFF
	BOOL	sp_off_by_setup;		/* TRUE, if SP is off by setup menu */
#endif
	BOOL	update_cell_play_info;
	BOOL	update_pg_play_info;
	/* replaced by play_cmd_state (20050819,ishan) */
	//DvdStopState_t	stop_state;		/* finite stop state */

	/* current play and stop state (20050819,ishan)
		This replaces the old variables(stop_state, stop_before) */
	DvdPlayCmdState_t play_cmd_state;
	
	UCHAR	prev_menu_id;	/* previously selected menu id (initial value is NULL) */
	BOOL	need_emergency_check;	/* if execute the emergency checkup routine */
	BYTE4	emergency_timer;	/* time after the emergency check starts */
	BYTE4	emergency_handled;	/* The successive number of the handling emergency */
	BOOL	emergency_first_play;	/* TRUE if the current emergency timer is counted after PlayDvd */
	BYTE4	emergency_nv_received;	 /* The acculumated number of the received nv pack successively */
	BYTE1	emergency_phase;	/* current emergency phase which is used for jump scale */
	BOOL	is_next_restricted;	/* TRUE if the cell to play next is access-restricted */
#ifdef _DVD_PROGRAM	
	DvdPlayMode_t play_mode;	/* TRUE if the current playing mode is program */
	BOOL	is_all_played;		/* TRUE if End Ptm Notification has arrived.  */
#endif
	BOOL	no_cn_update;		/* TRUE if CN is not changed after time search in emergency routine */

	/********************************************
	 *		For Playing VOB
	 ********************************************/
	BOOL	jump_by_ttn;		/* TRUE, if TTN is given to find PGC */
	BOOL	skip_pre_cmd;		/* TURE, if skip pre cmd 
									(Used in LINK_PTTN, LINK_RSM..) */
	BOOL	find_pgc_by_ptt;	/* TRUE, if PTTN is given to find PGC
									(Used in LINK_PTTN, JUMP_VTS_PTT) */
	BOOL	is_valid_hli;	
	BOOL	is_valid_hli_present_period;
	BOOL	is_valid_btn_select_period;
	BOOL	angle_changed;		/* indicates SPRM[3](AGLN) has changed */
	BOOL	vobu_unit_play;		/* TRUE if the current play unit is maximum VOBU.
									This should be set when FF/FR 
									or Playing Cell with VOBU Still */
	BYTE4	end_ptm_lba;	/* NV_PACK LBA to set end time marker */
	DvdSetEndTimeMarker_t	set_end_time_marker;
	BOOL	is_tt_changed;	/* TRUE if TT is changed. This is used for CSS descrambling */
	BOOL	need_set_cgms;	/* TRUR if CGMS info should be updated */
	BOOL	is_first_nv_received;	/* TRUE if the first nv pack of the playing unit is received */
#ifdef _DVD_HANDLE_NAV_FAULT
	BOOL	is_nv_lba_from_tt;		/* TRUE if the nv pack LBA does not follow the DVD spec */
#endif
	BOOL	need_handle_nv_timer;	/* TRUE if the nv timer is expired and it needs to be handled */
	BOOL	no_reset_pci_q;	/* TRUE if PCI queue is not reset in StopPresentation (20050220, ishan) */
	BOOL	play_with_pause;
	/* replaced by play_cmd_state (20050819,ishan) */
	//BOOL	stop_before;	/* TRUE if stopped before play */

	BOOL	button_pressed;		/* TRUE if the button is pressed between setting end PTM 
									and end PTM expiration	(20060220,ishan) */

#ifdef _DVD_KEEP_PAUSE_AFTER_SKIP
	BOOL	display_pause_after_skip;	/* TRUE if need to display "PAUSE" after skip (20060327,ishan) */
#endif

/* <<< @: 5008CHN-xxx.Yanglu 050906: Maintain the Repeat TT CH, in quick response of NEXT/PREV key.  */	
#if 0
#ifdef _DVD_HANDLE_PREV_NEXT_AS_PTT_UNIT
	/* TRUE if LINK_PTTN command is called in Prev, Next UOP handling routine.
		In this case, Repeat TT and CH is not cleared (20050611, ishan) */
	BOOL	keep_repeat_in_link_pttn;
#endif
#else
#ifdef _DVD_HANDLE_QUICK_PREV_NEXT
	BOOL	keep_repeat_in_ptt_search;
#endif
#endif
/* <<< @: 5008CHN-xxx.Yanglu 050906: Maintain the Repeat TT CH, in quick response of NEXT/PREV key.  */	

	SetMainState_t	main_state_at_big_osd;	/* main state when opening "Setup", "Program" window (20050728,ishan)*/

#ifdef _ENABLE_DVD_AUDIO
	/********************************************
	 *		For playing AOB
	 ********************************************/
	BOOL	is_non_muted_pg_play;
	BOOL	is_link_cn;
	BOOL	is_ats_pg_continous;	/* continuous play of PG in ATS_PGC */
	DlistFind_t		dlist_find_type;
#endif

#if _APP_CAP_FUNC_SCORING
	BOOL	is_score_act;	/* (yanglu, 060630) */
#endif

} DvdFlag_t;


#ifndef _ENOUGH_DVD_BUFFER
/*******************************************************************
 * 
 *	Structure to indicate which range data elements are buffered
 *
 *	This is used for LU_SRP, PGCI_SRP, TMAP_SRP in reading navigation
 *	data.
 *******************************************************************/

typedef struct {
	BYTE2	start_index;	/* start index of the element such as PGCI_SRP, LU_SRP */
	BYTE2	end_index;		/* end index of the element */
	BYTE1 *	data_ptr;		/* BYTE-unit pointer to the start of elements 
							   such as PGCI_SRPs, LU_SRPs */
} InfoElem_t;
#endif



/*******************************************************************
 * 
 *	Structure for queuing Update Cell LBA
 *
 *******************************************************************/
 typedef struct {
 	BYTE4	front_index;
 	BYTE4	rear_index;
 	BYTE4	update_start_lba[NUM_UPDATE_CELL_ARRAY];
 	BYTE4	update_end_lba[NUM_UPDATE_CELL_ARRAY];
 	Cn_t	update_cn[NUM_UPDATE_CELL_ARRAY];
} UpdateCellInfo_t;

#define INVALID_UPDATE_Q_INDEX		0xffffffff

/*******************************************************************
 * 
 *	Structure for queuing PCI data
 *
 *******************************************************************/

typedef struct PciqElem_t	*PciqPointer_t;


/*****************************************************
 *  Using Pre-allocated array
 *****************************************************/
 #define INVALID_PCI_Q_INDEX		0xffffffff
 #define INVALID_VOBU_S_PTM			0xffffffff
 
typedef struct PciqElem_t {
	BYTE1	pci_data[SIZE_DVD_V_PCI];
	BOOL	is_pg_end;	/* TRUE if the PCI is the last one in PG */
	
#ifdef _DVD_FAST_RESUME
	DsiInPci_t	dsi;
#else
	BOOL	video_exist;
#endif
	
} PciqElem_t;

typedef struct {
	BYTE4	front_index;	/* index of array */
	BYTE4	rear_index;		/* index of array */
	BYTE4	next_vobu_s_ptm;
	BYTE4	next_vobu_e_ptm;	/* 20050220, ishan */
	BYTE2	next_vobu_vob_id;
} Pciq_t;

#endif

⌨️ 快捷键说明

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