📄 dvd_vtsi.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_vtsi.h
*
* Structure definitions to parse the VTSI DVD data. All structures and
* algorithms based on the DVD Part 3 Video Specification Version 1. VTS
* information is in Section 4.2.
*
* $Id: dvd_vtsi.h,v 1.6 2006/10/04 21:30:24 rbehe Exp $
*/
#ifndef _DVD_VTSI_H
#define _DVD_VTSI_H
#ifdef __cplusplus
extern "C" {
#endif
#include "dvd_vmgi.h"
#define VTS_VOBU_SIZE 30000
#define MAX_NUM_TMAP 1000 /* Max number of Program Chains per title */
#define MAX_ENT_SIZE 32768
#ifdef UNUSED
#define MAX_VTSM_CPI 50
#define MAX_VTSM_VOBU_SA 100
#endif
#define MAX_VTSM_PGCI_SRP_i 100
#define MAX_VTSM_PGCI_SRP_j 100
#define MAX_VTS_CPI 6000
#define MAX_PTT_SRP 150
#define MAX_PTT_BUF 3000
#define MAX_VTSM_PGCI_BUF 1000
/* Audio Attributes */
typedef struct _ast_atr
{
UBYTE flags[2]; /* Flags Describing Audio Attributes */
USHORT specific_code; /* Specific Code */
UBYTE specific_code_ext; /* Specific Code Extension */
UBYTE app_info; /* Application Information */
} ast_atr_struct;
/* Sub Picture Attributes */
typedef struct _spst_atr
{
UBYTE flags; /* Flags Describing Sub picture Attributes */
USHORT specific_code; /* Specific Code */
UBYTE specific_code_ext; /* Specific Code Extension */
} spst_atr_struct;
/* Video Title Set Information Management Table (VTSI_MAT) Structure */
typedef struct _vtsi_mat
{
CHAR vts_id[12]; /* VTS Identifier */
ULONG vts_ea; /* End address of the VTS */
ULONG vtsi_ea; /* End address of the VTSI */
USHORT vern; /* Version number of the DVD Video Spec */
ULONG vts_cat[4]; /* Video Manager Category */
ULONG vtsi_mat_ea; /* End address of VTSI_MAT */
ULONG vtsm_vobs_sa; /* Start address of VTSM_VOBS */
ULONG vtstt_vobs_sa; /* Start address of VTSTT_VOBS */
ULONG vts_ptt_srpt_sa; /* Start address of VTS_PTT_SRPT */
ULONG vts_pgcit_sa; /* Start address of VTS_PGCIT */
ULONG vtsm_pgci_ut_sa; /* Start Address of VTSM_PGCI_UT */
ULONG vts_tmapt_sa; /* Start Address of VTS_TMAPT */
ULONG vtsm_c_adt_sa; /* Start Address of VTSM_C_ADT */
ULONG vtsm_vobu_admap_sa; /* Start Address of VTSM_VOBU_ADMAP */
ULONG vts_c_adt_sa; /* Start Address of VTS_C_ADT */
ULONG vts_vobu_admap_sa; /* Start Address VTS_VOBU_ADMAP */
UBYTE vtsm_v_atr[2]; /* Video Attribute of VTSM */
UBYTE vtsm_ast_n[2]; /* Number of Audio Streams of VTSM */
ast_atr_struct vtsm_ast_atr; /* Audio stream attribute of VTSM */
UBYTE vtsm_spst_n[2]; /* Number of Sub-picture streams of VTSM */
spst_atr_struct vtsm_spst_atr; /* Sub-picture attributes of VTSM */
UBYTE vts_v_atr[2]; /* Video attribute of VTS */
UBYTE vts_ast_n[2]; /* Number of Audio streams of VTS */
ast_atr_struct vts_ast_atrt[MAX_AUDIO_CH]; /* Audio stream attribute */
/* table of VTS */
UBYTE vts_spst_n[2]; /* Number of Sub-picture streams of VTS */
spst_atr_struct vts_spst_atrt[MAX_SP_CH]; /* Sub-picture stream */
/* attribute table of VTS */
UBYTE vts_mu_ast_atrt[8][24]; /* Multichannel Audio stream
* attribute */
/* table VTS */
} vtsi_mat_struct;
/* PTT_SRPTI Part of Title Search Pointer Table Information */
typedef struct _ptt_srpti
{
USHORT vts_ttu_n; /* Number of TTU in the VTS */
ULONG vts_ptt_srpt_ea; /* End address of VTS_PTT_SRPT */
} ptt_srpti_struct;
/* PTT_SRP Part of Title Search Pointer */
typedef struct _ptt_srp
{
USHORT pgcn; /* Program Chain Number */
UBYTE pgn; /* Program Number */
} ptt_srp_struct;
/* VTS_PGCITI Video Title Set PGC Information Table Information */
typedef struct _vts_pgciti
{
USHORT vts_pgci_srp_n; /* Number of PGCI in the VTS */
ULONG vts_pgcit_ea; /* End address of VTS_PGCIT */
} vts_pgciti_struct;
/* VTS_PGCI_SRP Video Title Set PGCI Search Pointer */
typedef struct _vts_pgci_srp
{
UBYTE vts_pgc_cat[4]; /* VTS_PGC Category */
ULONG vts_pgci_sa; /* Start address of VTS_PGCI in byte offset */
} vts_pgci_srp_struct;
/* VTSM_PGCI_UTI Video Title Set Menu PGCI Unit Table Information */
typedef struct _vtsm_pgci_uti
{
USHORT vtsm_lu_n; /* Number of Video Title Set Menu Language */
/* Units VTSM_LU_N */
ULONG vtsm_pgci_ut_ea; /* End address of VTSM_PGCI_UT */
} vtsm_pgci_uti_struct;
/* VTSM_LU_SRP Video Title Set Menu Language Unit Search Pointer */
typedef struct _vtsm_lu_srp
{
UCHAR vtsm_lcd[2]; /* Video Title Set Menu Language Code */
UBYTE vtsm_exst; /* Video Title Set Menu existence */
ULONG vtsm_lu_sa; /* Start Address of VTSM_LU */
} vtsm_lu_srp_struct;
/* VTSM_LUI Video Title Set Menu Language Unit Information */
typedef struct _vtsm_lui
{
USHORT vtsm_pgci_srp_n; /* Number of VTSM PGCI Search Pointers */
ULONG vtsm_lu_ea; /* End Address of the VTSM Language Unit */
} vtsm_lui_struct;
/* VTS_TMAPTI Video Title Set Time Map Table Information */
typedef struct _vts_tmapti
{
USHORT vts_tmap_n; /* Number of VTS_TMAPs */
ULONG vts_tmapt_ea; /* End address of VTS_TMAPT */
} vts_tmapti_struct;
/* VTS_TMAP Video Title Set Time Map */
typedef struct _vts_tmap
{
UBYTE tmu; /* Time Unit (seconds) */
USHORT map_en_n; /* Number of Map Entries */
/* ULONG *map_ent; */ /* Pointer to Table of Map Entries */
} vts_tmap_struct;
/* VTSM_C_ADTI Video Title Set Menu Cell Address Table Information */
typedef struct _vtsm_c_adti
{
USHORT vtsm_vob_n; /* Number of VOBs in the VTSM_VOBS */
ULONG vtsm_c_adt_ea; /* End address of VTSM_C_ADT_EA */
} vtsm_c_adti_struct;
/* VTSM_CPI Video Title Set Menu Cell Piece Information */
typedef struct _vtsm_cpi
{
USHORT vtsm_vob_idn; /* VOB ID number for the VTSM_CP */
UBYTE vtsm_c_idn; /* Cell ID number for the VTSM_CP */
ULONG vtsm_cp_sa; /* Start address of VTSM_CP */
ULONG vtsm_cp_ea; /* End address of VTSM_CP */
} vtsm_cpi_struct;
/* VTS_C_ADTI Video Title Cet Cell Address Table Information */
typedef struct _vts_c_adti
{
USHORT vts_vob_n; /* Number of VOBs in the BTSTT_VOBS */
ULONG vts_c_adt_ea; /* End address of VTS_C_ADT */
} vts_c_adti_struct;
/* VTS_CPI Video Title Set Cell Piece Information */
typedef struct _vts_cpi
{
USHORT vts_vob_idn; /* VOB ID number for the VTS_CP */
UBYTE vts_c_idn; /* Cell ID number for the VTS_CP */
ULONG vts_cp_sa; /* Start address of VTS_CP */
ULONG vts_cp_ea; /* End address of VTS_CP */
} vts_cpi_struct;
/* Variable Declarations */
extern vtsi_mat_struct vtsi_mat;
extern ptt_srpti_struct ptt_srpti;
extern ULONG ttu_srp[MAX_NUM_TT];
extern USHORT ttu_srp_num[MAX_NUM_TT];
#ifdef FIXED_PTT
extern ptt_srp_struct ptt_srp[MAX_NUM_TT][MAX_PTT_SRP];
/* first array is TTU second is PTT_SRP */
#else
extern ptt_srp_struct *ptt_srp[MAX_NUM_TT];
#endif
extern vts_pgciti_struct vts_pgciti;
extern vts_pgci_srp_struct vts_pgci_srp[MAX_NUM_TMAP];
extern vtsm_pgci_uti_struct vtsm_pgci_uti;
extern vtsm_lu_srp_struct vtsm_lu_srp[MAX_NUM_LANG];
extern vtsm_lui_struct vtsm_lui[MAX_NUM_LANG];
#ifdef FIXED_PGC
extern vts_pgci_srp_struct vtsm_pgci_srp[MAX_VTSM_PGCI_SRP_i][MAX_VTSM_PGCI_SRP_j];
#else
extern vts_pgci_srp_struct *vtsm_pgci_srp[MAX_VTSM_PGCI_SRP_i];
#endif
extern vts_tmapti_struct vts_tmapti;
extern ULONG vts_tmap_srp[MAX_NUM_TMAP];
extern vts_tmap_struct vts_tmap[MAX_NUM_TMAP];
#ifdef UNUSED
extern vtsm_c_adti_struct vtsm_c_adti;
extern vtsm_cpi_struct vtsm_cpi[MAX_VTSM_CPI];
extern ULONG vtsm_vobu_admap_ea;
extern ULONG vtsm_vobu_sa[MAX_VTSM_VOBU_SA];
#endif
extern vts_c_adti_struct vts_c_adti;
extern vts_cpi_struct vts_cpi[MAX_VTS_CPI];
extern ULONG vts_vobu_admap_ea;
extern ULONG vts_vobu_sa[VTS_VOBU_SIZE];
/* function prototypes */
void Parse_VTSI_MAT(void);
void Parse_VTS_PTT_SRPT(ULONG vts_ptt_srpt_sa);
void Parse_VTS_PGCIT(ULONG vts_ptt_srpt_sa);
void Parse_VTSM_PGCI_UT(ULONG vtsm_pgci_ut);
void Parse_VTS_TMAPT(ULONG vts_tmapt_sa);
#ifdef UNUSED
void Parse_VTSM_C_ADT(ULONG vtsm_c_adt_sa);
void Parse_VTSM_VOBU_ADMAP(ULONG vtsm_vobu_admap_sa);
#endif
void Parse_VTS_C_ADT(ULONG vts_c_adt_sa);
void Parse_VTS_VOBU_ADMAP(ULONG vts_vobu_admap_sa);
/* Parse the VTSI_MAT and video title set information */
extern UBYTE get_vtsi_ifo(ULONG file_handle);
/* Macros */
#define ROOTM_EXST 0x80 /* Root Menu entry PGC exits in this LU */
#define SPM_EXST 0x40 /* Sub Picture menu entry PGC exists */
#define AM_EXST 0x20 /* Audio menu entry PGC exists */
#define AGLM_EXST 0x10 /* Angle menu entry PGC exists */
#define PTTM_EXST 0x08 /* Part of Title menu entry PGC exists */
extern BOOLEAN get_tmap_entry(ULONG *, ULONG *, USHORT, ULONG, ULONG);
#ifdef __cplusplus
}
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -