コード例 #1
0
ファイル: win_timer_set.c プロジェクト: jinfeng-geeya/3202C
void win_timerset_timerservice_change(BOOL update)
{
	UINT8 action;
	TEXT_FIELD *txt;
	MULTISEL *msel;
	UINT16 ch_idx, ch_cnt;
	TIMER_SET_CONTENT *settimer;
	P_NODE p_node;


	settimer = &timer_set;

	if (TIMER_MODE == TIMER_MODE_OFF)
		action = C_ATTR_INACTIVE;
	else
	{
		if (TIMER_SERVICE_TYPE == TIMER_SERVICE_MESSAGE)
			action = C_ATTR_INACTIVE;
		else
			action = C_ATTR_ACTIVE;
	}

	/* TIMER service information: message or channel */
	txt = &timer_txt_serviceinfo;
	msel = &timer_msel_serviceinfo;

	if (TIMER_SERVICE_TYPE == TIMER_SERVICE_MESSAGE)
	{
		/* TIMER_SERVICE_SMG */
		OSD_SetMultiselSelType(msel, STRING_ID);
		OSD_SetMultiselCount(msel, 3);
		OSD_SetMultiselSelTable(msel, (void*)WakeupMessageStr_id);
		if (settimer->wakeup_message >= 3)
			settimer->wakeup_message = 0;
		OSD_SetMultiselSel(msel, settimer->wakeup_message);
	}
	else
	{
		//modified by Robin

		if (get_prog_by_id(settimer->wakeup_channel, &p_node) == DB_SUCCES)
			ch_idx = get_prog_pos(settimer->wakeup_channel);
		else
			ch_idx = sys_data_get_cur_group_cur_mode_channel();
		ch_cnt = get_prog_num(VIEW_ALL | settimer->wakeup_chan_mode, 0);
		OSD_SetMultiselSelType(msel, STRING_PROC);
		OSD_SetMultiselCount(msel, ch_cnt);
		OSD_SetMultiselSel(msel, ch_idx);
	}
	OSD_SetTextFieldContent(txt, STRING_ID, (UINT32)TimerServiceTxtStr_id[TIMER_SERVICE_TYPE]);
	if (update)
		OSD_DrawObject((POBJECT_HEAD) &timer_con_serviceinfo, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL);

	set_container_active(&timer_con_duration, action);
	if (update)
		OSD_DrawObject((POBJECT_HEAD) &timer_con_duration, C_UPDATE_ALL);
}
コード例 #2
0
ファイル: win_timer_set.c プロジェクト: Janesak1977/ali3602
void win_timerset_timerserviceinfo_change(BOOL update,UINT16 sel)
{
	MULTISEL	*msel;
	TIMER_SET_CONTENT* settimer;
	P_NODE p_node;
	UINT16 ch_idx,ch_cnt;

    
	settimer = &timer_set;
	msel = &timer_msel_serviceinfo;

    if(TIMER_SERVICE_TYPE == TIMER_SERVICE_MESSAGE)
    {
		OSD_SetMultiselSelType(msel,STRING_ID);
		OSD_SetMultiselCount(msel,3);
		OSD_SetMultiselSelTable(msel, (void*)WakeupMessageStr_id);
        if(sel >=3)
            sel = 0;
          settimer->wakeup_message = sel;            
		OSD_SetMultiselSel(msel,settimer->wakeup_message);		
    }
    else
    {
        if(get_prog_at(sel,&p_node) == DB_SUCCES)
            ch_idx = sel;
        else
        {
            ch_idx = sel = 0;
            get_prog_at(sel,&p_node);
        }
        settimer->wakeup_channel = p_node.prog_id; 
        
		ch_cnt = get_prog_num(VIEW_ALL | settimer->wakeup_chan_mode, 0);
		OSD_SetMultiselSelType(msel,STRING_PROC);
		OSD_SetMultiselCount(msel,ch_cnt);
		OSD_SetMultiselSel(msel, ch_idx);			
     }
	if(update)
		OSD_DrawObject((POBJECT_HEAD)&timer_con_serviceinfo, C_DRAW_SIGN_EVN_FLG |C_UPDATE_ALL);
}
コード例 #3
0
ファイル: win_tvsys.c プロジェクト: Janesak1977/ali3602
void win_av_load_setting(void)
{
	MULTISEL * msel;	
	SYSTEM_DATA* sys_data;
	UINT32 i,sel,cnt,rf_mode;
	
	sys_data = sys_data_get();
	

	/* TV MODE */
	msel = av_item_set[TVMODE_ID - 1];
	OSD_SetMultiselCount(msel, get_tv_mode_count());

	sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
	OSD_SetMultiselSel(msel, sel);

	/* TV Aspect */
	msel = av_item_set[TVASPECT_ID - 1];
	sel = win_av_get_index(sys_data);
	OSD_SetMultiselSel(msel, sel);

	/* Video Output */
	msel = av_item_set[VIDEOOUT_ID - 1];
#ifdef HDTV_SUPPORT
	if (sys_data_get_scart_out() == SCART_YUV)
		sel = 0;
	else
		sel = 1;
#else			
	sel = sys_data->avset.scart_out;
#endif
	OSD_SetMultiselSel(msel, sel);

	/* VCR loopthrough */
	msel = av_item_set[VCR_ID - 1];
	if(sys_data->avset.scart_out == SCART_RGB)
		sel = 1;
	else
		sel = sys_data->vcrloopmode;
	OSD_SetMultiselSel(msel, sel);
	
	/* RF Mode */
	msel = av_item_set[RFSYSTEM_ID - 1];
	cnt = OSD_GetMultiselCount(msel);
	sel = sys_data->avset.rf_mode;
	if(sel >= cnt)
	{
		sel = 0;
		sys_data->avset.rf_mode = sel;
	}
	OSD_SetMultiselSel(msel, sel);
	rf_mode = sel;

	/* RF Channel */
	msel = av_item_set[RFCHAN_ID - 1];
	sel = sys_data->avset.rf_channel;
	if(sel < rf_ch_range[rf_mode][0] || sel> rf_ch_range[rf_mode][1])
	{
		sel =  rf_ch_range[rf_mode][0];
		sys_data->avset.rf_channel = sel;
		sys_data_set_rf(sys_data->avset.rf_mode,sys_data->avset.rf_channel);
	}
	OSD_SetMultiselSel(msel, sel);
	OSD_SetMultiselSelTable(msel, rf_ch_range[rf_mode]);

#ifdef HDTV_SUPPORT
	/* HDMI Video Out */
	msel = av_item_set[HDMIOUT_ID - 1];

	sel = sys_data->avset.video_format;
	OSD_SetMultiselSel(msel, sel);

	/* Digital Audio Out */
	msel = av_item_set[AUDIOOUT_ID - 1];

	sel = sys_data->avset.audio_output;
	OSD_SetMultiselSel(msel, sel);
#endif

#if (SUPPORT_DUAL_OUTPUT_ONOFF)
	/* Dual Output */
	msel = av_item_set[DUALOUT_ID- 1];

	sel = sys_data->avset.dual_output;
	OSD_SetMultiselSel(msel, sel);
#endif

}
コード例 #4
0
ファイル: win_tvsys.c プロジェクト: Janesak1977/ali3602
static PRESULT av_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 bID;
	UINT32 sel;
	UINT16* Uni_str;
	SYSTEM_DATA* sys_data;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;

	bID = OSD_GetObjID(pObj);
	sys_data = sys_data_get();
	switch(event)
	{
	case EVN_PRE_CHANGE://51
		sel = *((UINT32*)param1);
		break;
	case EVN_POST_CHANGE://52
		sel = param1;
		switch(bID)
		{
		case TVMODE_ID:
			sys_data->avset.tv_mode = tvmode_osd_to_setting(sel);
			api_video_set_tvout(sys_data->avset.tv_mode);	
			break;
		case TVASPECT_ID:
			win_av_set_ratio(sys_data,sel);
			sys_data_set_display_mode(&(sys_data->avset));			
			break;
		case VIDEOOUT_ID:
#ifdef HDTV_SUPPORT
            if (sel == 0)
				sys_data->avset.scart_out = SCART_YUV;
            else
				sys_data->avset.scart_out = SCART_RGB;
#else			
			sys_data->avset.scart_out = sel;
#endif
			if(sel == SCART_CVBS)
			{
				api_Scart_RGB_OnOff(0);
#ifdef VDAC_USE_SVIDEO_TYPE
				api_Svideo_OnOff(0);
#endif
			}
			else if(sel == SCART_RGB)
			{
				api_Scart_RGB_OnOff(1);
				//api_Svideo_OnOff(0);/*RGB output will cut off svideo output,ommit here*/
			}
			else
			{
				api_Scart_RGB_OnOff(0);
#ifdef VDAC_USE_SVIDEO_TYPE
				api_Svideo_OnOff(1);
#endif
			}
#if(SYS_MAIN_BOARD == BOARD_DB_M3602_04V01)
					system_config.avset.scart_out = sys_data->avset.scart_out;

					if(sel != 0) // RGB
					{		
						MULTISEL * msel;	
						if(TV_MODE_PAL != sys_data->avset.tv_mode || TV_MODE_NTSC358 != sys_data->avset.tv_mode)
						{
							sys_data->avset.tv_mode = TV_MODE_PAL;
							system_config.avset.tv_mode = TV_MODE_PAL;
						}
						msel = av_item_set[TVMODE_ID - 1];
						OSD_SetMultiselCount(msel, get_tv_mode_count());

						sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
						OSD_SetMultiselSel(msel, sel);
						msel->bSelType = STRING_ANSI;
						msel->pSelTable = tv_mode_sd;
						OSD_DrawObject((POBJECT_HEAD)&av_item_con1, C_UPDATE_ALL);
						msel->bSelType = STRING_PROC;
						g_rgb_yuv_changed = 1;
					}
					else // YUV
					{
						MULTISEL * msel;

						msel = av_item_set[TVMODE_ID - 1];
						OSD_SetMultiselCount(msel, get_tv_mode_count());

						sel = tvmode_setting_to_osd(sys_data->avset.tv_mode);
						OSD_SetMultiselSel(msel, sel);
						msel->bSelType = STRING_ANSI;
						msel->pSelTable = tv_mode;
						OSD_DrawObject((POBJECT_HEAD)&av_item_con1, C_UPDATE_ALL);
						msel->bSelType = STRING_PROC;
						g_rgb_yuv_changed = 1;
					}
					api_video_set_tvout(sys_data->avset.tv_mode);
					g_rgb_yuv_changed = 0;
#endif
			win_av_set_vcrloop_action(TRUE);
			if(sys_data->avset.scart_out == SCART_RGB)
				api_Scart_OutPut_Switch(1);
			else
				api_Scart_OutPut_Switch(sys_data->vcrloopmode);			
			break;
		case VCR_ID:
			sys_data->vcrloopmode = sel;
			api_Scart_OutPut_Switch(sys_data->vcrloopmode );
			break;
		case RFSYSTEM_ID:
			sys_data->avset.rf_mode = sel;
			win_check_rf_channel(sys_data);
			OSD_SetMultiselSelTable(av_item_set[RFCHAN_ID - 1], rf_ch_range[sel]);
			
			sys_data_set_rf(sys_data->avset.rf_mode, sys_data->avset.rf_channel);
			break;
		case RFCHAN_ID:
			sys_data->avset.rf_channel = sel;
			sys_data_set_rf(sys_data->avset.rf_mode, sys_data->avset.rf_channel);
			break;		
#ifdef HDTV_SUPPORT
		case HDMIOUT_ID:
			sys_data->avset.video_format = sel;
			sys_data_set_video_format(sys_data->avset.video_format);
			break;
		case AUDIOOUT_ID:
			sys_data->avset.audio_output = sel;
			sys_data_set_audio_output(sys_data->avset.audio_output);
			break;
#endif
#if (SUPPORT_DUAL_OUTPUT_ONOFF)
		case DUALOUT_ID:
			sys_data->avset.dual_output = sel;
			sys_data_set_dual_output(sys_data->avset.dual_output);
			break;
#endif
		}
 		
		break; 
	case EVN_REQUEST_STRING:
		sel = param1;
		Uni_str= (UINT16*)param2;
		switch(bID)
		{
		case TVMODE_ID:
			ComAscStr2Uni(get_tv_mode_string(sel), Uni_str);
			break;
		case TVASPECT_ID:
			ComAscStr2Uni(tv_ratio[sel], Uni_str);
			break;
#ifdef HDTV_SUPPORT
		case VIDEOOUT_ID:
			ComAscStr2Uni(video_output[sel], Uni_str);
			break;
#endif
//		case VCR_ID:			break;
		case RFSYSTEM_ID:
			ComAscStr2Uni(rf_mode_stings[sel], Uni_str);
			break;
//		case RFCHAN_ID:			break;		
		}
		break;
		
	case EVN_UNKNOWN_ACTION:
		win_av_enter_key(bID);
		
		break;
	}
 	return ret;
}
コード例 #5
0
ファイル: win_tvsys.c プロジェクト: alkap007/ali3606
static PRESULT av_item_sel_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2)
{
	PRESULT ret = PROC_PASS;
	VACTION unact;
	UINT8 bID;
	UINT32 sel;
	UINT16* Uni_str;
	SYSTEM_DATA* sys_data;
	OSD_RECT rect;
	COM_POP_LIST_PARAM_T param;

#ifdef HDMI_CERTIFICATION_UI
	MULTISEL * msel;
#endif

	bID = OSD_GetObjID(pObj);
	sys_data = sys_data_get();
	switch(event)
	{
		case EVN_PRE_CHANGE:
			sel = *((UINT32*)param1);
			break;
			
		case EVN_POST_CHANGE:
			sel = param1;
			switch(bID)
			{
				case TVMODE_ID:
					sys_data->avset.tv_mode = tvmode_osd_to_setting(sel);
					api_video_set_tvout(sys_data->avset.tv_mode);	
#ifdef HDMI_CERTIFICATION_UI
					msel = av_item_set[TVASPECT_ID - 1];
					if( check_tv_display_in_hd_mode() )
					{
						win_av_set_ratio(sys_data,3);	// 16:9
						sys_data_set_display_mode(&(sys_data->avset));

						OSD_SetMultiselCount(msel, 1);
						OSD_SetMultiselSel(msel, 3);
					}
					else
					{
						OSD_SetMultiselCount(msel, TV_RATIO_NCNT);
					}
					OSD_DrawObject((POBJECT_HEAD)msel, C_UPDATE_CONTENT);
					OSD_DrawObject((POBJECT_HEAD)&win_av_con, C_UPDATE_CONTENT);
#endif  					
					break;

				case TVASPECT_ID:
#ifdef HDMI_CERTIFICATION_UI					
					msel = av_item_set[TVASPECT_ID - 1];
					if( check_tv_display_in_hd_mode() )
					{	
						win_av_set_ratio(sys_data,3);	// 16:9
						OSD_SetMultiselSel(msel, 3);
					}
					else
#endif						
					{
						win_av_set_ratio(sys_data,sel);
					}
					sys_data_set_display_mode(&(sys_data->avset));			
					break;
					
				case VIDEOOUT_ID:
#ifdef HDTV_SUPPORT
					if (sel == 0)
					{
						sys_data->avset.scart_out = SCART_YUV;
					    sys_data->avset.tv_mode = TV_MODE_1080I_25;
						api_Scart_RGB_OnOff(0);
					}
					else
					{
						sys_data->avset.scart_out = SCART_RGB;
					    api_Scart_RGB_OnOff(1);
					}
#ifndef GPIO_RGB_YUV_SWITCH
					api_video_set_tvout(sys_data->avset.tv_mode);
#endif
					win_av_load_tv_mode_setting(TRUE);
#else			
					sys_data->avset.scart_out = sel;
					if(sel == SCART_CVBS)
					{
						api_Scart_RGB_OnOff(0);
		                #ifdef VDAC_USE_SVIDEO_TYPE
						api_Svideo_OnOff(0);
		                #endif
					}
					else if(sel == SCART_RGB)
					{
						api_Scart_RGB_OnOff(1);
						//api_Svideo_OnOff(0);/*RGB output will cut off svideo output,ommit here*/
					}
					else
					{
						api_Scart_RGB_OnOff(0);
		                #ifdef VDAC_USE_SVIDEO_TYPE
						api_Svideo_OnOff(1);
		                #endif
					}
#endif
					win_av_set_vcrloop_action(TRUE);
					if(sys_data->avset.scart_out == SCART_RGB)
						api_Scart_OutPut_Switch(1);
					else
						api_Scart_OutPut_Switch(sys_data->vcrloopmode);
					break;
					
				case VCR_ID:
					sys_data->vcrloopmode = sel;
					api_Scart_OutPut_Switch(sys_data->vcrloopmode );
					break;
					
				case RFSYSTEM_ID:
					sys_data->avset.rf_mode = sel;
					win_check_rf_channel(sys_data);
					OSD_SetMultiselSelTable(av_item_set[RFCHAN_ID - 1], rf_ch_range[sel]);					
					sys_data_set_rf(sys_data->avset.rf_mode, sys_data->avset.rf_channel);
					break;
					
				case RFCHAN_ID:
					sys_data->avset.rf_channel = sel;
					sys_data_set_rf(sys_data->avset.rf_mode, sys_data->avset.rf_channel);
					break;
					
#ifdef HDTV_SUPPORT
				case HDMIOUT_ID:
#ifdef HDMI_CERTIFICATION_UI
					if(!check_hdmi_out_in_dvi_mode())
					{	
						// STB only output RGB in DVI mode
						sys_data->avset.video_format = convert_ui_hdmi_out_sel_to_sys_video_format(sel);
						sys_data_set_video_format(sys_data->avset.video_format);
					}
#else
					sys_data->avset.video_format = sel;
					sys_data_set_video_format(sys_data->avset.video_format);
#endif
					break;
				case AUDIOOUT_ID:
					sys_data->avset.audio_output = sel;
					sys_data_set_audio_output(sys_data->avset.audio_output);
					break;
#endif
#if (SUPPORT_DUAL_OUTPUT_ONOFF)
				case DUALOUT_ID:
					sys_data->avset.dual_output = sel;
					sys_data_set_dual_output(sys_data->avset.dual_output);
					break;
#endif
			} 		
			break;
			
		case EVN_REQUEST_STRING:
			sel = param1;
			Uni_str= (UINT16*)param2;
			switch(bID)
			{
				case TVMODE_ID:
					ComAscStr2Uni(get_tv_mode_string(sel), Uni_str);
					break;
					
				case TVASPECT_ID:
#ifdef HDMI_CERTIFICATION_UI
					if( check_tv_display_in_hd_mode() )					
					{
						sel = 3; // 16:9
					}
#endif					
					ComAscStr2Uni(tv_ratio[sel], Uni_str);
					break;
#ifdef HDTV_SUPPORT
				case VIDEOOUT_ID:
					ComAscStr2Uni(video_output[sel], Uni_str);
					break;
#endif
		//		case VCR_ID:			break;
				case RFSYSTEM_ID:
					ComAscStr2Uni(rf_mode_stings[sel], Uni_str);
					break;
		//		case RFCHAN_ID:			break;		
			}
			break;
		
		case EVN_UNKNOWN_ACTION:
			win_av_enter_key(bID);		
			break;
	}
 	return ret;
}
コード例 #6
0
ファイル: Win_rs232upg.c プロジェクト: alkap007/ali3606
static void win_rs232upg_load_chunk_info()
{
	CHUNK_HEADER blk_header;
	UINT32 id,mask;
	UINT8 chunk_number;
	UINT8 i;
	char strTmp[30];
	char strTmp1[30];
	char strTmp2[30];
	char strTmp3[30];
	char strTmp4[30];
	char strTmp5[30];
	char strTmp6[30];
	char strTmp7[30];
	char strTmp8[30];
#if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE)
	UINT32 Block_id = 0, HDCP_key_ID = 0,divx_key_ID = 0,ciplus_key_ID = 0;
	UINT8 hdcp_chunk_index = 0;
   	UINT8 cipluskey_chunk_index = 0;
    
	BOOL has_hdcp_chunk = FALSE;
    	BOOL has_cipluskey_chunk = FALSE;
	UINT8 divx_chunk_index = 0;
	BOOL has_divx_chunk = FALSE;	
	UINT32 special_type =0;

#endif
//-a by wangyang del seecode upgrade {{
	UINT32 seecode_key_ID = 0;
	UINT8 seecode_chunk_index = 0;
    	BOOL has_seecodekey_chunk = FALSE;
//-a by wangyang del seecode upgrade }}

	chunk_number = sto_chunk_count(0,0);

	if(chunk_number == 0)
		return;

	if(InitBlockList() != SUCCESS)
		return;

	if(rs232upg_upgtype_chars != NULL)
		FREE(rs232upg_upgtype_chars);
	rs232upg_upgtype_chars = (UINT16**)MALLOC(sizeof(UINT16*)*chunk_number);
	if(rs232upg_upgtype_chars == NULL)
		ASSERT(0);
	for(i=0; i<chunk_number; i++)
	{
		rs232upg_upgtype_chars[i] = (UINT16*)MALLOC(16*sizeof(UINT16));
		if(rs232upg_upgtype_chars[i] == NULL)
			ASSERT(0);
	}
	
	
//	STRCPY(rs232upg_upgtype_chars[0],"allcode");
	{
			UINT16 *unistr=NULL;
         		unistr=OSD_GetUnicodeString(RS_TOTAL_FLASH);
            		ComUniStrCopyChar(rs232upg_upgtype_chars[0],(UINT16 *)unistr);
			//ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_TOTAL_FLASH),strTmp);
			//STRCPY(rs232upg_upgtype_chars[0],strTmp);
        }
	
	for(i=1; i<chunk_number; i++)
	{
		id = mask = 0;
		sto_chunk_goto(&id,mask,i + 1);
		sto_get_chunk_header(id, &blk_header);

#if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE || defined CI_PLUS_SUPPORT )
         special_type = 0;
#ifdef HDCP_IN_FLASH
		HDCP_key_ID = HDCPKEY_CHUNK_ID;
		if(((UINT32)blk_header.id) == HDCP_key_ID)
		{
			hdcp_chunk_index = i;
			has_hdcp_chunk = TRUE;
			special_type = 1;
		}
#endif
#ifdef DIVX_CERT_ENABLE
		divx_key_ID = DIVX_CHUCK_ID;
		if(((UINT32)blk_header.id) == divx_key_ID)
		{
			divx_chunk_index = i;
			has_divx_chunk = TRUE;
			special_type = 1;
		}
#endif
#ifdef CI_PLUS_SUPPORT
        ciplus_key_ID = CIPLUSKEY_CHUNK_ID;
        if(((UINT32)blk_header.id) == ciplus_key_ID)
        {
            cipluskey_chunk_index = i;
            has_cipluskey_chunk = TRUE;
            special_type = 1;
        }
#endif
//-a by wangyang del seecode upgrade {{
	seecode_key_ID =SEECODE_CHUNK_ID
        if(((UINT32)blk_header.id) == ciplus_key_ID)
        {
            seecode_chunk_index = i;
            has_seecodekey_chunk = TRUE;
            special_type = 1;
        }
//-a by wangyang del seecode upgrade }}
		if(special_type != 1)
			{
			STRCPY(rs232upg_upgtype_chars[i], blk_header.name);
//-a by wangyang del seecode upgrade {{
		if(i==1)
		{
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_FIRMWARE),strTmp1);
			STRCPY(rs232upg_upgtype_chars[i], strTmp1);
		}
		else if (i == 2)
		{
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SEECODE),strTmp2);
			STRCPY(rs232upg_upgtype_chars[i],strTmp2);
		}
		else if (i == 3)
		{
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_LOGO),strTmp3);
			STRCPY(rs232upg_upgtype_chars[i], strTmp3);
		}
		else if (i == 4)
		{
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CCCAM_PRIO),strTmp4);
			STRCPY(rs232upg_upgtype_chars[i], strTmp4);
		}
		else if (i == 5)
		{
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CCCAM_NEWCAM),strTmp5);
			STRCPY(rs232upg_upgtype_chars[i], strTmp5);
		}
		else if (i == 6)
		{
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_DEFAULT_DATA),strTmp6);
			STRCPY(rs232upg_upgtype_chars[i], strTmp6);
		}
		else if (i == 7)
		{
			ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_USER_DATA),strTmp7);
			STRCPY(rs232upg_upgtype_chars[i], strTmp7);
		}
