fs_message_show.c
上传用户:caisangzi8
上传日期:2013-10-25
资源大小:15756k
文件大小:7k
源码类别:

DVD

开发平台:

C/C++

  1. /****************************************************
  2. linrc move FS(MP4/ID3...) OSD Display Message Here
  3. Move From:fs_nav_other.c/fs_nav_id3.c/fs_nav_mp3.c..
  4. *****************************************************/
  5. #include "global.h"
  6. #include "func.h"
  7. #include "file_if.h"
  8. #include "osd.h"
  9. #include "fsNAV.h"
  10. #include "fs_show.h"
  11. #ifdef SUPPORT_MP4
  12. /***********************************************************
  13. Functon:ShowMP4Message()
  14. Input: Diplay message type:1:MP4 initializing message...
  15.                           2:MP4 A/V Unsupport message...
  16.                           3:Mp4 format unsupport message...
  17. Output: viod...
  18. Description: It move from fs_nav_other
  19. Creat time:2004-11-6 10:46 linrc creat...                          
  20. ************************************************************/
  21. void ShowMP4Message(UINT8 message)
  22. {
  23.     switch(message)
  24.     {
  25.         case MP4_INI:
  26.             #ifdef SHOW_MP4_INIT_STR    //wangwei-2004/4/28
  27.             {
  28.     PrintOsdMsg(STR_OS_MP4_INIT, REGION1, 0, 0);  //mode 0: clear pre string
  29.     }
  30.             #else
  31.     {
  32.     psprintf(RegionValStr[REGION1], "INITIALIZING...");
  33.     PrintOsdMsg(STR_OS_SPACE, REGION1, 0, 1);
  34.     }
  35.     #endif
  36.     break;
  37.     
  38.     case UNSUPPORT_MESSAGE:
  39.         if( FILE_UNSUPPORT_AUDIO() )
  40.             {                         
  41. osdshow( REGION1, "UNSUPPORT AUDIO" );
  42.                 timeout_osd[ REGION1 ] = 1 * OSD_TIMEOUT;
  43.             }
  44.             else if( FILE_UNSUPPORT_VIDEO() )
  45.             {
  46. osdshow( REGION1, "UNSUPPORT VIDEO" );                
  47.                 timeout_osd[ REGION1 ] = 1 * OSD_TIMEOUT;
  48.             }
  49.             else
  50.             {
  51.                 PrintOsdMsg(STR_OS_SPACE, REGION1, 1, 0);  //fengjl edit 2004-05-01 17:24
  52.             }
  53.             break;
  54.             
  55.         case UNSUPPORT_FORMAT:
  56.              if ( FILE_UNSUPPORT_AUDIO() && FILE_UNSUPPORT_VIDEO() )
  57.                 osdshow( REGION1, "UNSUPPORT FORMAT" );
  58.              else
  59.                 osdshow( REGION1, "FILE ERROR" );                     
  60.              timeout_osd[ REGION1 ] = 2 * OSD_TIMEOUT;   // 2004/09/29 yltseng 
  61.              break;  
  62.              
  63.         default : break;            
  64.     }
  65. }
  66. #endif  //end SUPPORT_MP4
  67. /***************************************************************
  68. Function:DrawID3_GUI()
  69. Input: void
  70. Output: void
  71. Description: It move from fs_nav_mp3.c,in order to Draw ID3 GUI
  72.              some content...
  73. creat time: 2004-11-6 11:29 linrc creat...             
  74. ***************************************************************/
  75. #if defined(SUPPORT_ID3)||defined(SUPPORT_OSDID3)
  76. extern BYTE GetCurrentFileType();
  77. extern void FSGUI_FillFrameBuf();
  78. extern void osd_ClearOneRegion();
  79. extern void OSD_ShowString();
  80. extern void FSGUI_ShowString(); 
  81. extern ID3_TAG *pId3;
  82. extern LYR *lyr;// = (LYR *)ID3_MEM_START;
  83. #ifdef SUPPORT_OSDID3//liweihua and zhaoyanhua add 2004-1-9 18:12
  84. void show_id3(void)
  85. {
  86.     if(full_scrn& SOUND)
  87.         return;
  88.     
  89.     osd_ClearOneRegion(REGION3,0);
  90.     if(lyr->id3_exist)
  91.     {
  92. #ifdef SUPPORT_CHINESE_FONT
  93.     #if defined( USE_BIG5_FONT ) || defined( USE_BIG5_COMMON_FONT )
  94. OSD_ShowString(5, 20, "簈Ρ: ", 2,3);
  95. OSD_ShowString(5, 50, "簈も: ", 2,3);
  96.     #elif defined(USE_GB2312_FONT)
  97.     OSD_ShowString(5, 20,  "歌曲:", 2,3);
  98.     OSD_ShowString(5, 50,  "演唱:", 2,3);
  99.     #endif 
  100.     OSD_ShowString(48, 20,  lyr->song, 2,3);
  101.     OSD_ShowString(48, 50,  lyr->artist, 2,3);
  102. #else
  103.     OSD_ShowString(5, 20,  "SONG:", 2,3);
  104.     OSD_ShowString(5, 50,  "ARTIST:", 2,3);
  105.     OSD_ShowString(54, 20,  lyr->song, 2,3);
  106.     OSD_ShowString(68, 50,  lyr->artist, 2,3);
  107. #endif
  108.     }
  109. #ifdef  SUPPORT_OSDID3      
  110.     else//ID3 not exit , toggle off region3
  111.     {
  112.         printf("$$$$$$$$$$$Enter region3 toggle $$$$$$$$$$$n");
  113.         osd_tog_region(REGION3, OSD_OFF);
  114.     }
  115. #endif//SUPPORT_OSDID3
  116. }
  117. #endif
  118. void DrawID3_GUI(void)
  119. {
  120.     #if !defined(SUPPORT_OSDID3)&&!defined(NO_LIRIC_ID3) //2004-5-5 02:33張宇P
  121. FSGUI_FillFrameBuf(36, 8, 316, 50, BK_GROUNDY, BK_GROUNDCRCB);
  122.     #endif
  123.     
  124.     //#ifdef SUPPORT_MIX_MP3_CDDA   //linrc change "SUPPORT_MIX_MP3_CDDA" to "SUPPORT_MIX_DATA_CDDA_DISC"
  125.     #ifdef SUPPORT_MIX_DATA_CDDA_DISC //because we not only support this type mix mode disc 2004-12-15 15:53
  126. if (GetCurrentFileType() != CDDA)
  127.     #endif 
  128. {
  129.         #ifdef NO_LIRIC_ID3  //2004-5-5 12:44張宇P
  130.     FSGUI_FillFrameBuf(36, 240,320,40, BK_GROUNDY, BK_GROUNDCRCB);
  131.         #endif
  132.         
  133.         #ifdef SUPPORT_OSDID3//liweihua add 20040107
  134.         show_id3();
  135.         #elif defined(SUPPORT_ID3)
  136. if (lyr->id3_exist)
  137. {
  138.             #ifdef SUPPORT_CHINESE_FONT
  139.             
  140.             #if defined( USE_BIG5_FONT ) || defined( USE_BIG5_COMMON_FONT )
  141. FSGUI_ShowString(36, 8, "簈Ρ : ", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  142. FSGUI_ShowString(36, 24, "簈も : ", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  143.             #else // GB font//#ifdef USE_BIG5_FONT
  144. FSGUI_ShowString(36, 8, "歌曲 : ", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  145. FSGUI_ShowString(36, 24, "歌手 : ", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  146.             #endif//#ifdef USE_BIG5_FONT
  147.             
  148. FSGUI_ShowString(36 + 56, 8, lyr->song, FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  149. FSGUI_ShowString(36 + 56, 24, lyr->artist, FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  150.            
  151.             #else//#ifdef SUPPORT_CHINESE_FONT
  152.             
  153.             #ifdef NO_LIRIC_ID3   //2004-4-22 03:42张宇P
  154.             //FSGUI_FillFrameBuf(96, 244, 250, 50, BK_GROUNDY, BK_GROUNDCRCB);
  155.             FSGUI_ShowString(36, 240, "SONG: ", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb); 
  156. FSGUI_ShowString(36 + 64, 240, lyr->song, FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb); 
  157. FSGUI_ShowString(36, 260, "ARTIST: ", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb); 
  158.             FSGUI_ShowString(36 + 64, 260, lyr->artist, FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  159.             #else
  160. FSGUI_ShowString(36, 8+10, "SONG: ", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  161. FSGUI_ShowString(36 + 64, 8+10, lyr->song, FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  162. FSGUI_ShowString(36, 24+10, "ARTIST: ", FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  163. FSGUI_ShowString(36 + 64, 24+10, lyr->artist, FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
  164.             #endif                          
  165.             
  166.             #endif//#ifdef SUPPORT_CHINESE_FONT
  167. }
  168.         #endif//#ifdef SUPPORT_OSDID3//liweihua add 20040107
  169. }
  170. }
  171. #endif  //end defined(SUPPORT_ID3)||defined(SUPPORT_OSDID3)