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

📄 dr_types.h

📁 这是DVD中伺服部分的核心代码
💻 H
字号:
/*****************************************************************************
******************************************************************************
**                                                                          **
**  Copyright (c) 2005 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 dr_types.h
 *
 * Defines types and variables used within the DR
 *
 * $Id: dr_types.h,v 1.33 2007/01/11 19:48:06 jared Exp $
 */


#ifndef DR_TYPES_H
#define DR_TYPES_H

#include "msg_app.h"
#include "loader_app.h"
#include "dr_app.h"

#define HDDVD_URI_MAX_SIZE  (1025)  /* the Content Reference.  Must be less than 1024 characters in length HDDVD_ADV spec 1.0 */

typedef enum tagPLAYFLAG
{
    PLAYFLAG_NORMAL    = 0,
    PLAYFLAG_SPN,
    PLAYFLAG_SPNEOF
}PLAYFLAG;


/* Play Command */
typedef union tagPlayCmd
{
    /* annonymous */
    struct
    {
        ULONG                ulData0;
        ULONG                ulData1;
        ULONG                ulData2;
    }anon;

    /* Play CD */
    struct
    {
        ULONG                ulStart;
        ULONG                ulEnd;
        DR_CD_SECTOR_TYPE    sectorType;
        DR_QUEUE_TYPE        queueType;
        DR_PLAY_TYPE         playType;
        SHORT                sSpeed;
    }cd;

    /* Play DVD */
    /* Play HDDVD_STD */
    struct
    {
        ULONG                ulStart;
        ULONG                ulEnd;
        ULONG                ulBegin;
        DR_QUEUE_TYPE        queueType;
        DR_PLAY_TYPE         playType;
        BOOLEAN              fIsVobuStill;
        BOOLEAN              fIsLastCell;
        PVOID                pvContext;
    }dvd;

    /* Play HDDVD_ADV */
    struct
    {
        char                 strURI[HDDVD_URI_MAX_SIZE];
        uint64               boIn;           /* the byte offset of the in point */
        uint64               boOut;          /* the byte offset of the out point */
        TIME45k              time45k_In;
        TIME45k              time45k_Out;
        VDVD_CONNECT_COND    connectCond;
        DR_STREAM            strmType;
        DR_SRI               skip_evobu;
        DR_REF_EA            read_until_ref;
        PVOID                pvContext;
    }hddvd_adv;

    /* Play BDROM */
    struct
    {
        ULONG                ulFilenum;
        union{
            ULONG            ulInTime;
            ULONG            spnIn;
        };
        union{
            ULONG            ulOutTime;
            ULONG            spnOut;
        };
        PLAYFLAG             playFlag;
        BYTE                 ubRefToSTC;
        VDVD_CONNECT_COND    connectCond;
        DR_STREAM            strmType;
        BOOLEAN              fReverse;
        BYTE                 bDiscrete ;
        PVOID                pvContext;
        ULONG                playItem_id;
        ULONG                playList_id;
        ULONG                title_num;
    }bdrom;
}PLAYCMD;


typedef struct tagPlayMsg
{
    ULONG   ulSemID;
    PLAYCMD play;
}PLAYMSG;


/* Angle Command */
typedef struct tagAngleCmd
{
    ULONG  ulAngle;
    ULONG  ulStartAngleCellAddr;
    ULONG  ulEndAngleCellAddr;
}ANGLECMD;


/* Speed Command */
typedef struct tagSpeedCmd
{
    ULONG  skip_vobu;
    ULONG  read_until_ref;
}SPEEDCMD;




/******************
** state is a bitfield
**
** first is the disk type (undefined, cd, dvd, BDROM)
**
** second is play state (non-zero means we are in a play state)
**
** third is attach stream state (non-zero means we are in an attach stream state)
**
** fourth may be used as an index for further differentiation of non- play or attach stream states
******************/
#define DR_STATE_DISC_FIELD                 0xf000
#define DR_STATE_UNDEF                      0x0000
#define DR_STATE_CD                         0x1000
#define DR_STATE_VCD                        0x2000
#define DR_STATE_DVD                        0x3000
#define DR_STATE_BDROM                      0x4000
#define DR_STATE_HDDVD_STD                  0x5000
#define DR_STATE_HDDVD_ADV                  0x6000

#define DR_STATE_PLAY_FIELD                 0x0f00
#define DR_STATE_PLAY                       0x0100

#define DR_STATE_ATTACH_STREAM_FIELD        0x00f0
#define DR_STATE_ATTACH_STREAM              0x0010


#define BDROM_NUM_MAX_PREFETCH              DR_STREAM_MAX_BDROM_STREAMS   /* must be >= DR_STREAM_MAX_BDROM_STREAMS AND < 0xf */
#define BDROM_NUM_MAX_SIMUL_PREFETCH        BDROM_NUM_MAX_PREFETCH        /* must be <= BDROM_NUM_MAX_PREFETCH */

#define HDDVD_ADV_NUM_MAX_PREFETCH          DR_STREAM_MAX_HDDVD_ADV_STREAMS
#define HDDVD_ADV_NUM_MAX_SIMUL_PREFETCH    HDDVD_ADV_NUM_MAX_PREFETCH

typedef enum tagDR_STATE
{
    DR_STATE_UNREALIZED              = DR_STATE_UNDEF,
    DR_STATE_DISCID                  = DR_STATE_UNDEF + 1,

    DR_STATE_CD_ATTACH_STREAM        = DR_STATE_CD | DR_STATE_ATTACH_STREAM,
    DR_STATE_CD_PLAY                 = DR_STATE_CD | DR_STATE_PLAY,

    DR_STATE_VCD_ATTACH_STREAM       = DR_STATE_VCD | DR_STATE_ATTACH_STREAM,
    DR_STATE_VCD_PLAY                = DR_STATE_VCD | DR_STATE_PLAY,

    DR_STATE_DVD_ATTACH_STREAM       = DR_STATE_DVD | DR_STATE_ATTACH_STREAM,
    DR_STATE_DVD_PLAY                = DR_STATE_DVD | DR_STATE_PLAY,

    DR_STATE_BDROM_ATTACH_STREAM     = DR_STATE_BDROM | (DR_STATE_ATTACH_STREAM * BDROM_NUM_MAX_SIMUL_PREFETCH),
    DR_STATE_BDROM_PLAY              = DR_STATE_BDROM | DR_STATE_PLAY,

    DR_STATE_HDDVD_STD_ATTACH_STREAM = DR_STATE_HDDVD_STD | DR_STATE_ATTACH_STREAM,
    DR_STATE_HDDVD_STD_PLAY          = DR_STATE_HDDVD_STD | DR_STATE_PLAY,

    DR_STATE_HDDVD_ADV_ATTACH_STREAM = DR_STATE_HDDVD_ADV | (DR_STATE_ATTACH_STREAM * HDDVD_ADV_NUM_MAX_SIMUL_PREFETCH),
    DR_STATE_HDDVD_ADV_PLAY          = DR_STATE_HDDVD_ADV | DR_STATE_PLAY
} DR_STATE;

#endif

⌨️ 快捷键说明

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