ircmd_media_control.c
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:5k
源码类别:

DVD

开发平台:

C/C++

  1. /***********************************************************************
  2. File name:  ircmd_usboperation.c
  3. Creator:     sunzhh creat 2004-10-17
  4. Description: to show USB&CARD Fat write GUI
  5. Update:      sunzhh 2004-11-24 
  6. ************************************************************************/
  7. #if defined(FAT_Write_UI)   //sunzhh modified 20041121
  8. #include "cardfs.h"
  9. extern CARD_FILE    cardFile;//liweihua 2004-4-5
  10. extern CARD_INFO    cardP;
  11. extern void show_switch(BYTE Select_Media); 
  12. extern void switch_up(void);
  13. extern void switch_left(void);
  14. extern void switch_right(void);
  15. extern void switch_down(void);
  16. extern void switch_select(void);
  17. BYTE Select_Media;
  18. BYTE pressnum_flag;
  19. BYTE InfoGui_flag;
  20. #endif
  21. #ifdef FILE_MODE_WRITE
  22. extern const BTNAREA Rect[];
  23. extern const BTNAREA fsArea[];
  24. extern const char *FileModeWarning[];
  25. extern void  DrawFileIconX(int x, int y, int type, int mono);
  26. #if defined (NEW_MP3_GUI) || defined (FS_BMP_GUI)
  27. extern int    old_ControlArea; //record last ControlArea.
  28. extern int    HL_show;//record HL .
  29. #endif
  30. #endif
  31. void ircmd_media_control(void)
  32. {
  33. #ifdef NEW_STYLE_SETUP
  34.     if ( Is_JPEG_SlideMode()
  35.     #ifdef SUPPORT_FILE_SYSTEM_MODE
  36.     ||(IsOtherStatePlayMode()) 
  37.     #endif
  38.     ) 
  39.     {
  40.         invalid_key();
  41.         return;
  42.     }
  43. #endif
  44.     if(play_state == VCD_STATE_OPEN)
  45.         return;
  46. #ifdef FAT_Write_UI       
  47.     if (full_scrn & PERIPHERAL)
  48.         {
  49.             full_scrn &= (~PERIPHERAL);
  50.             #ifdef CD_PLAYER 
  51.                 if(cd_type_loaded==CDDA)
  52.                 {
  53.                     osd_init_cdplayer();
  54.                 }else               
  55.                     osd_init();
  56.             #else
  57.                 osd_init();
  58.             #endif
  59.             pressnum_flag=0;
  60.             #ifdef SPHE8202_ALL_TYPE_CARD_WRITE
  61.             card_browse_sign = 1; //dingzhy
  62.             #endif
  63.         }
  64.         else
  65.         {
  66.             if((full_scrn & MARK)||(full_scrn & GOTO))
  67.             {
  68.                 invalid_key();
  69.                 return;
  70.             }
  71.             full_scrn |= PERIPHERAL;               
  72.             #if defined(SUPPORT_FILE_SYSTEM_MODE)||defined(SUPPORT_MP4)
  73. if(IsOtherStatePlayMode())            
  74.                 ircmd_return();
  75.             #endif   
  76.             
  77.             if ((pFsJpeg->gbfsSlide)&& (pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG))
  78.             {
  79.   
  80.                 ircmd_return();
  81.                 FSChangeGraphMode();                     
  82.                 FS_Return2Menu();
  83.             }             
  84.             #if defined(STORAGE_WRITE_GUI)||defined(CARD_WRITE_GUI)               
  85.             if((((detect_type&USB_DEVICE)&&(detect_type&0x1E))   //||((detect_type&CF_CARD_DEVICE!=0)&&(detect_type&0x1C!=0)))&&(media_type == MEDIA_CD))
  86.             #ifdef CARD_SETUP_TYPE_3
  87.                 ||((detect_type&CF_CARD_DEVICE)&&(detect_type&0x1C))
  88.             #endif
  89.                 )&&(media_type != MEDIA_CARD)) 
  90.             {
  91.                 show_mediaswitch();
  92.             }
  93.             else    
  94.             #endif
  95.                 show_switch(Select_Media);
  96.                 //Maoyong added for IR U/D/L/R/Sel proc func setting 2004-9-24 9:54
  97.             SetFullscrnCmdFuncPtr( switch_up, switch_down, switch_left,
  98.                                        switch_right, switch_select);
  99.                                        
  100.             }
  101. #endif
  102. #ifdef FILE_MODE_WRITE   
  103.     pFsJpeg->gifsState  =  FS_STATE_MEDIA;
  104.     printf("================It is drawing =======================n");
  105.     Draw_FileMode_Menu();
  106.     BYTE srce=0;
  107.     BYTE dest=1;
  108.     MediaItem_List(FS_DIRLIST_XSTART,srce);
  109.     MediaItem_List(fsArea[FS_AREA_FILEITEM].xStart,dest);    
  110.     ShowWarning("PLEASE SELECT TO ENTER");
  111. //    HL_show = pFsJpeg->file_current_in_page;
  112.         int Res=0;
  113.         BYTE bHasShowGUI = 0;   //clear fsGUI display flag
  114.         if ( (play_state != VCD_STATE_OPEN) && (play_state != VCD_STATE_POWER) )//skip FSNav_MainLoop when user tray-out, Jeff 20020619
  115.         {
  116.             if ( Mp3ReadFinish || (Res >= 0) )
  117.             {
  118.                 if (pFsJpeg->iso9660_file_cnt)
  119.                 {
  120.                     Mp3ReadFinish   = 1;
  121.                     disp_time = 0;
  122.                     show_time();
  123.     
  124.                     //show_fat_dir_file_info();
  125.                 int iResLoop = 1;
  126.             
  127.                 do
  128.                 {
  129.                     polling();
  130.                     //iResLoop=FileMode_MainLoop();
  131.                     if(Mp3ReadFinish == 0)
  132.                     {
  133.                         iResLoop=0; 
  134.                     }
  135.                 }while (iResLoop == 1);  
  136.                     stop_init(); //Jeff 20010919
  137.                 }
  138.                 else
  139.                 {
  140.                     ClearCommand();
  141.                     FSGUI_UpdateInfoArea("");
  142.                     Mp3ReadFinish   = 1;
  143.                     play_state = VCD_STATE_STOP;
  144.                 }
  145.             }
  146.         }    
  147. #endif
  148. }