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

📄 be_api.c

📁 三星ic 9980的源代码. 718版.
💻 C
字号:
/******************************************************************************
 *   Filename		: BE_Api.c
 *   Start			: 2002. 11. 8
 *   By			: niceboy
 *   Contact		: hongsik7.park@samsung.co.kr
 *   Description      : BE exposed funtions for Application
 * 	
 *   History		:
 *			031209 - start to code with RAM file play ( mpeg1 video only)	 
 *
 ******************************************************************************
 */

/******************************************************
 *       INCLUDES
 *****************************************************/
#include "Sys_call_abstract.h"
#include "s5h_capability.h"
#include "BE_API.h"
#include "s5h_types.h"
#include "S5h_Api.h"
#include "S5l_memmap.h"
#include "S5h_common_reg.h"
#include "S5h_BE_API.h"	/* internal BE APIs that used by BE tasks only */
#include "viddec_api.h"
#include "vp_api.h"
#include "psd.h"

void NullPlayCallback( S5H_Notification_t type, void *buffer );
extern void TrackBufferInit ( void );
extern void FP_Init( void );
extern void DeInit_FP(void);
extern void Init_OSDColor(void);
extern void Init_OSD(void);
extern void TrackBufferInit ( void );
extern void Remocon_Set(void);
extern void S5H_AttachKeySendCallback( S5H_FPCALLBACK callback );
extern void KeyMsgSender( UINT data, void *param );

S5H_BEStatus_t 		gBE_Status;
UINT				curPlayState = 0;
S5H_PLAYCALLBACK 	AttachedPlayCallback = NullPlayCallback;
extern DiscModeForm_t	gDisc_mode;

/* {{{ Functions */
void S5H_BEInit ( void )
{
	/*
		1. set IP controlregister to init each IP block
		2. adjust interrupt & ISR & HISR
	*/

	// CreateVideoDec ( );
	Init_VD ( );
	Init_PSD (  );		
	Init_GA();
	Init_MIX();
	Init_VP( DEFAULT_SYSTEM_MODE );
	Init_SDOut( DEFAULT_SYSTEM_MODE );
#if 0//Lumin20050822==>optimized
	Init_GPIO();	
#endif
     FP_Init();		 // POWL VFD ON/FF if block , off : disable for 128pin uart 					//vfd Init
#if	IODMA_ENABLE
	Init_IODMA();
#endif

#if	MAD_ENABLE	
	Init_MAD();
#endif	/* MAD_ENABLE */
	
	Remocon_Set();
	S5H_AttachKeySendCallback( &KeyMsgSender );	
	Init_OSDColor();

	curPlayState = 0;

#if BE_DEBUG
	SysPrintf("\n S5H_BEInit() was called");
#endif
}
// #if USE_ZIPPED_FONT
// extern 	void ExtractFontResource ( );
// #endif

void S5H_BERunVCD ( void )
{
	gBE_Status.curState = BE_STATE_RUNNING;


// #if USE_ZIPPED_FONT
//	ExtractFontResource ( );
// #endif	

	S5L_SetMemoryMap ( MM_VCD );

	/* KBA ! Moved from FE !!! */
	TrackBufferInit ( );

	RunVideoDec ( );
	RunVCD_SDOut();
#if IODMA_ENABLE
	RunVCD_IODMA();
#endif /* IODMA_ENABLE */
#if MAD_ENABLE	
	RunVCD_MAD();
#endif	/* MAD_ENABLE */

	// RunVCD_VP();
	// RunVCD_Mix();
	// MIX_SetMode ( (gOutput_tv_system == DISPLAY_PAL_B ) ? MIX_PAL : MIX_NTSC  );
#if BE_DEBUG
	SysPrintf("S5H_BERunVCD() was called\n");
#endif
}

#if CDDA_NEW_PLAY_SCHEME
void S5H_BERunCDDA(void)
{
	gBE_Status.curState = BE_STATE_RUNNING;
	S5L_SetMemoryMap(MM_CDDA);
	TrackBufferInit ( );
	RunCDDA_PSD();
	RunVCD_IODMA();
}
#endif

void S5H_BERunMP3 ( void )
{
	S5L_SetMemoryMap ( MM_MP3 );
	
	gBE_Status.curState = BE_STATE_RUNNING;

	/* Warning !!!I am calling it temporarily ! Please find a permenant solution */
	TrackBufferInit ( );	

	curPlayState = 0;

	RunMP3_PSD();

	// RunVCD_Mix ( );

	RunVCD_SDOut();
		
	RunVCD_IODMA();
	RunVCD_MAD();

#if VIDEO_LOGO
	/* KBA  #1708@2005# : This mode is not going to show the logo ! */
	VD_ClearLogoState ( );
#endif

#if BE_DEBUG
	SysPrintf ( "S5H_BERunMP3() was called\n" );
#endif
}

void S5H_BEDeInit()
{
	/*
		1. set IP controlregister to init each IP block
		2. adjust interrupt & ISR & HISR
	*/
#if 0//Lumin20050822==>optimized
	DeInit_GPIO();
#endif
	DeInit_PSD (  );

	DeInit_VD (  );

	KillVideoDec ( );

	DeInit_GA();
	DeInit_MIX();
	
	// DeInit_VP();	
	VP_SetOnOff ( VP_OFF );
	
	DeInit_SDOut();
	DeInit_FP();			//vfd deinit
#if MAD_ENABLE	
	DeInit_MAD();
#endif /* MAD_ENABLE */
#if IODMA_ENABLE
	DeInit_IODMA( );
#endif /* IODMA_ENABLE */
#if BE_DEBUG	
	SysPrintf("\n S5H_BEInit() was called");
#endif
}
#if 0 /* KBA #2010@2005# : Reduce code size */
void S5H_BEPlayPauseVCD()
{
	/* 
		gBE_Status.curState will be used by renderer (SDOut & IODMA ).
	*/
	
	/* Toggle BE running state */
	if( gBE_Status.curState == BE_STATE_RUNNING) {
		gBE_Status.curState = BE_STATE_PAUSED;		
	} else if ( gBE_Status.curState == BE_STATE_PAUSED){
		gBE_Status.curState = BE_STATE_RUNNING;	
	} else {
#if BE_DEBUG	
		SysPrintf("\n Error - S5H_BEPlayPauseVCD() was called");
#endif
		/*
			This is not allowed. 
			if Stopped state, S5H_BERunVCD() must be called instead of S5H_BEPlayPauseVCD().
		*/
	}
}
#endif
/******************************************************************************
 * Function name  : NullPlayCallback                                          *
 * Arguments      :                                                           *
 * Return         :                                                           *
 * By             :                                                           *
 * Description    :                                                           * 
 ******************************************************************************
 */
void NullPlayCallback( S5H_Notification_t type, void *buffer )
{
}

/******************************************************************************
 * Function name  : S5H_AttachPlayCallback                                    *
 * Revision       :                                                           *
 * Arguments      : S5H_PLAYCALLBACK                                          *
 * Return         : void                                                      *
 * By             :                                                           *
 * Description    : Attach a callback function                                *
 ******************************************************************************
 */
void S5H_AttachPlayCallback( S5H_PLAYCALLBACK func )
{
	AttachedPlayCallback = func;
}

/******************************************************************************
 * Function name  : S5H_DetachPlayCallback                                    *
 * Revision       :                                                           *
 * Arguments      : void						                              *
 * Return         : void                                                      *
 * By             :                                                           *
 * Description    : Attach a callback function                                *
 ******************************************************************************
 */
void S5H_DetachPlayCallback( void )
{
	AttachedPlayCallback = NullPlayCallback;
}

DiscModeForm_t Get_DiscMode(void)
{
	return gDisc_mode;
}
/* }}} */

⌨️ 快捷键说明

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