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

📄 cdinfo.h

📁 车载电子影音系统dvd播放系统原程序代码
💻 H
📖 第 1 页 / 共 2 页
字号:
/**************************************************************************

        (C)Copyright Cheertek Inc. 2002-2003,
           D300, all right reserved.

        Product : WinAV Firmware

        Date    : 1998.10.10.
        Author  : Cheertek (D300 TCH)
        Purpose : CD information module
                  The moudle will support the information of any CD Disc
        Sources : cdinfo.h/ cdinfo.c/ cdinfo2.c

------------------------------------------------------------
        Update

        Date    : 1999.8.18.
        Name    : Cheertek (D300 TCH)
        Description     : ???

                        Item                                    Source
        ----------------------------------------        -------------------
        . Support to check CVD Encryption
        . Redefine ALL DiscType
        . Check DVD title.
****************************************************************************/

#ifndef __CDINFO_H__
#define __CDINFO_H__

// wyc1.25
#include    "fmanager.h"

#define     MAX_TRACKNO                 (99+ 1)

#define     OFFSET_ENTRIES_VCD          12
#define     OFFSET_INFO_VCD             56

// ** TCH0.31; begin...
// Move from "utl.h", and it's a length of "_cS"
///#define     LEN_TEMPBUFFER              200

// Define it for the max. length of GetEntryData ()
#define     ENTRY_MAX_LEN               32

///extern  WORD            GAP_INFOVCD, GAP_ENTRIES;
// wyc.274p-PicCD, the max support extension name number
// wyc1.10, increase the max. extension number to 5, MP3 / JPG / AC3 / DAT / VOB files in CDROM title.
#define         MAX_EXTENSION_NO                8
// wyc.274j-2-Test
// #define DEBUG_FUNCTION

#define     GAP_INFOVCD                 668
#define     GAP_ENTRIES                 40
// ** TCH0.31; end...

extern  char            * __cSector1, * __cSector2, * __cSector3, * __cSector4;       // ** TCH0.50;

extern  DWORD               __dwSectorCDROMBegin;
extern  DWORD               __dwSectorCDROMEnd;

extern  WORD                __wCDROMReadingRange;

extern  char                _cS [];     // ** TCH0.31;

// wyc.274p-PicCD, extern the EXT type for other module to use it.
extern  BYTE    __bExtType[MAX_EXTENSION_NO+1];
// wyc.276_4-EXT, extern this variable and rename it to __bEXTAttr
extern  BYTE            __bEXTAttr;
// wyc1.00, extern this variable to FM and rename to __dwSectorDir
extern  DWORD   __dwSectorDir;
// wyc1.10-DVDR, extern this variable.
extern  BYTE    __bDVDROM;

// Added by Chern Chyh-Chain, 08-30-2001, BEGIN

// Fix problem: Some special DVD titles have a title set encrypted with not only one title key.
// Current what we found is one title set encrypted with two title keys and three titles have this phenomenon.
#define     MAX_TITLE_KEY_NUM       2       // How many title keys per title set
// LLY.171, fix css fail for "The Postman" title
// TCC2.79-2 fix dvd title "Attila".
#define     MAX_MULTI_KEYS_TITLES     5 //4  //3     // How many titles have multiple keys phenomenon we found
#define     INVALID_MULTI_KEYS_TITLE    0xFF    // When __bMultiKeysTitle equals to this value, it means no multiple keys title inserted.

// Define the structure to keep the title's information for comparing and reading correct title key.
typedef struct  tagMULTI_KEYS_TITLE_LOG
{
    char     cTitleName [15];     // Point to a title name string
    BYTE    bRegionInfo;        // Title's region number
    BYTE    bTitleSetNo;    // Title set number which has this abnormal phenomenon
    DWORD   dwTitleKeyAddress[MAX_TITLE_KEY_NUM];   // Keep first cell start address of each title key
} MULTI_KEYS_TITLE_LOG, *PMULTI_KEYS_TITLE_LOG;

// ** TCH1.60a-1; begin... 
extern  BYTE    __bVTSN_MultiKeys;
extern  DWORD   __dwSector_MultiKeys [];
// ** TCH1.60a-1; end... 

// Added by Chern Chyh-Chain, 08-30-2001, END

//////////////////////////////////////
// Disc Type
// LOBYTE will represent "DiscType".
// HIGHEST NIBBLE will represent "Attribute of DiscType".
#define     BOOK_UNKNOW                 0x0000

#define     BOOK_CDDA                   0x0001
#define     BOOK_CDROM                  0x0002          // Mode1 only
#define     BOOK_CDI                    0x0004
#define     BOOK_VCD                    0x0008
//#define     BOOK_PHOTOCD                0x0010        // ** DVD0.16; remove it
#define     BOOK_DVD                    0x0010
#define     BOOK_CVD                    0x0020
#define     BOOK_SVCD                   0x0040
#define     BOOK_2X                     0x0060  // BOOK_CVD | BOOK_SVCD

// attribute of DiscType
#define     VCD_1_0                     BOOK_VCD
#define     VCD_1_1                     0x1000
#define     VCD_2_0                     0x2000
#define     VCD_KARAOKE                 0x4000
#define     BOOK_ENCRYPT                0x8000  // CVD-Encryption

// ** DVD0.16;
// wyc.274p-PicCD, remove these define and replace by new definw in follows.
/*#define     CDROM_MP3                   0x0100  // ** DVD0.16; Should be [AND] BOOK_CDROM
#define     CDROM_XA                    0x0200  // ** DVD0.16; Should be [AND] BOOK_CDROM
                                                // It will be Mode2-Form1

#define     BOOK_MP3                    0x0102  // BOOK_CDROM | CDROM_MP3
#define     BOOK_CDROMXA                0x0202  // BOOK_CDROM | CDROM_XA
#define     BOOK_MP3XA                  0x0302  // BOOK_CDROM | CDROM_MP3 | CDROM_XA
*/
// wyc.274p-PicCD, add some define for new attribute and disc type.
#define     CDROM_M1                   0x0100
#define     CDROM_XA                    0x0200
#define     CDROM_PICTURECD             0x0400  

#define     BOOK_M1                      0x0102  // BOOK_CDROM | CDROM_M1
#define     BOOK_XA                      0x0302  // BOOK_CDROM | CDROM_M1 | CDROM_XA
#define     BOOK_PICTURECD              0x0702  // BOOK_CDROM | CDROM_M1 | CDROM_XA | CDROM_PICTURECD. 
// ** DVD0.16;

// ** S-TCH; Free the number[0x0800] for  NO_DISC_IN_DRIVE
// Disc Status
#define     DOOR_OPEN                   0x0001
#define     NO_DISC_IN_DRIVE            0x0800
/////////////////////////////////////////////////////
//////////////////////////////////////
// Disc Infor   // ** TCH1.70; 
// LOBYTE will represent the kind of "Unplayable" Disc.

#define     DISCINFO_NONE                           0x00
#define     DISCINFO_ENCRYPT                    0x01
#define     DISCINFO_REGION_ERROR               0x02   
#define     DISCINFO_DAMAGED                0x04  
#define     DISCINFO_UNRECOGNIZE                    0x08   

#define     DISCINFO_UNPLAYABLE             0x0F   
/////////////////////////////////////////////////////

// Track Info Byte
#define     PREEMPHASIS_2_CHANNELS          0x00010000
#define     PREEMPHASIS_4_CHANNELS          0x10010000

// CDINFO_ParseInfo definition
#define     DISC_VOL_SPACESIZE                  1
#define     DISC_LOC_MPATHTABLE                 2

// VCD definition
#define     VCD_BASIC                           5       // max larger than DISC_XXX
#define     VCD_ENTRIES_ADDRESS                 VCD_BASIC+ 1    //
#define     VCD_ENTRIES                         VCD_BASIC+ 2    // total entries
#define     VCD_ENTRIES_LOCATE                  VCD_BASIC+ 3

#define     VCD_SEQUENCES                       VCD_BASIC+ 4
#define     VCD_SEQUENCE_ADDRESS                VCD_BASIC+ 5
#define     VCD_SEQUENCE_LOCATE                 VCD_BASIC+ 6

#define     VCD_ENTRIES_TRACK                   VCD_BASIC+ 7

// InfoVCD definition
#define     INFOVCD_PSDSIZE                     VCD_BASIC+ 20
#define     INFOVCD_FIRSTSEG_ADDRESS            VCD_BASIC+ 21
#define     INFOVCD_OFFSET_MUL                  VCD_BASIC+ 22
#define     INFOVCD_MAXLIST_ID                  VCD_BASIC+ 23
#define     INFOVCD_MAXSEG_NO                   VCD_BASIC+ 24
#define     INFOVCD_SEGPLAY_ITEM                VCD_BASIC+ 25

// CD Information String
#define     VCD_CDTITLE                         10
#define     VCD_CDID                            11
#define     VCD_CDVER                           12

#define     KARAOKE_SEQUENCE_TITLE              20
#define     KARAOKE_SONG_WRITER                 KARAOKE_SEQUENCE_TITLE+ 1
#define     KARAOKE_COMPOSER                    KARAOKE_SEQUENCE_TITLE+ 2

// Play Segment Item
#define     SEGPLAY_ITEM_BASE                   1
#define     SEGPLAY_ITEM_FIRST                  SEGPLAY_ITEM_BASE+ 1
#define     SEGPLAY_ITEM_HASAUDIO               SEGPLAY_ITEM_BASE+ 2
#define     SEGPLAY_ITEM_HASVIDEO               SEGPLAY_ITEM_BASE+ 3
#define     SEGPLAY_ITEM_AUD_SINGLE             SEGPLAY_ITEM_BASE+ 4
#define     SEGPLAY_ITEM_AUD_STEREO             SEGPLAY_ITEM_BASE+ 5
#define     SEGPLAY_ITEM_AUD_DUAL               SEGPLAY_ITEM_BASE+ 6
#define     SEGPLAY_ITEM_VID_NTSC_STILL         SEGPLAY_ITEM_BASE+ 7
#define     SEGPLAY_ITEM_VID_NTSC_STILLH        SEGPLAY_ITEM_BASE+ 8
#define     SEGPLAY_ITEM_VID_NTSC_MOTION        SEGPLAY_ITEM_BASE+ 9
#define     SEGPLAY_ITEM_VID_PAL_STILL          SEGPLAY_ITEM_BASE+ 10
#define     SEGPLAY_ITEM_VID_PAL_STILLH         SEGPLAY_ITEM_BASE+ 11
#define     SEGPLAY_ITEM_VID_PAL_MOTION         SEGPLAY_ITEM_BASE+ 12

