MAPPING.H
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:9k
- /****************************************************************************************
- * Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: MAPPING.H $
- *
- * Description:
- * ============
- *
- *
- * Log:
- * ====
- * $Revision: 4 $
- * Last Modified by $Author: Angieh $ at $Modtime: 04-03-08 11:40 $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /I76/I76_Common/I76_Reference/Playcore/Nav_DVD/Header/MAPPING.H $
- *
- * 4 04-03-08 11:41 Angieh
- * Check with the AMGM has no audio problem.
- *
- * 3 12/30/03 11:28a Leonh
- * Angieh:Change for DVD AUDIO navigator header.
- *
- * 3 10/20/03 11:46a Leslie
- * check the variable type and change the dvda rtpb schedule way as the
- * same with DVD Video
- *
- * 2 03-05-14 18:02 Leonh
- *
- * 1 03-04-28 11:15 Fwang
- * Initial for DVDA
- *
- * 2 23/04/02 9:34 Nirm
- * - Added dependency in "Config.h".
- *
- * 1 2/17/02 12:12 Rinata
- *
- * 1 2/17/02 11:38 Rinata
- *
- * 3 4/02/02 10:39 Nirm
- * Removal of compilation-warnings.
- *
- * 2 9/01/02 16:40 Nirm
- * Corrected Include-Paths.
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifndef __MAPPING_H
- #define __MAPPING_H
- #include "PlaycoreNav_DVDHeaderstream.h"
- #include "PlaycoreNav_DVDHeaderdvddef.h"
- #ifdef NO_SCPAD
- BOOL pgc_cmdt_Get_Pre_Command ( S_STORAGE *st, BYTE *buffer, int command );
- BOOL pgc_cmdt_Get_Cell_Command( S_STORAGE *st, BYTE *buffer, int command );
- BOOL pgc_cmdt_Get_Post_Command( S_STORAGE *st, BYTE *buffer, int command );
- BOOL c_pbit_Get_Cell_PBI( S_STORAGE *st, int cell, S_C_PBI *buffer);
- BOOL pgc_pgmap_Get_Entry_Cell( S_STORAGE *st, int program, S_PG *buffer);
- BOOL pgc_pgmap_Get_PG_CNT(S_STORAGE *st, int program,DWORD *pg_cnt);
- BOOL c_posit_Get_Cell_Position(S_STORAGE *st, int cell, S_C_POSIT *buffer);
- int c_posit_Get_Last_C_IDN( S_STORAGE *st, int C_VOB_IDN );
- WORD ptl_Get_ID( S_STORAGE *st, int level, int VTSN);
- #else
- BOOL pgc_cmdt_Get_Pre_Command ( S_SC_STORAGE *st, BYTE *buffer, int command );
- BOOL pgc_cmdt_Get_Cell_Command( S_SC_STORAGE *st, BYTE *buffer, int command );
- BOOL pgc_cmdt_Get_Post_Command( S_SC_STORAGE *st, BYTE *buffer, int command );
- BOOL c_pbit_Get_Cell_PBI( S_SC_STORAGE *st, int cell, S_C_PBI *buffer);
- BOOL pgc_pgmap_Get_Entry_Cell( S_SC_STORAGE *st, int program, S_PG *buffer);
- BOOL pgc_pgmap_Get_PG_CNT(S_SC_STORAGE *st, int program,DWORD *pg_cnt);
- BOOL c_posit_Get_Cell_Position(S_SC_STORAGE *st, int cell, S_C_POSIT *buffer);
- int c_posit_Get_Last_C_IDN( S_SC_STORAGE *st, int C_VOB_IDN );
- WORD ptl_Get_ID( S_SC_STORAGE *st, int level, int VTSN);
- #endif
- #ifdef NO_SCPAD
- #define pgc_gi_Get_PlayBack_Time( st ) ((DWORD) TIME_DECOD((st)->buffer[4], (st)->buffer[5], (st)->buffer[6], (st)->buffer[7]))
- #define pgc_gi_Get_UOP_CTL( st ) ((DWORD) buff2dword((st)->buffer,8) & 0x01FFFFEFL)
- BOOL pgc_gi_Get_Audio_Control_Info( S_STORAGE *st, int stream, S_PGC_AST_CTL *buffer);
- BOOL pgc_gi_Get_SP_Control_Info ( S_STORAGE *st, int stream, S_PGC_SPST_CTL *buffer);
- void pgc_gi_Get_Navigation_Info( S_STORAGE *st, S_PGC_NV_CTL *buffer );
- void pgc_gi_Get_SP_Palette ( S_STORAGE *st, S_PAL_ENTRY *buffer );
- void pgc_gi_Get_Program_Content( S_STORAGE *st, S_PGC_CNT *buffer );
- #else
- #define pgc_gi_Get_PlayBack_Time() ((DWORD) TIME_DECOD(fs_scGetByte(gns.dvd.pgc.info_sc_st.sc_handle,4), fs_scGetByte(gns.dvd.pgc.info_sc_st.sc_handle,5), fs_scGetByte(gns.dvd.pgc.info_sc_st.sc_handle,6), fs_scGetByte(gns.dvd.pgc.info_sc_st.sc_handle,7)))
- #define pgc_gi_Get_UOP_CTL() ((DWORD)fs_scGetDword(gns.dvd.pgc.info_sc_st.sc_handle, 8) & 0x01FFFFEFL)
- BOOL pgc_gi_Get_Audio_Control_Info( int stream, S_PGC_AST_CTL *buffer);
- BOOL pgc_gi_Get_SP_Control_Info ( int stream, S_PGC_SPST_CTL *buffer);
- void pgc_gi_Get_Navigation_Info( S_PGC_NV_CTL *buffer );
- void pgc_gi_Get_SP_Palette ( S_PAL_ENTRY *buffer );
- void pgc_gi_Get_Program_Content( S_PGC_CNT *buffer );
- #endif
- #ifdef NO_SCPAD
- int pgc_tbl_Get_PGC ( S_STORAGE *st, WORD PTL_ID, S_PGC_SRP *buffer );
- int pgc_tbl_Get_Menu_PGC( S_STORAGE *st, WORD PTL_ID, S_PGC_SRP *buffer );
- WORD pgc_tbl_Menu_Struc (S_STORAGE *st, WORD PTL_ID );
- BOOL pgc_tbl_Fill_Struct( S_STORAGE *st, int PGCN, S_PGC_SRP *buffer );
- BOOL pgc_tbl_Fill_Status( S_STORAGE *st, int status, S_PGC_SRP *buffer );
- #else
- #if 0 /* <<< ZORAN TC0116 : Ultimate Toy Box */
- BOOL pgc_tbl_Get_PGC ( S_SC_STORAGE *st, WORD PTL_ID, S_PGC_SRP *buffer );
- BOOL pgc_tbl_Get_Menu_PGC( S_SC_STORAGE *st, WORD PTL_ID, S_PGC_SRP *buffer );
- WORD pgc_tbl_Menu_Struc (S_SC_STORAGE *st, WORD PTL_ID );
- BOOL pgc_tbl_Fill_Struct( S_SC_STORAGE *st, int PGCN, S_PGC_SRP *buffer );
- BOOL pgc_tbl_Fill_Status( S_SC_STORAGE *st, int status, S_PGC_SRP *buffer );
- #else
- BOOL pgc_tbl_Get_PGC ( S_DOM *dom, WORD PTL_ID, S_PGC_SRP *buffer );
- BOOL pgc_tbl_Get_Menu_PGC( S_DOM *dom, WORD PTL_ID, S_PGC_SRP *buffer );
- WORD pgc_tbl_Menu_Struc ( S_DOM *dom, WORD PTL_ID );
- BOOL pgc_tbl_Fill_Struct(S_DOM *dom, WORD PGCN, S_PGC_SRP *buffer );//Jeanz_0422_2005 Chang type for PGCN
- BOOL pgc_tbl_Fill_Status( int status, S_PGC_SRP *buffer );
- #endif /* ZORAN TC0116 >>> */
- #endif
- #ifdef NO_SCPAD
- #define tt_Get_Count() ( gns.dvd.vmg.title_table_st.size / 12)
- #else
- #define tt_Get_Count() ( gns.dvd.vmg.title_table_sc_st.size / 12)
- #endif
- // Retrieves the S_TT_SRP structure based on the TTN.
- BOOL tt_Get_TT_SRP( S_TT_SRP *buffer, int TTN);
- // finds TTN based on VTSN and VTS_TTN
- int tt_Get_TTN( int VTSN, int VTS_TTN );
- // returns the address for a VTSN
- DWORD tt_Get_VTS_SA( int VTSN);
- //
- // Specific sizes for C_ATRT's data
- //
- #define T_ATRT_SIZE 472
- #define M_ATRT_SIZE 92
- #ifdef NO_SCPAD
- #define atrt_Get_Video_Attr( st ) ((WORD) buff2word((st)->buffer, 0))
- #define atrt_Get_Audio_Stream_Count( st ) ((int) buff2word((st)->buffer,2) & 0x0F)
- #define atrt_Get_SP_Stream_Count( st ) ((int) buff2word((st)->buffer,84) & 0x3F)
- BOOL atrt_Get_Audio_Attr ( S_STORAGE *st, AUDIO_ATTRIBUTES *buffer, int stream );
- BOOL atrt_Get_Audio_MultiChanel_Attr( S_STORAGE *st, S_MU_A_ATR *buffer, int stream );
- BOOL atrt_Get_SP_Attr ( S_STORAGE *st, S_SP_ATR *buffer, int stream );
- #else /* NO_SCPAD */
- #define atrt_Get_Video_Attr( st ) (fs_scGetWord((st)->sc_handle, 0))
- #define atrt_Get_Audio_Stream_Count( st ) ((int) fs_scGetWord((st)->sc_handle,2) & 0x0F)
- #define atrt_Get_DA_Audio_Stream_Count( st ) ((int) fs_scGetWord((st)->sc_handle + 1,0) & 0x0F)
- #define atrt_Get_SP_Stream_Count( st ) ((int) fs_scGetWord((st)->sc_handle,84) & 0x3F)
- BOOL atrt_Get_Audio_Attr ( S_SC_STORAGE *st, AUDIO_ATTRIBUTES *buffer, int stream );
- BOOL atrt_Get_Audio_MultiChanel_Attr( S_SC_STORAGE *st, S_MU_A_ATR *buffer, int stream );
- BOOL atrt_Get_SP_Attr ( S_SC_STORAGE *st, S_SP_ATR *buffer, int stream );
- #endif /* NO_SCPAD */
- //
- // Specific sizes for VMGI / VTSI data
- //
- #define VMGI_MAT_SIZE 348
- #define VTSI_MAT_SIZE 984
- /* C_VMG class translation */
- void vmg_construct(S_FPOS *address, WORD country, WORD language);
- void vmg_delete( void );
- void vmg_GetVTS( S_FPOS *fposp, int VTSN );
- WORD vmg_Get_PTL_ID( WORD level, int VTSN);
- WORD vmg_Get_Menu_Structure( WORD VMG_Parental_ID );
- #define vmg_GetTT( buffer, TTN ) tt_Get_TT_SRP( buffer, TTN)
- #ifdef NO_VMGI_DATA_REDUCTION
- void vmg_GetVolumeID( VOLUME_ID *buffer );
- #define vmg_Get_VTS_Count() ((int) buff2word(gns.dvd.vmg.st.buffer,62) & 0x7F)
- #define vmg_Get_CAT() ((BYTE) gns.dvd.vmg.st.buffer[35])
- #else
- #define vmg_Get_VTS_Count() ((int) gns.dvd.vmg.vts_count&0x7F)
- #define vmg_Get_CAT() ( gns.dvd.vmg.vol_cat)
- #define vmg_GetVolumeID( p_vol_id ) *(VOLUME_ID *)p_vol_id = gns.dvd.vmg.vol_id
- #endif
- /* C_VTS class translation */
- BOOL vts_construct( S_FPOS *address ,WORD language);
- void vts_delete(void );
- #define vts_Get_CAT( st ) ( (BYTE) (st)->buffer[35] )
- BOOL vts_GetPTT( S_PGC_SRP *buffer, int VTS_TTN, int PTTN);
- DWORD vts_GetTimeVOBU( int PGCN, int TIME);
- int vts_Get_PTTN( int PGCN, int PGN );
- WORD vts_Get_Menu_Structure( WORD VMG_Parental_ID );
- /* C_DOM, C_TITLE_DOM, C_MENU_DOM translation */
- #ifdef NO_SCPAD
- void dom_init( S_DOM *dom, int type, BYTE *addr );
- #else
- void dom_init( S_DOM *dom, int type, WORD sc_handle );
- #endif
- void dom_delete( S_DOM *dom );
- void dom_SetPGC_table( S_DOM *dom, S_FPOS *pgct ) ;
- void title_dom_construct( S_DOM *dom, LBN VOBSaddress, S_FPOS *attr, S_FPOS *pgct );
- void title_dom_GetPGC( S_DOM *dom, S_FPOS *fposp, S_PGC_SRP *srp, WORD ptl_lvl);
- void menu_dom_construct( S_DOM *dom, LBN VOBSaddress, S_FPOS *attr, S_FPOS *pgct, WORD language );
- void menu_dom_GetPGC( S_DOM *dom, S_FPOS *fposp, S_PGC_SRP *srp, WORD ptl_lvl, BOOL menu_id );
- #endif //__MAPPING_H