//-a by wangyang del seecode upgrade }}
	}

#else
		STRCPY(rs232upg_upgtype_chars[i],blk_header.name);
//-a by wangyang del seecode upgrade {{
	seecode_key_ID =SEECODE_CHUNK_ID;
        if(((UINT32)blk_header.id) == seecode_key_ID)
        {
            seecode_chunk_index = i;
            has_seecodekey_chunk = TRUE;
            //special_type = 1;
        }
		if(i==1)
		{
			UINT16 *unistr=NULL;
         		unistr=OSD_GetUnicodeString(RS_FIRMWARE);
            		ComUniStrCopyChar(rs232upg_upgtype_chars[1],(UINT16 *)unistr);
			//ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_FIRMWARE),strTmp1);
			//STRCPY(rs232upg_upgtype_chars[1], strTmp1);
        	}
		
		else if (i == 2)
		{
	//		ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_SEECODE),strTmp2);
	//		STRCPY(rs232upg_upgtype_chars[i], strTmp2);
		}
		else if (i == 3)
		{
	//		ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_LOGO),strTmp3);
	//		STRCPY(rs232upg_upgtype_chars[i],strTmp3);
		}
		else if (i == 4)
		{
	//		ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CCCAM_PRIO),strTmp4);
	//		STRCPY(rs232upg_upgtype_chars[i], strTmp4);
		}
		else if (i == 5)
		{
	//		ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_CCCAM_NEWCAM),strTmp5);
	//		STRCPY(rs232upg_upgtype_chars[i], strTmp5);
		}
		else if (i == 6)
		{
		//	ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_DEFAULT_DATA),strTmp6);
		//	STRCPY(rs232upg_upgtype_chars[i], strTmp6);
		}
		else if (i == 9)
		{
		//	ComUniStrToAsc((UINT8 *)OSD_GetUnicodeString(RS_USER_DATA),strTmp7);
		//	STRCPY(rs232upg_upgtype_chars[2],strTmp7);
		}
