static UINT8 system_check_item_active(UINT32 id) { UINT8 action; action = C_ATTR_ACTIVE; switch(id) { case SYSTEM_LANG_ID: case SYSTEM_TV_ID: case SYSTEM_TIME_ID: case SYSTEM_PARENT_ID: case SYSTEM_OSDSET_ID: #ifdef FAV_GROP_RENAME //case SYSTEM_FAVNAME_ID: #endif #ifndef NEW_DEMO_FRAME case SYSTEM_STO_SETTING_ID: break; #endif case SYSTEM_MISC_ID: break; case SYSTEM_TIMER_ID: if(sys_data_get_group_num() == 0) action = C_ATTR_INACTIVE; #ifdef DVR_PVR_SUPPORT if(api_pvr_is_record_active()) action = C_ATTR_INACTIVE; #endif break; } return action; }
BOOL check_usb_item_is_active() { struct statvfs usb_info; BOOL ret = TRUE; if(!storage_usb_menu_item_ready()) ret = FALSE; if (fs_statvfs(MP3_ROOT_DIR, &usb_info) < 0) ret = FALSE; else if(usb_info.f_blocks == 0)//usb device do not exist or mount failure ret = FALSE; #ifdef DVR_PVR_SUPPORT else if(api_pvr_is_record_active()) { ret = FALSE; } #endif return ret; }
static UINT8 installation_check_item_active(UINT32 id) { UINT8 action; #ifndef UI_6PAGE_SUPPORT if (id >= GAMES_TETRIS_ID) return C_ATTR_ACTIVE; if (id >= TOOLS_INFO_ID) return tools_check_item_active(id); if (id >= SYSTEM_LANG_ID) return system_check_item_active(id); #endif action = C_ATTR_ACTIVE; switch(id) { case INSTALL_ANTENNA_CONNECT_ID: case INSTALL_SAT_LIST_ID: #ifdef SATLLITE_SHARE_SUPPORT case INSTALL_SHARE_SETUP_ID: //guop add 20100903 #endif break; case INSTALL_ANTENNA_SET_ID: case INSTALL_SINGLESRCH_ID: case INSTALL_MULTISRCH_ID: case INSTALL_TPSRCH_ID: if(get_tuner_sat_cnt(TUNER_EITHER) == 0) action = C_ATTR_INACTIVE; break; } #ifdef DVR_PVR_SUPPORT if(api_pvr_is_record_active()) { action = C_ATTR_INACTIVE; } #endif return action; }
static UINT8 editchannel_check_item_active(UINT32 id) { UINT8 action; UINT8 tv_grps,radio_grps; /*alfred.wu 调整了PVR模块的菜单*/ #ifndef UI_6PAGE_SUPPORT #ifdef DVR_PVR_SUPPORT if (id >= RECORD_PVRMANAGE_ID/*RECORD_PVRMANAGE_ID*/) return record_check_item_active(id); #endif #endif action = C_ATTR_ACTIVE; tv_grps = sys_data_get_sate_group_num(TV_CHAN); radio_grps = sys_data_get_sate_group_num(RADIO_CHAN); switch(id) { case CHLIST_TV_LIST_ID: if(tv_grps == 0) action = C_ATTR_INACTIVE; break; case CHLIST_RADIO_LIST_ID: if(radio_grps == 0) action = C_ATTR_INACTIVE; break; case CHLIST_DELETE_ALL_CHAN_ID: case SYSTEM_FAVNAME_ID: if(tv_grps + radio_grps == 0) action = C_ATTR_INACTIVE; break; } #ifdef DVR_PVR_SUPPORT if(api_pvr_is_record_active()) action = C_ATTR_INACTIVE; #endif return action; }
void change_channel(INT32 shift) { UINT16 cur_channel,max_channel; P_NODE p_node; UINT32 n; SYSTEM_DATA* sys_data; UINT16 cur_tp_id; UINT8 cur_ca_mode; UINT8 change_enable = TRUE; sys_data = sys_data_get(); #if 0//def PVR_DMX_DELAY_SUPPORT //guop edit 20110118 if (api_pvr_is_recording()) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_frame(MSG_POPUP_LAYER_L, MSG_POPUP_LAYER_T, MSG_POPUP_LAYER_W, MSG_POPUP_LAYER_H); win_compopup_set_msg("Please stop record, then change channel!",NULL,0); win_compopup_open_ext(&back_saved); return; } #endif //max_channel = get_node_num(TYPE_PROG_NODE, NULL); max_channel = get_prog_num(VIEW_ALL|sys_data->cur_chan_mode[sys_data->normal_group_idx], 0); if(max_channel==0) return ; cur_channel = sys_data_get_cur_group_cur_mode_channel(); get_prog_at(cur_channel, &p_node); cur_tp_id = p_node.tp_id; cur_ca_mode = p_node.ca_mode; //libc_printf("cur_tp_id = %d, cur_channel= %d\n",cur_tp_id,cur_channel); if( !(show_and_playchannel && shift==0) ) { n = 0; do{ cur_channel = (cur_channel + shift + max_channel) % max_channel; get_prog_at(cur_channel, &p_node); if(shift==0) shift = 1; n++; }while( (p_node.skip_flag || (sys_data->chan_sw==CHAN_SWITCH_FREE && p_node.ca_mode) || (sys_data->chan_sw==CHAN_SWITCH_SCRAMBLED && !p_node.ca_mode)) && n!=max_channel); if(p_node.skip_flag || (sys_data->chan_sw==CHAN_SWITCH_FREE && p_node.ca_mode) || (sys_data->chan_sw==CHAN_SWITCH_SCRAMBLED && !p_node.ca_mode)) return ; } #if ((!defined(NEW_DEMO_FRAME)) || \ (defined(NEW_DEMO_FRAME) && defined(CC_USE_TSG_PLAYER))) #ifdef DVR_PVR_SUPPORT if (api_pvr_is_recording()) { if (p_node.tp_id == cur_tp_id) { change_enable = TRUE; if (cur_ca_mode && (sys_data_get_scramble_record_mode() == 1) && api_pvr_is_record_active() && api_pvr_is_recording_cur_prog()) { change_enable = FALSE; } } else { change_enable = FALSE; } } if (!change_enable) { UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_frame(MSG_POPUP_LAYER_L, MSG_POPUP_LAYER_T, MSG_POPUP_LAYER_W+100, MSG_POPUP_LAYER_H); win_compopup_set_msg("Please stop record, then change channel!",NULL,0); win_compopup_open_ext(&back_saved); } #endif #endif if(change_enable) { /* If first time show the osd and play channel, to avoid display incorrect channel when meet skip channel. */ if(show_and_playchannel) { sys_data_set_cur_group_channel(cur_channel); win_progname_redraw(); } for(n=0;n<MAX_TIMER_NUM;n++) {//bug30192.when timer play,if change channel,cancel timer duration. if((sys_data->timer_set.TimerContent[n].wakeup_state == TIMER_STATE_RUNING) && (sys_data->timer_set.TimerContent[n].wakeup_duration_time > 0) && (sys_data->timer_set.TimerContent[n].timer_service == TIMER_SERVICE_CHANNEL)) sys_data->timer_set.TimerContent[n].wakeup_duration_time = 0; } api_play_channel(cur_channel, TRUE, TRUE,FALSE); #ifdef MULTIFEED_SUPPORT if(multifeed_have_feed(p_node.prog_id)) { UINT32 hk; ap_vk_to_hk(0, V_KEY_RED, &hk); ap_send_msg(CTRL_MSG_SUBTYPE_KEY, hk, TRUE); } #endif } }
static PRESULT tms_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 unact; UINT32 i; BOOL subt_flag; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); char new_volume[16]; switch(event) { case EVN_PRE_OPEN: wincom_open_subtitle((POBJECT_HEAD)&g_win_timeshift,RS_DVR_CONFIGURATION, 0); win_tms_set_string(sys_data_get_tms(),&tms_item_txtset1); win_tms_set_string(sys_data_get_tms2rec(),&tms_item_txtset2); win_set_rec_type_string(sys_data_get_rec_type(),&tms_item_txtset3); #if (defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT)) win_pvr_vol_init(); win_set_vol_string(&tms_item_txtset4); #endif tms_set_tms2rec_item_active(FALSE); #ifdef NEW_DEMO_FRAME OSD_SetContainerFocus(&g_win_timeshift, 4); remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con1, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con2, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&g_win_timeshift, (OBJECT_HEAD *)&tms_item_con3, CON_H + CON_GAP); #else OSD_SetContainerFocus(&g_win_timeshift, 1); #endif break; case EVN_POST_OPEN: #if(defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT)) win_pvr_vol_invalid_msg(); #endif break; case EVN_PRE_CLOSE: *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; #if (defined(MULTI_PARTITION_SUPPORT) && !defined(DISK_MANAGER_SUPPORT)) win_pvr_vol_save(); #endif sys_data_save(1); break; case EVN_POST_CLOSE: break; case EVN_UNKNOWN_ACTION: if (api_pvr_is_record_active()) break; if (sys_data_get_tms() == 0) { win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL, NULL, RS_ARE_YOU_SURE_TO_ENTER_RECORD_TP_MODE); if (pvr_r_get_record_all()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { pvr_r_set_record_all(TRUE); } else if (choice == WIN_POP_CHOICE_NO) { pvr_r_set_record_all(FALSE); } } else { #ifdef PVR3_SUPPORT win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL, NULL, RS_CONTINUE_TMS_SUPPORT); if (pvr_r_get_record_all()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { pvr_info.continue_tms = 1; } else { pvr_info.continue_tms = 0; } #endif } { win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg(NULL, NULL, RS_RECORD_CA_PROGRAM_IN_DESCRAMBLED_FORMAT); if (sys_data_get_scramble_record_mode()) win_compopup_set_default_choice(WIN_POP_CHOICE_NO); else win_compopup_set_default_choice(WIN_POP_CHOICE_YES); choice = win_compopup_open_ext(&back_saved); if (choice == WIN_POP_CHOICE_YES) { sys_data_set_scramble_record_mode(0); } else if (choice == WIN_POP_CHOICE_NO) { sys_data_set_scramble_record_mode(1); pvr_r_set_scramble(); } } break; } return ret; }
static PRESULT pvr_setting_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 unact; UINT32 i; BOOL subt_flag; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); static UINT8 preval; SYSTEM_DATA* p_sys_data; switch(event) { case EVN_PRE_OPEN: wincom_open_title((POBJECT_HEAD)&win_osdset_con, RS_PVR_SETTING, 0); p_sys_data=sys_data_get(); win_pvr_setting_timeshift_set_string(p_sys_data->timeshift); win_pvr_setting_jumpstep_set_string(p_sys_data->jumpstep); win_pvr_setting_scramble_record_mode_set_string(p_sys_data->scramble_record_mode); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con3, CON_H + CON_GAP); win_pvr_setting_ts_file_size_set_string(p_sys_data->record_ts_file_size); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con4, CON_H + CON_GAP); win_pvr_setting_tms2rec_set_string(p_sys_data->tms2rec); win_pvr_setting_ttx_subt_set_string(p_sys_data->record_ttx_subt); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con6, CON_H + CON_GAP); win_pvr_setting_rec_num_set_string(p_sys_data->rec_num); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con7, CON_H + CON_GAP); #ifdef NEW_DEMO_FRAME win_pvr_setting_record_ps_set_string(p_sys_data->rec_ps_enable); #else remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP); #endif break; case EVN_POST_OPEN: break; case EVN_PRE_CLOSE: *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; p_sys_data=sys_data_get(); sys_data_save(1); #ifndef PVR3_SUPPORT pvr_r_set_ts_file_size(p_sys_data->record_ts_file_size + 1); #endif //api_pvr_jumpstep_trans(); break; case EVN_POST_CLOSE: break; case EVN_UNKNOWN_ACTION: if (api_pvr_is_record_active()) break; win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg("Record CA program in descrambled format?", NULL, 0); if (sys_data_get_scramble_record_mode()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if (choice == WIN_POP_CHOICE_YES) { sys_data_set_scramble_record_mode(1); pvr_r_set_scramble_ext(0); } else if (choice == WIN_POP_CHOICE_NO) { sys_data_set_scramble_record_mode(0); pvr_r_set_scramble_ext(1); } break; } return ret; }
BOOL usb_remove_safely_by_hotkey() { int disk_num, tot_disk_num = 0; char disk_name[8]; int ret; UINT32 choice; UINT8 disk_sel; UINT8 back_saved; POBJECT_HEAD topmenu; ret = dm_ioctl(DM_CMD1_GET_DISK_NUM, DM_CMD_PARAM(MNT_TYPE_USB, 0, 0), &disk_num, sizeof(int)); if (ret == 0 && disk_num > 0) tot_disk_num += disk_num; ret = dm_ioctl(DM_CMD1_GET_DISK_NUM, DM_CMD_PARAM(MNT_TYPE_SD, 0, 0), &disk_num, sizeof(int)); if (ret == 0 && disk_num > 0) tot_disk_num += disk_num; ret = dm_ioctl(DM_CMD1_GET_DISK_NUM, DM_CMD_PARAM(MNT_TYPE_SATA, 0, 0), &disk_num, sizeof(int)); if (ret == 0 && disk_num > 0) tot_disk_num += disk_num; if (tot_disk_num <= 0) { return TRUE; } api_inc_wnd_count(); ID timer_id = win_compopup_start_send_key_timer(V_KEY_EXIT, 10000, TIMER_ALARM); // exit popup if no action in 5s choice = win_disk_operate_open(OPERATE_TYPE_DISK_REMOVE, &disk_sel); api_stop_timer(&timer_id); if ((topmenu = menu_stack_get_top()) != NULL) OSD_TrackObject(topmenu, C_DRAW_SIGN_EVN_FLG | C_UPDATE_ALL); if (!choice) { api_dec_wnd_count(); return TRUE; } else { win_removable_disk_get_name_str(disk_sel, disk_name); } #ifdef DVR_PVR_SUPPORT enum PVR_DISKMODE pvr_mode; char rec_vol[16], tms_vol[16]; struct statvfs buf; pvr_mode = pvr_get_cur_mode(rec_vol, tms_vol); if (api_pvr_is_record_active() && (STRLEN(rec_vol) == 9) && (strncmp(disk_name, &rec_vol[5], 3) == 0)) { win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg("USB safely remove error, please stop recording first!", NULL, 0); win_compopup_open_ext(&back_saved); api_dec_wnd_count(); return TRUE; } if (api_pvr_is_playing()) { BOOL b_can_remove = TRUE; if ((pvr_info.pvr_state == PVR_STATE_TMS_PLAY) && (STRLEN(tms_vol) == 9) && (strncmp(disk_name, &tms_vol[5], 3) == 0)) { b_can_remove = FALSE; } else if ((pvr_info.pvr_state != PVR_STATE_TMS_PLAY) && (STRLEN(rec_vol) == 9) && (strncmp(disk_name, &rec_vol[5], 3) == 0)) { b_can_remove = FALSE; } if (!b_can_remove) { win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg("USB safely remove error, please stop playing first!", NULL, 0); win_compopup_open_ext(&back_saved); api_dec_wnd_count(); return TRUE; } } if (pvr_info.pvr_state == PVR_STATE_TMS) { api_pvr_tms_proc(FALSE); fs_sync(tms_vol); } #endif #ifdef USB_SUPPORT_HUB /* remove disk */ int disk_type = diskNamePrefix2Type(disk_name); if (disk_type == MNT_TYPE_USB) { char dev_path[16]; int node_id, fd; sprintf(dev_path, "/dev/%s", disk_name); fd = fs_open(dev_path, O_RDONLY, 0); ret = fs_ioctl(fd, IOCTL_GET_NODEID, &node_id, sizeof(int)); fs_close(fd); if (ret == 0) usbd_safely_remove_ex(node_id); } #ifdef SDIO_SUPPORT else if (disk_type == MNT_TYPE_SD) { sd_notify(0); } #endif #ifdef SATA_SUPPORT else if (disk_type == MNT_TYPE_SATA) { sata_notify(0, 0); } #endif #else usbd_safely_remove(); #endif api_dec_wnd_count(); return TRUE; }
BOOL usb_remove_safely_by_hotkey() { UINT8 back_saved; // if(!storage_usb_menu_item_ready()) // return FALSE; #ifdef DVR_PVR_SUPPORT if(api_pvr_is_record_active()) { win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg("USB safely remove error, please stop recording first!", NULL, 0); win_compopup_open_ext(&back_saved); return TRUE; } else if(api_pvr_is_playing()) { win_compopup_init(WIN_POPUP_TYPE_OK); win_compopup_set_msg("USB safely remove error, please stop playing first!", NULL, 0); win_compopup_open_ext(&back_saved); return TRUE; } else if(pvr_info.pvr_state == PVR_STATE_TMS) { api_pvr_tms_proc(FALSE); } #endif win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg("Are you sure to remove USB device safely!", NULL, 0); win_compopup_set_default_choice(WIN_POP_CHOICE_NO); win_popup_choice_t choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { //api_usb_device_safely_remove(); #ifdef USB_SUPPORT_HUB /* remove disk */ char disk_name[8]; int ret; int disk_type = diskNamePrefix2Type(disk_name); if (disk_type == MNT_TYPE_USB) { char dev_path[16]; int node_id, fd; sprintf(dev_path, "/dev/%s", disk_name); fd = fs_open(dev_path, O_RDONLY, 0); ret = fs_ioctl(fd, IOCTL_GET_NODEID, &node_id, sizeof(int)); fs_close(fd); if (ret == 0) usbd_safely_remove_ex(node_id); } #ifdef SDIO_SUPPORT else if (disk_type == MNT_TYPE_SD) { sd_notify(0); } #endif #ifdef SATA_SUPPORT else if (disk_type == MNT_TYPE_SATA) { sata_notify(0, 0); } #endif #else usbd_safely_remove(); #endif api_dec_wnd_count(); } return TRUE; }
static UINT8 tools_check_item_active(UINT32 id) { UINT8 action; action = C_ATTR_ACTIVE; #ifdef USB_MP_SUPPORT struct statvfs usb_info; #endif switch(id) { case TOOLS_INFO_ID: case TOOLS_FACTORYSET_ID: break; case TOOLS_RS232UPG_ID: #ifdef OTA_UPGRADE_SUPPORT case TOOLS_OTAUPG_ID: #endif #ifdef NETWORK_SUPPORT case TOOLS_NET_LOCAL_SETTING_ID: break; #endif #ifdef NET_UPG_NEED case TOOLS_NET_UPG_ID: #ifdef DVR_PVR_SUPPORT if(api_pvr_is_record_active()) { action = C_ATTR_INACTIVE; } #endif #ifdef OTA_UPGRADE_SUPPORT if(id == TOOLS_OTAUPG_ID) { if(get_tuner_sat_cnt(TUNER_FIRST) == 0) action = C_ATTR_INACTIVE; } #endif break; #endif #if 0//def USB_MP_SUPPORT case TOOLS_USB_ID: if(!check_storage_item_is_active()) action = C_ATTR_INACTIVE; break; case TOOLS_USBUPG_ID: #ifdef USB_SAFELY_REMOVE_SUPPORT case TOOLS_USB_REMOVE_ID: #endif if(!check_usb_item_is_active()) action = C_ATTR_INACTIVE; break; #endif case TOOLS_USBUPG_ID: if(!check_usb_item_is_active()) action = C_ATTR_INACTIVE; break; #ifdef SUPPORT_PUSHVOD case TOOLS_CTI_PVOD: { if(check_pvod_item_is_active()) action = C_ATTR_ACTIVE; else action = C_ATTR_INACTIVE; } break; #endif default: break; } return action; }
static PRESULT pvr_setting_con_callback(POBJECT_HEAD pObj, VEVENT event, UINT32 param1, UINT32 param2) { PRESULT ret = PROC_PASS; UINT8 unact; UINT32 i; BOOL subt_flag; CONTAINER* cont = (CONTAINER*)pObj; UINT8 id = OSD_GetObjID(pObj); static UINT8 preval; SYSTEM_DATA* p_sys_data; switch(event) { case EVN_PRE_OPEN: #ifdef EXIT_KEY_EXIT_ALL_MENU exit_key_flag = FALSE; #endif wincom_open_subtitle((POBJECT_HEAD)&win_osdset_con, RS_PVR_SETTING, 0); p_sys_data=sys_data_get(); win_pvr_setting_timeshift_set_string(p_sys_data->timeshift); win_pvr_setting_jumpstep_set_string(p_sys_data->jumpstep); win_pvr_setting_scramble_record_mode_set_string(p_sys_data->scramble_record_mode); remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con3, CON_H + CON_GAP); win_pvr_setting_ts_file_size_set_string(p_sys_data->record_ts_file_size); remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con4, CON_H + CON_GAP); win_pvr_setting_tms2rec_set_string(p_sys_data->tms2rec); win_pvr_setting_ttx_subt_set_string(p_sys_data->record_ttx_subt); remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con6, CON_H + CON_GAP); win_pvr_setting_rec_num_set_string(p_sys_data->rec_num); remove_menu_item(&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con7, CON_H + CON_GAP); #ifdef NEW_DEMO_FRAME win_pvr_setting_record_ps_set_string(p_sys_data->rec_ps_enable); #ifdef SUPPORT_CAS9 remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con5, CON_H + CON_GAP); remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP); #endif #else remove_menu_item((POBJECT_HEAD)&g_win_pvr_setting, (OBJECT_HEAD *)&pvr_setting_item_con8, CON_H + CON_GAP); #endif #ifdef PREVIEW_SUBMENU //-a by wangyang { POBJECT_HEAD focusObj=OSD_GetFocusObject(pObj); if(param2==MENU_OPEN_TYPE_OTHER) { pvr_setting_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_SH_IDX; pvr_setting_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_SH_IDX; } else { pvr_setting_item_set[focusObj->bID-1]->style.bHLIdx=TXTS_HL_IDX; pvr_setting_item_name[focusObj->bID-1]->style.bHLIdx=TXTN_HL_IDX; } } #endif break; case EVN_POST_OPEN: wincom_open_commen_help(pObj);//-a by wangyang break; case EVN_PRE_CLOSE: *((UINT32 *)param2) &= ~C_CLOSE_CLRBACK_FLG; p_sys_data=sys_data_get(); sys_data_save(1); #ifndef PVR3_SUPPORT pvr_r_set_ts_file_size(p_sys_data->record_ts_file_size + 1); #endif //api_pvr_jumpstep_trans(); break; case EVN_POST_CLOSE: wincom_close_subtitle(); OSD_ClearScreen(); #ifdef EXIT_KEY_EXIT_ALL_MENU if( exit_key_flag == TRUE) { exit_key_flag =FALSE; mm_leave_all_menu(); } #endif //OSD_TrackObject( (POBJECT_HEAD) &g_win_mainmenu, C_UPDATE_ALL); break; #ifdef PREVIEW_SUBMENU //-a by wangyang case EVN_MSG_GOT: if (param1 == CTRL_MSG_SUBTYPE_CMD_STO && param2 == USB_STATUS_OVER) { //system_state = SYS_STATE_NORMAL; wincom_close_subtitle(); OSD_ClearScreen(); //wincom_close_help(); OSD_ClearObject( pObj, C_UPDATE_ALL); OSD_DrawFill(SUBMENU_W_L, SUBMENU_W_T, (SUBMENU_W_W), (SUBMENU_W_H), OSD_TRANSPARENT_COLOR, NULL); OSD_ObjOpen((POBJECT_HEAD)&win_info_con, MENU_OPEN_TYPE_OTHER ); ret = PROC_LEAVE; } break; #endif case EVN_UNKNOWN_ACTION: if (api_pvr_is_record_active()) break; win_popup_choice_t choice; UINT8 back_saved; #ifndef CI_PLUS_PVR_SUPPORT if (sys_data_get_tms() == 0) { win_popup_choice_t choice; UINT8 back_saved; win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg("Are you sure to enter record TP mode?", NULL, 0); if (pvr_r_get_record_all()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if(choice == WIN_POP_CHOICE_YES) { pvr_r_set_record_all(TRUE); } else if (choice == WIN_POP_CHOICE_NO) { pvr_r_set_record_all(FALSE); } } else #endif { win_compopup_init(WIN_POPUP_TYPE_OKNO); win_compopup_set_msg("Record CA program in descrambled format?", NULL, 0); if (sys_data_get_scramble_record_mode()) win_compopup_set_default_choice(WIN_POP_CHOICE_YES); else win_compopup_set_default_choice(WIN_POP_CHOICE_NO); choice = win_compopup_open_ext(&back_saved); if (choice == WIN_POP_CHOICE_YES) { sys_data_set_scramble_record_mode(1); pvr_r_set_scramble_ext(0); } else if (choice == WIN_POP_CHOICE_NO) { sys_data_set_scramble_record_mode(0); pvr_r_set_scramble_ext(1); } } break; } return ret; }