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

📄 pbc_types.h

📁 这是DVD中伺服部分的核心代码
💻 H
字号:
/*****************************************************************************
******************************************************************************
**                                                                          **
**  Copyright (c) 2005-2006 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 pbc_types.h
 *
 * Defines the private data types of the playback control
 * engine that are accessible by all modules of the playback
 * control engine.
 *
 * $Id: pbc_types.h,v 1.49 2007/01/26 22:25:57 rbehe Exp $
 */

#ifndef PBC_TYPES_H
#define PBC_TYPES_H

#ifdef __cplusplus
extern "C" {
#endif

#include "vdvd_types.h"
#include "playctrl.h"
#include "dr_app.h"
#include "pe_app.h"
#include "osapi.h"
#include "clpinfodb.h"

/**
 * Constants
 */
#define NUMBER_OF_PI_CONTEXTS     (3)


/**
 * PBC Engine Message Types
 */
typedef enum tagPBCENGINE_MSGTYPE
{
    PBCENGINE_MSGTYPE_EXIT = 0,
    PBCENGINE_MSGTYPE_PBC_CMD,
    PBCENGINE_MSGTYPE_BEG_STREAM,
    PBCENGINE_MSGTYPE_END_STREAM,
    PBCENGINE_MSGTYPE_DEC_DONE,
    PBCENGINE_MSGTYPE_ABORT_COMPLETE,
    PBCENGINE_MSGTYPE_NVTIMER_UPDATE,
    PBCENGINE_MSGTYPE_PREFILL_COMPLETE,
    PBCENGINE_MSGTYPE_PLAY_BTN_SOUND,
    PBCENGINE_MSGTYPE_INVALID
} PBCENGINE_MSGTYPE;

/**
 * Stream entry types
 */
typedef enum tagPBC_STREAM_ENTRY_TYPE
{
    PBC_STREAM_ENTRY_PVIDEO = 0,    // primary video
    PBC_STREAM_ENTRY_PAUDIO,        // primary audio
    PBC_STREAM_ENTRY_PGTEXTST,      // pg/textst
    PBC_STREAM_ENTRY_IG,            // IG
    PBC_STREAM_ENTRY_SVIDEO,        // secondary video
    PBC_STREAM_ENTRY_SAUDIO         // secondary audio
} PBC_STREAM_ENTRY_TYPE;

/**
 * Stream Information
 */
typedef struct tagPBC_STREAM_INFO
{
    uint32  uiPrimaryVideoStn;
    uint32  uiSecondaryVideoStn;
    uint32  uiPrimaryAudioStn;
    uint32  uiSecondaryAudioStn;
    uint32  uiPGTextSTStn;
    uint32  uiIGStn;
} PBC_STREAM_INFO;

/**
 * Playitem context
 */
typedef struct tagPBC_PLAYITEM_CONTEXT
{
    DR_STREAM               StreamType;
    uint32                  uiPlaylistID;
    VDVD_CONNECT_COND       connection;
    PE_ISTREAMCTRL_PLAYRATE PlayRate;
    PBC_STREAM_INFO         StreamInfo;

    union
    {
        struct
        {
            uint16  uiPlayitemID;
            uint32  ptsInTime;
            uint32  ptsOutTime;
            UBYTE   ubRandomShuffleIndex;
        };

        struct
        {
            UBYTE   ubSubPathID;
            UBYTE   ubSubPlayitemID;
            UBYTE   ubSubClipID;
            uint16  uiSyncPlayitemID;
        };
    };
} PBC_PLAYITEM_CONTEXT;

typedef ULONG PBC_DECDONE_STATE;

#define PBC_DECDONE_STATE_INACTIVE      0   /* neither decode done nor wait was desired */
#define PBC_DECDONE_STATE_WAITING_BOS   1   /* currently at BOS waiting for decode done */
#define PBC_DECDONE_STATE_WAITING_EOS   2   /* currently at EOS waiting for decode done */
#define PBC_DECDONE_STATE_ACTIVE        4   /* decode done was received (don't wait on next wait case) */


typedef struct tagNEW_PLAYITEM
{
    BOOLEAN           abort;          /* flag that a playitem change that is active should be aborted - set anywhere you stop playback */

    BOOLEAN           fReverse;
    uint16            playitemID;
    uint32            marker_pts;
    PBC_DECDONE_STATE doneState;
} NEW_PLAYITEM;

/**
 * Repeat Mark - Used for repeat modes
 */
typedef struct tagPBC_REPEAT_INFO
{
    BOOLEAN fRepeatInProgress;
    uint8   repeat_mode;
    uint32  uiPlayitemID_IN;
    uint32  uiPlayitemID_OUT;
    TIME45k time45k_IN;
    TIME45k time45k_OUT;
    BOOLEAN fUsePIOut;
} PBC_REPEAT_INFO;

/**
 * Playback Control handle
 */
typedef struct tagPBC_HANDLE
{
    PLAYCTRL_CALLBACK             pCallback;
    PVOID                         pvCallbackContext;
    OS_SEM_ID                     semSynch;
    OS_SEM_ID                     semRegisterMutex;
    PLAYCTRL_STATE                tState;
    DR_HANDLE                     hDR;
    PE_HANDLE                     hPE;
    BOOLEAN                       fBackupValid;
    BOOLEAN                       fReverse;
    ULONG                         ulPlayRate;
    PBC_PLAYITEM_CONTEXT          PlayitemContext[DR_STREAM_MAX_BDROM_STREAMS][NUMBER_OF_PI_CONTEXTS];
    UBYTE                         PIContextIndex[DR_STREAM_MAX_BDROM_STREAMS];
    ULONG                         ulStillTime;
    BOOLEAN                       fPLCompletePending;
    BOOLEAN                       fWaitingPrefill[MAX_PE_INPUTS];
    NEW_PLAYITEM                  newpi;
    uint64                        ICS_UO_mask_table;
    PBC_REPEAT_INFO               RepeatBlock;
    VDVD_ASPECT_RATIO             aspect_ratio;
    VDVD_VIDEO_FORMAT             video_format;
    UBYTE                         src_aspect_ratio;
    BOOLEAN                       fInteractiveTitle;
    USHORT                        usCurPLMarkID;
    PLAYCTRL_AUDIO_INTERACTIVE_ID iaudio_id;
    BOOLEAN                       fIGChangePending;
    BOOLEAN                       fSubtitleChangePending;
    ClpInfo                       *hClipInfo;
    OS_SEM_ID                     semClipInfo;
} PBC_HANDLE;

/**
 * Playback Control function pointer
 */
typedef PLAYCTRL_STATUS (*PBC_FUNC_PTR)(PBC_HANDLE *hPBC, ULONG data1, ULONG data2, ULONG data3);

typedef enum tagPBC_WHICH_CONTEXT
{
    PBC_CURRENT = 0,
    PBC_NEXT

} PBC_WHICH_CONTEXT;

/**
 * Procedure to get a playitem context
 */
inline void GetPlayitemContext(PBC_HANDLE *hPBC, PBC_WHICH_CONTEXT CurrentOrNext, DR_STREAM StreamType, PBC_PLAYITEM_CONTEXT **pPIContext)
{
    if (CurrentOrNext == PBC_NEXT)
    {
        /* Increment playitem context index */
        hPBC->PIContextIndex[StreamType] = (hPBC->PIContextIndex[StreamType] + 1) % NUMBER_OF_PI_CONTEXTS;
    }

    /* Grab a playitem context */
    *pPIContext = &(hPBC->PlayitemContext[StreamType][hPBC->PIContextIndex[StreamType] ]);
}

#ifdef __cplusplus
}
#endif

#endif

⌨️ 快捷键说明

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