📄 framebuffer.h
字号:
/************************************************** * * framebuffer.h * * CVS ID: $Id: framebuffer.h,v 1.32 2007/09/21 05:26:20 hara Exp $ * Author: Raffaele Belardi [RB] - STM * Date: $Date: 2007/09/21 05:26:20 $ * Revision: $Revision: 1.32 $ * * Description: * * API for FrameBuffer access * *************************************************** * * COPYRIGHT (C) ST Microelectronics 2005 * All Rights Reserved * **************************************************** * * STM CVS Log: * * $Log: framebuffer.h,v $ * Revision 1.32 2007/09/21 05:26:20 hara * Initial implementation for WMDRM feature into A+. * * Revision 1.31 2006/09/18 09:55:21 belardi * Corrected CVS keyword usage * * Revision 1.30 2006/09/18 09:23:02 belardi * Added Log CVS keyword into file header * * ***************************************************/#ifndef _FRAMEBUFFER_H_#define _FRAMEBUFFER_H_#include "configuration.h"#include "decoder_defines.h"typedef enum FrameBufferStatus_tag { fbDataReady, fbEmpty, fbTransferInProgress, fbTransferComplete, fbDecodingData, fbError} FrameBufferStatus; typedef struct FrameBufferElement_tag { FrameBufferStatus status; uint16 availableDataLength; uint32 en; //ElementNumber uint8 *data; ElementFlagType ElementFlag; uint32 startOffset; //offset from the begining of current file (last byte in the element) tQsubcode_event subcode;} FrameBufferElement;void FrameBufferInit(uint32);//void FrameBufferStartTransfer(ElementFlagType FBflag);//void FrameBufferStartTransfer(ElementFlagType FBflag, FILE_STRUCT *File, FAT_PRIVATE_STRUCT *FAT_private);//void FrameBufferTransferDone(int copiedDataLength);FrameBufferStatus FrameBufferGetData(FrameBufferElement *pBufferElement, uint8 update);//void FrameBufferResumeTransfer(void);//FrameBufferStatus FrameBufferUpdate(void);void SetEmptyFBE(unsigned char From, unsigned char To);void SetEmptyFBECycle(unsigned char From, unsigned char To);unsigned char GetElementNumber(unsigned char *pBuffer);unsigned char *GetNextFBElement(void);uint32 GetDecodedBytes(void);void SetDecodedBytes(uint32 unprocessedData);void SetDecodedBytesWMA(uint32 offset);uint8* FBM_GetFreeElement(uint16 *bytes_free);void FBM_SetFullElement(tQsubcode_event *subcode, ElementFlagType FBflag_last, uint16 copiedDataLength, uint32 startOffset);void FB_clearWriteToElement(void);void FB_clearAll(void);void ClearFBElement(uint8 ElementNumber);#define ROM_REQUEST_SIZE 2048#define CDDA_REQUEST_SIZE 2352#define MAX_CTR_REQUEST_LENGTH CDDA_REQUEST_SIZE#define FRAME_BUFFER_ELEMENT_LENGTH CDDA_REQUEST_SIZE#if (0 != HAVE_WMDRM_LARGE_BUFFER) #define FrameBufferInternalElements 4 /* Number of elements on normal frame buffer. */ #if (0 != HAVE_WMDRM_H10_WORKAROUND) #define FrameBufferSdramElements 160 /* Number of elements on big frame buffer. */ #else #define FrameBufferSdramElements 64 /* Number of elements on big frame buffer. */ #endif#else#define FrameBufferElements 4#endif#define MAX_DATA_REQUESTED CDDA_REQUEST_SIZE#if (0 != HAVE_WMDRM_LARGE_BUFFER) #define FB_EMPTY_RATIO FrameBufferInternalElements*0.2 #define FB_STARTUP_THR ((FB_STARTUP_ELEMENT < FrameBufferSdramElements) ? (FrameBufferSdramElements - FB_STARTUP_ELEMENT) : 0) #if (0 != HAVE_WMDRM_H10_WORKAROUND) #define FB_STARTUP_ELEMENT 80 /* Number of element to store on startup phase. This is to compensate device response delay. */ #else #define FB_STARTUP_ELEMENT 32 /* Number of element to store on startup phase. This is to compensate device response delay. */ #endif#else#define FB_EMPTY_RATIO FrameBufferElements*0.2#endif#if (0 != HAVE_WMDRM_LARGE_BUFFER)extern uint16 FrameBufferElements;extern int g_FBempty; // number of empty elements in FB #endifextern FrameBufferElement FrameBuffer[];#endif //_FRAMEBUFFER_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -