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

📄 o_digest.c

📁 Zoran V966 DVD 解码 Soc芯片的源程序
💻 C
📖 第 1 页 / 共 2 页
字号:
/****************************************************************************************************
*  Copyright (c) 2005 ZORAN Corporation, All Rights Reserved
*  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
*  File: o_digest.c
*
* Description: Project definition of the MSO_DIGEST_COMPONENT
* =========
*
****************************************************************************************************/
#include "Config.h"		// Global Configuration - do not remove!
#ifdef DEBUG_UI_TRACE
#undef IFTRACE
#define IFTRACE if (gTraceUI)
#include "Debug\DbgMain.h"
#endif //DEBUG_UI_TRACE

#include "include\sysdefs.h"	// Global definition - do not remove!

#ifdef D_JPEG_DIGEST_SUPPORT

/****************************************************************************************************
*	INCLUDE FILES
****************************************************************************************************/
// Include project specific
#include "gui\menu_system\ms_display.h"
#include "GUI\Menu_system\ms_screen.h"
#include "GUI\Menu_system\ms_component.h"
#include "GUI\Menu_system\osd_rendering.h"
#include "GUI\Menu_system\ms_send_op.h"
#include "GUI\Menu_system\ms_menu.h"
#include "GUI\Menu_system\ms_object.h"
#include "GUI\Menu_system\ms_container.h"
#include "Font\fonts.h"
#include "Components\Digest\o_digest.h"
#include "GUI\Object_class\Text\mso_text.h"
#include "GUI\Resource\Bitmap\bitmap.h"
#include "Menu\menu_operation_def.h"
#include "Menu_config\menu_config_common.h"


#include "Decoder\Decoder.h"

// Include configuration header file: named constants, macros and typedefs.
#include "Components\Digest\o_digest_config.h"
// Include custom header file: customer specific definitions, over-writing common ones.
#include "Components\Custom\Digest\o_digest_custom.h"

#ifndef DEBUG_UI_TRACE
#undef dbg_printf(sMsg)
#define dbg_printf(sMsg)
#undef	dbgm_printf(sMsg, mode)
#define dbgm_printf(sMsg, mode)
#endif

/***************************************************************************************
* 	Operation functions
****************************************************************************************/
MS_OP _DigestTexTOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
MS_OP _DigestItemOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
/***************************************************************************************
* 	Display functions
****************************************************************************************/
BOOL _DigesetItemFillOsdSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea);

/***************************************************************************************
* 	Utility functions
****************************************************************************************/
void _AllocateDigestItemPosition(MSO_OBJECT __NEAR* pThis);
void  _AddDigestItem(MSO_OBJECT __NEAR* pThis);
MS_OP _DigestNavigation(MSO_CONTAINER __NEAR* pThis, MS_OP MsOp , UINT32 lParam);
MSO_OBJECT __NEAR* _GetObjectFromIndex(MSO_CONTAINER __NEAR* pThis,  UINT16 wIndex);
BOOL _DigestComponentInitFocus(MSO_CONTAINER __NEAR* pThis);

/***************************************************************************************
* 	Include customization file.
****************************************************************************************/

// Include custom code file: customer specific code, over-writing common one.
#include "Components\Custom\Digest\o_digest_custom.c"
// Include configuration file: constants.
#include "Components\Digest\o_digest_config.c"

/***************************************************************************************
* 	Operation functions
****************************************************************************************/
/***************************************************************************************
*	Function	: 	ODIGEST_ComponentOperation
*
*	In		:			
*	Out 	:
*	Return	:
*	Desc	: 	This funtion handle message of digest component
****************************************************************************************/
MS_OP ODIGEST_ComponentOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	//Pre processing
	switch (MsOp)
	{
	
		case MS_OP_OPEN:
			_AddDigestItem(pThis); //add nine digest item container.
			break;
		case MS_OP_JUMP_TO_TRACK:
			{
				MSO_OBJECT __NEAR*  pDigestItem;
				pDigestItem = _GetObjectFromIndex((MSO_CONTAINER __NEAR*)pThis, (UINT16)lParam);
				if ((!MS_IsInvisible(pDigestItem) && MS_IsFocusable(pDigestItem)))
				{
					MS_SetToBeRemoved(pThis); // Do this way, it will have same process with clips Runtime in focus.
					MS_DisplayAddObject(pThis);
					break;
				}
				else
				{
					PROHIBIT(MSG_PROHIBIT_NOT_SUPPORTED_BY_DISC); //for wrong file number selected
					return MS_OP_NONE;
				}
			}
			
		case MS_OP_PLAY:
		case MS_OP_ENTER:
			MS_SetToBeRemoved(pThis); //Do this way, it will have same process with clips Runtime in focus.
			MS_DisplayAddObject(pThis);
			break;
			
		case MS_OP_MENU: 
		case MS_OP_STOP:
			{
				// Clear inside objects first to avoid UI pool overflow
				MS_SendOperation(pThis, MS_OP_EMPTY, 0);
				MS_SetToBeRemoved(pThis);
				MS_DisplayAddObject(pThis);
			}
			break;
			
		case MS_OP_SKIPF:
		case MS_OP_SKIPB:
			MS_SendOperation(pThis, MS_OP_INIT, INVALID_PARAM_VALUE);
			MS_DisplayAddObject(pThis); 
			return MS_OP_NONE;
			
		case MS_OP_LEFT:	
		case MS_OP_RIGHT:
			return  _DigestNavigation((MSO_CONTAINER __NEAR*)pThis, MsOp ,  lParam);

		case MS_OP_CORE_GET_THUMBNAIL_POSITION:
		{
			MSO_OBJECT __NEAR* pDigestItem;
			pDigestItem =  _GetObjectFromIndex((MSO_CONTAINER __NEAR*)pThis, 
						((MSO_DIGEST_COMPONENT __NEAR*) pThis) ->moParam.mwTotalItems);
			if (DEC_IsVideoPal())
			{
				((THUMBNAIL_POSITION *)lParam) -> h = (pDigestItem->moArea.mwH -DIGEST_ITEM_H_ADJUST) * (NBRLIN_NTSC /10 ) / (NBRLIN_PAL / 10);
				((THUMBNAIL_POSITION *)lParam) -> y = (pDigestItem->moArea.msY + AREA_MENU_COMMON_Y + DIGEST_ITEM_Y_ADJUST) * (NBRLIN_DIGEST/10) /(NBRLIN_PAL / 10)+ ( NBRLIN_PAL - NBRLIN_NTSC)/2 ;
			}
			else
			{
				((THUMBNAIL_POSITION *)lParam) -> h = pDigestItem->moArea.mwH*(NBRLIN_DIGEST/10)/(NBRLIN_NTSC /10 );
				((THUMBNAIL_POSITION *)lParam) -> y = (pDigestItem->moArea.msY + AREA_MENU_COMMON_Y) * (NBRLIN_DIGEST/10)/(NBRLIN_NTSC /10);
			}
			((THUMBNAIL_POSITION *)lParam) -> x = pDigestItem ->moArea.msX + AREA_MENU_COMMON_X + DIGEST_ITEM_X_ADJUST;
			((THUMBNAIL_POSITION *)lParam) -> w = pDigestItem->moArea.mwW - DIGEST_ITEM_W_ADJUST;
			return MS_OP_NONE;
		}
		case MS_OP_MENU_FOCUS_SET:
			// Set focus to first focusable digest item.
			_DigestComponentInitFocus((MSO_CONTAINER __NEAR*)pThis);
			return MS_OP_NONE;
			
		case MS_OP_PAUSE:
		case MS_OP_ZOOM:
		case MS_OP_ANGLE:
		case MS_OP_DISPLAY:
		case MS_OP_MARKAB:
		case MS_OP_REPEAT:
#ifdef EZVIEW_ENABLED
		case MS_OP_EZVIEW:
#endif
			{
				PROHIBIT(MSG_PROHIBIT_NOT_ALLOWED_NOW);
			}
			return MS_OP_NONE;
			
		default :
			break;
	}

	MsOp =  MS_ComponentBasicOperation(pThis, MsOp, lParam);
	
	switch (MsOp)
	{
	case MS_OP_INIT:
		MS_ScreenSetFocusObject(pThis); // First set focus to the digest component
		break;
	default:
		break;
	}
	return MsOp;
}
/***************************************************************************************
*	Function	: 	_DigestItemOperation
*
*	In		:			
*	Out 	:
*	Return	:
*	Desc	: 	This funtion handle message of digest item container
****************************************************************************************/
MS_OP _DigestItemOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	MSO_DIGEST_ITEM __NEAR* pDigestItem = (MSO_DIGEST_ITEM __NEAR*)pThis; 
	switch(MsOp)
	{	
		case MS_OP_EJECT:
			MS_ScreenSetFocusObject((MSO_OBJECT __NEAR*)MS_GetParentPtr(pThis));
			MS_DisplayObject(pThis);
			break;
			
		case MS_OP_INIT:
			MS_SetInvisible(pThis);
			MS_SetFocusable(pThis);
			break;
			
		case MS_OP_CORE_ACTION_FINISHED:
			if (pDigestItem ->moParam.wIndex == (UINT16)lParam)  //set attr to relative digset item
			{
				MS_ClearInvisible(pThis);
				MS_DisplayAddObject(pThis);
				break; //Give clips menu chance to handle this message
			}
			return MsOp;  // can not return MS_OP_NONE. need to give clips menu to handle.
		
			
		case MS_OP_CORE_UNSUPPORTED_FORMAT:
			if (pDigestItem ->moParam.wIndex == (UINT16)lParam)  //set attr to relative digset item
			{

⌨️ 快捷键说明

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