#define     SEGPLAY_ITEM_HIGH                   SEGPLAY_ITEM_BASE+ 20
#define     SEGPLAY_ITEM_NORMAL                 SEGPLAY_ITEM_BASE+ 21
#define     SEGPLAY_ITEM_MOTION                 SEGPLAY_ITEM_BASE+ 22
#define     SEGPLAY_ITEM_VALUE                  SEGPLAY_ITEM_BASE+ 23

// Selection/ Play list
#define     ID_PLAYLIST                         0x01
#define     ID_SELECTIONLIST                    0x02
#define     ID_ENDLIST                          0x04

#define     LIST_FIRST                          300
#define     LIST_CHOOSE                         LIST_FIRST+ 1
#define     LIST_NEXT                           LIST_FIRST+ 2
#define     LIST_PREVIOUS                       LIST_FIRST+ 3
#define     LIST_RETURN                         LIST_FIRST+ 4
#define     LIST_DEFAULT                        LIST_FIRST+ 5
#define     LIST_TIMEOUT                        LIST_FIRST+ 6
#define     LIST_MENUSELECT                     LIST_FIRST+ 7
#define     LIST_PLAY                           LIST_FIRST+ 8
#define     LIST_WORK                           LIST_FIRST+ 9

#define     LIST_SEL_START                      1
#define     LIST_SEL_NOS                        LIST_SEL_START+ 2
#define     LIST_SEL_BSN                        LIST_SEL_START+ 3
#define     LIST_SEL_LISTID                     LIST_SEL_START+ 4
#define     LIST_SEL_WAITTIME                   LIST_SEL_START+ 5
#define     LIST_SEL_LOOPCOUNT                  LIST_SEL_START+ 6
#define     LIST_SEL_JUMPTIME                   LIST_SEL_START+ 7
#define     LIST_SEL_PLAYITEMNO                 LIST_SEL_START+ 8
#define     LIST_SEL_SELECTION                  LIST_SEL_START+ 9
#define     LIST_SEL_DEFAULT                    LIST_SEL_START+10
#define     LIST_SEL_NEXT                       LIST_SEL_START+11

#define     LIST_PLAY_START                     100
#define     LIST_PLAY_NOI                       LIST_PLAY_START+ 1
#define     LIST_PLAY_LISTID                    LIST_PLAY_START+ 2
#define     LIST_PLAY_PLAYTIME                  LIST_PLAY_START+ 3
#define     LIST_PLAY_PLAYITEM_WAITTIME         LIST_PLAY_START+ 4
#define     LIST_PLAY_AUTOPAUSE_WAITTIME        LIST_PLAY_START+ 5
#define     LIST_PLAY_PLAYITEMNO                LIST_PLAY_START+ 6

// The usage of Directory Record
#define         FILE_FLAG_NONE                           0
#define         FILE_FLAG_FILE                           0x0001
#define         FILE_FLAG_DIR                            0x0002
#define         FILE_FLAG_ERROR_SERVO                    0x0000 // ** TCH0.32;
#define         FILE_FLAG_PARENT                         0x0010
#define         FILE_FLAG_CURRENT                        0x0020
#define         FILE_FLAG_ROOT                           0x0040

// GetEntryInfo Usage [ISO9660]
#define         ENTRY_INFO_LOCATION                 1
#define         ENTRY_INFO_DATALENGTH               2
#define         ENTRY_INFO_NAME                     3
#define         ENTRY_INFO_ATTRIBUTE                4
#define         ENTRY_INFO_PARENT_ID                5

// wyc2.31, add type to represent audio type extension group
// NOTICE!! When adding extension type, need to notice to put audio group nearby to avoid occurring error.
#define         EXTNAME_AUIDO_GROUP         0x0F

#define         EXTNAME_NONE                0
#define         EXTNAME_MP3                     0x1
#define         EXTNAME_MP2                    0x2
#define         EXTNAME_WMA                    0x4
#define         EXTNAME_AC3                     0x8
#define         EXTNAME_JPG                     0x10
#define         EXTNAME_DAT                    0x20
#define         EXTNAME_MPG                    0x40
#define         EXTNAME_VOB                    0x80


// wyc.278. set the reading range of Fmanager function.
#define         SECTOR_FM_READ_RANGE          15

#define         FIRST_SESSION                   1
#define         LAST_SESSION                   0

// ** TCH0.38; begin...
typedef struct  tagENTRY_RANGE
{
    BYTE cS[3];
    // wyc1.10, need to use DWORD because of VOB files will across WORD (0xFFFF) file size.
    DWORD    dwLen;       // ** TCH0.50;

⌨️ 快捷键说明

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