📄 plm.h
字号:
/**********************************************************************************
* Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
* File: $Workfile: plm.h $
*
* Description:
* ============
* Playback Mode handler external definitions.
*
* Log:
* ====
* $Revision: $
* Last Modified by $Author: $ at $Modtime: $
**********************************************************************************
* Updates:
**********************************************************************************
* $Log: $
*
*
*********************************************************************************/
#include "Config.h" /* Global Configuration - do not remove! */
#ifndef PLM_H
#define PLM_H
/*** Include Files ***************************************************************/
#include "Include\SysDefs.h"
#include "Drive\Zfe\zfe.h"
#include "Drive\Zfe\Shared\Pmq\pmq.h"
/*** Defines *********************************************************************/
#ifdef DRV_JUMPS_STATISTIC
#define JUMPS_COUNT_ARRAY_ENTRIES 8
#define JUMPS_COUNT_ARRAY_THRESHOLD 1
#define JUMPS_TYPES_ARRAY_ENTRIES 9
#define JUMPS_TYPES_ARRAY_THRESHOLD 3
#endif
/*** Typedefs ********************************************************************/
typedef enum
{
PLM_MSG_PLAY_DVD = (0x0001 | PLM_MSG_ID),
PLM_MSG_PLAY_CD = (0x0002 | PLM_MSG_ID),
PLM_MSG_ABORT = (0x0003 | PLM_MSG_ID),
PLM_MSG_ECC_ERROR = (0x0004 | PLM_MSG_ID),
PLM_MSG_EDC_ERROR = (0x0005 | PLM_MSG_ID),
PLM_MSG_START_SECTOR_REACHED = (0x0006 | PLM_MSG_ID),
PLM_MSG_END_SECTOR_REACHED = (0x0007 | PLM_MSG_ID),
PLM_MSG_END_SECTOR_REACHED_ECC = (0x0008 | PLM_MSG_ID),
PLM_MSG_END_SECTOR_REACHED_EDC = (0x0009 | PLM_MSG_ID),
PLM_MSG_STP_ERROR = (0x000a | PLM_MSG_ID),
PLM_MSG_MEDIA_DETECTED = (0x000c | PLM_MSG_ID),
PLM_MSG_INVOKE_PFI_HANDLER = (0x000d | PLM_MSG_ID),
PLM_MSG_TRACK_BUFFER_FULL = (0x000e | PLM_MSG_ID),
PLM_MSG_TRACK_BUFFER_NOT_FULL = (0x000f | PLM_MSG_ID),
PLM_MSG_TOC_MESSAGE = (0x0010 | PLM_MSG_ID),
#ifdef CDTEXT_SUPPORT
PLM_MSG_CDTEXT_REACHED = (0x0012 | PLM_MSG_ID),
#endif
#ifdef DVD_VR_SUPPORT
PLM_MSG_NBCA_MESSAGE = (0x0013 | PLM_MSG_ID),
#endif
PLM_MSG_ALL_BUT_PLAY_ABORT_AND_ERROR = (0x003c | PLM_MSG_ID),
PLM_MSG_ALL_BUT_PLAY_AND_ABORT = (0x003d | PLM_MSG_ID),
PLM_MSG_ALL_BUT_PLAY = (0x003e | PLM_MSG_ID),
PLM_MSG_ALL = (0x003f | PLM_MSG_ID)
} PLM_MSG_OP;
/* PLM error types, values must match DRV_READ_ERROR_TYPE in drv_defs */
typedef enum
{
PLM_ERROR_UNEXPECTED_SECTOR = 0,
PLM_ERROR_SHOCK = 1,
PLM_ERROR_TRACKING_LOST = 2,
PLM_ERROR_MISSED_START_PSN = 3,
PLM_ERROR_ECC = 4,
PLM_ERROR_EDC = 5,
PLM_ERROR_START_FAIL = 6,
PLM_ERROR_READ_TIMEOUT = 7,
PLM_ERROR_SERVO_READ_FAIL = 8,
NUMBER_OF_PLM_ERROR_TYPES = 9
} PLM_ERROR_TYPE;
/* PLM bit-stream types */
typedef enum
{
PLM_DVD_VIDEO,
PLM_DVD_AUX,
PLM_DVD_PFI,
PLM_DVD_AVI,
PLM_DVD_AUD,
PLM_DVD_JPEG,
PLM_VCD,
PLM_SVCD,
PLM_CD_MPEG,
PLM_CD_AVI,
PLM_CD_AUX,
PLM_CDDA,
PLM_CD_AUD,
PLM_CD_JPEG,
#ifdef CDTEXT_SUPPORT
PLM_CDTEXT,
#endif
PLM_CDTOC,
NUM_OF_CB_FOR_RETRIES
} PLM_BITSTREAM_TYPE_ST;
typedef enum
{
PLM_BE_BUFFER_EMPTY_E,
PLM_BE_BUFFER_ELMOST_EMPTY_E,
PLM_NUM_OF_BE_BUFFER_STATUSES_E
} PLM_BE_BUFFER_STATUS_ET;
/* Errors statistics */
#ifdef DRV_ERRORS_STATISTIC
typedef struct
{
UINT16 err_tbl[NUMBER_OF_PLM_ERROR_TYPES];
UINT16 ecc_retry;
UINT16 ecc_ignore;
} PLM_ERRORS_STATISTIC_ST;
#endif
/* Jumps statistics */
#ifdef DRV_JUMPS_STATISTIC
typedef struct
{
UINT16 keep_head;
UINT16 keep_head_on_error;
UINT16 keep_head_on_tbf;
UINT16 keep_head_jumps_cntr;
UINT16 keap_head_jumps[JUMPS_COUNT_ARRAY_ENTRIES];
UINT16 keap_head_jumps_types[JUMPS_TYPES_ARRAY_ENTRIES];
UINT16 monitor_jumps_cntr;
UINT16 monitor_jumps[JUMPS_COUNT_ARRAY_ENTRIES];
UINT16 monitor_jumps_types[JUMPS_TYPES_ARRAY_ENTRIES];
} PLM_JUMPS_STATISTIC_ST;
#endif
/*** Public Functions ************************************************************/
void PLM_Init(void);
void PLM_ReInit(void);
void PLM_Handler(PMQ_MSG * curr_msg);
#define PLM_SendMessage(op,param1,param2,param3) \
PMQ_SendMessage((op)|PLM_MSG_ID,param1,param2,param3)
#define PLM_MessageFlush(op) \
PMQ_MessageFlush((op)|PLM_MSG_ID)
BOOL PLM_IsPlayDone(void);
BOOL PLM_IsReadingStarted(void);
BOOL PLM_IsStreamingStarted(void);
ZFE_ERR_CODE PLM_SendAbort(void);
ZFE_ERR_CODE PLM_SetBitRate(DRV_BITRATE_TYPE_ET type);
#ifdef READ_BIT_RATE
UINT16 PLM_GetBitRate(void);
#endif
void PLM_MediaDetectionFinished(void);
void PLM_InstallDrvCoreCb(DRV_CORE_CB cb);
ZFE_ERR_CODE PLM_GetErrorPsn(UINT32 * err_psn);
void PLM_PassErrorToHighLevel(PLM_ERROR_TYPE err_type);
#ifdef BE_FE_ERRORS_HANDLING
void PLM_LogError(UINT32 psn);
UINT16 PLM_GetErrorsCount(UINT32 start_psn, UINT32 end_psn);
#endif
BOOL PLM_GetBeBuffersStatus(PLM_BE_BUFFER_STATUS_ET status);
UINT16 PLM_GetBeBuffersFullness(void);
void __interrupt PLM_FeConcentratorIsr(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -