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

📄 dr_prefetch_dvd.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_prefetch_dvd.h
 *
 * DR Prefetch Class header file.
 *
 * $Id: dr_prefetch_dvd.h,v 1.6 2007/01/04 23:44:25 rbehe Exp $
 */

#ifndef DR_PREFETCH_DVD_H
#define DR_PREFETCH_DVD_H


#include "dr_prefetch.h"
#include "dvdnvpck_types.h"


#ifdef __cplusplus
extern "C" {
#endif


/**************************
 *
 * CLASS DRPrefetch_DVD
 *
 **************************/
class DRPrefetch_DVD: public DRPrefetch
{
private:

    dsipkt_struct       m_dsi_packet;

    DR_ERROR drGetTitleKey(ULONG ulSector);

    inline ULONG drGetNextSectorAddr(dsipkt_struct *dsi_packet, ULONG &ulFirst, ULONG &ulLast, ULONG ulVobuEndAddr, ULONG ulNavPackLBN);

    ULONG GetCellPosition(void);

protected:

    ULONG               m_angle;                      /**< which angle to send to PE */
    ULONG               m_angleStartAddr;
    ULONG               m_angleEndAddr;
    BOOLEAN             m_fAngleChangeInProgress;

    ULONG               m_ulVobuCC;
    ULONG               m_skip_vobu;
    ULONG               m_read_until_ref;

    ULONG               m_ulCellPosition;

    ULONG               m_ulNavPackLBN;

    OS_SEM_ID           m_semAngleChg;


    virtual DR_ERROR dataRetrieve(PLAYCMD playcmd);
    DR_ERROR drSendVobuInfo(ULONG ulVobuCC, BOOLEAN fIsVobuStill);
    uint32 GetPlayRate(void);

public:
    DRPrefetch_DVD()
    {
        m_semAngleChg = OS_SemBCreateNamed(OS_SEM_Q_FIFO, OS_SEM_FULL, "AngleChg");
        if (m_semAngleChg == 0)
        {
            DbgPrint(("DRPrefetch_DVD(): Unable to create DR semaphore!\n"));
        }
        m_angle                   = DR_NO_AGL_C;
        m_angleStartAddr          = 0;
        m_angleEndAddr            = 0;
        m_fAngleChangeInProgress  = FALSE;
        m_skip_vobu               = DR_FWDI_NEXT;
        m_read_until_ref          = DR_NORMAL_PLAYBACK;
        m_ulNavPackLBN            = 0;
        m_ulVobuCC                = 0;
        m_ulCellPosition          = 0;
    }

    ~DRPrefetch_DVD()
    {
        Stop(TRUE);
        if (m_semAngleChg != 0)
        {
            OS_SemDelete(m_semAngleChg);
            m_semAngleChg = 0;
        }

    }

    void * operator new( size_t size )
    {
        return ( OS_MemAlloc(size) );
    }

    void operator delete( void * pvPFB )
    {
        OS_MemFree(pvPFB);
    }

    void ResetParams(void)
    {
            /* Take angle change critical section */
        OS_SemTake(m_semAngleChg, OS_WAIT_FOREVER);

        /* resume normal play mode */
        DbgPrint(("drCommandProc: DR_STOP, resume normal play mode\n"));
        m_angle                  = DR_NO_AGL_C;
        m_angleStartAddr         = 0;
        m_angleEndAddr           = 0;
        m_fAngleChangeInProgress = FALSE;
        m_skip_vobu              = DR_FWDI_NEXT;
        m_read_until_ref         = DR_NORMAL_PLAYBACK;
        m_ulCellPosition         = 0;

        /* Give angle change critical section */
        OS_SemGive(m_semAngleChg);
    }

    virtual DR_ERROR AngleChange(ANGLECMD *);

    DR_ERROR SetSpeed(SPEEDCMD *);

};


#ifdef __cplusplus
}
#endif


#endif

⌨️ 快捷键说明

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