//-a by wangyang del seecode upgrade }}

#endif
	}
//-a by wangyang del seecode upgrade {{

	if(has_seecodekey_chunk == TRUE)
	{
		FREE(rs232upg_upgtype_chars[seecode_chunk_index]);
		for(i=seecode_chunk_index; i<chunk_number;i++)
			rs232upg_upgtype_chars[i] = rs232upg_upgtype_chars[i+1];
		chunk_number--;
  #ifdef HDCP_IN_FLASH
      if( (has_seecodekey_chunk == TRUE) && seecode_chunk_index < hdcp_chunk_index)
            hdcp_chunk_index --;
        if( (has_divx_chunk == TRUE) && seecode_chunk_index < cipluskey_chunk_index)
            cipluskey_chunk_index --;
        if( (has_divx_chunk == TRUE) && seecode_chunk_index < divx_chunk_index)
            divx_chunk_index --;
  #endif
      
	}
//-a by wangyang del seecode upgrade }}

	
#ifdef HDCP_IN_FLASH
	if(has_hdcp_chunk == TRUE)
	{
		FREE(rs232upg_upgtype_chars[hdcp_chunk_index]);
		for(i=hdcp_chunk_index; i<chunk_number;i++)
			rs232upg_upgtype_chars[i] = rs232upg_upgtype_chars[i+1];
		chunk_number--;
        if( (has_cipluskey_chunk == TRUE) && hdcp_chunk_index < cipluskey_chunk_index)
            cipluskey_chunk_index --;
        if( (has_divx_chunk == TRUE) && hdcp_chunk_index < divx_chunk_index)
            divx_chunk_index --;
        
	}
#endif

#ifdef DIVX_CERT_ENABLE
	if(has_divx_chunk == TRUE)
	{
		FREE(rs232upg_upgtype_chars[divx_chunk_index]);
		for(i=divx_chunk_index; i<chunk_number;i++)
			rs232upg_upgtype_chars[i] = rs232upg_upgtype_chars[i+1];
		chunk_number--;
        if( (has_cipluskey_chunk == TRUE) && divx_chunk_index < cipluskey_chunk_index)
            cipluskey_chunk_index --;
	}
#endif

#ifdef CI_PLUS_SUPPORT
        if(has_cipluskey_chunk == TRUE)
        {
            FREE(rs232upg_upgtype_chars[cipluskey_chunk_index]);
            for(i=cipluskey_chunk_index; i<chunk_number;i++)
                rs232upg_upgtype_chars[i] = rs232upg_upgtype_chars[i+1];
            chunk_number--;
        }
#endif

#if (defined HDCP_IN_FLASH ||defined DIVX_CERT_ENABLE || defined CI_PLUS_SUPPORT )
	OSD_SetMultiselSelTable(&rs232upg_sel_upgrade_type,rs232upg_upgtype_chars);
	OSD_SetMultiselCount(&rs232upg_sel_upgrade_type, chunk_number);
#else
	OSD_SetMultiselSelTable(&rs232upg_sel_upgrade_type,rs232upg_upgtype_chars);
	OSD_SetMultiselCount(&rs232upg_sel_upgrade_type, 2);
#endif
	
}
コード例 #7
0
ファイル: win_pvod.c プロジェクト: alkap007/ali3606
static void win_pvod_load_prog_info()
{
	UINT16 prog_count;
	UINT8 i;
	char string[MAX_STRING_LEN];

	FILE *pFileSrc=NULL;
	char *buf=NULL;
	int FileLen;
	SchduleProg prog;
	int ret;
	if(pvod_prog_name != NULL)
	{
		FREE(pvod_prog_name);
	}

#if 0
	pFileSrc = fopen(xml_path,"rb");
	if(pFileSrc==NULL)
	{
		OSD_SetMultiselSelType(&pvod_sel_prog_name,STRING_PROC);
		return;
	}
	fseek( pFileSrc, 0, SEEK_END );
	FileLen = ftell( pFileSrc );
	buf = (char*)MALLOC(FileLen*sizeof(char));
	if(buf==NULL)
	{
		ASSERT(0);
	}
	fseek( pFileSrc, 0, SEEK_SET);
	fread(buf, 1, FileLen,pFileSrc);
	if(parse_xml_for_CTI(buf,FileLen)==RET_FAILURE)
	{
		return;
	}


	Set_first_Prog_for_CTI();
	prog_count = Get_Prog_Count_for_CTI();
	
	pvod_prog_name = (char**)MALLOC(sizeof(char*)*prog_count);
	Get_Prog_Attributes_for_CTI(&prog);

	for(i=0; i<prog_count; i++)
	{
		pvod_prog_name[i] = (char*)MALLOC(MAX_STRING_LEN*sizeof(char));
		if(pvod_prog_name[i] == NULL)
			ASSERT(0);
	}

	
	for(i=0; i<prog_count; i++)
	{
		Get_Prog_Attributes_for_CTI(&prog);
		pvod_prog_name[i] = (char*)MALLOC(MAX_STRING_LEN*sizeof(char));
		STRCPY(pvod_prog_name[i],prog.progGID);
		Set_next_Prog_for_CTI();

		//sprintf(string,"123-test-prog-%d",i+1);
		//STRCPY(pvod_prog_name[i],string);//test
	}
	
#endif
	pvod_prog_name = (char**)MALLOC(sizeof(char*)*1);
	pvod_prog_name[0] = MALLOC(MAX_STRING_LEN*sizeof(char));
	STRCPY(pvod_prog_name[0],"322-121-PvodV1.0");
	OSD_SetMultiselSelType(&pvod_sel_prog_name,STRING_ANSI);
	OSD_SetMultiselSelTable(&pvod_sel_prog_name,pvod_prog_name);
	OSD_SetMultiselCount(&pvod_sel_prog_name, 1);

	OSD_SetMultiselSel(&pvod_sel_prog_name,0);
	return;

	
}