diff mplayer.c @ 27341:e7c989f7a7c9

Start unifying names of internal preprocessor directives. Replace all USE_ prefixes by CONFIG_ prefixes to indicate options which are configurable.
author diego
date Wed, 30 Jul 2008 12:01:30 +0000
parents 2c0abab6b9b7
children 5fe6a8adf569
line wrap: on
line diff
--- a/mplayer.c	Wed Jul 30 11:48:01 2008 +0000
+++ b/mplayer.c	Wed Jul 30 12:01:30 2008 +0000
@@ -105,10 +105,10 @@
 #endif /* __linux__ */
 #endif /* HAVE_RTC */
 
-#ifdef USE_TV
+#ifdef CONFIG_TV
 #include "stream/tv.h"
 #endif
-#ifdef USE_RADIO
+#ifdef CONFIG_RADIO
 #include "stream/stream_radio.h"
 #endif
 
@@ -163,11 +163,11 @@
 #include "libmpdemux/demuxer.h"
 #include "libmpdemux/stheader.h"
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 #include "stream/stream_dvd.h"
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 #include "stream/stream_dvdnav.h"
 #endif
 
@@ -278,7 +278,7 @@
 
 // cache2:
        int stream_cache_size=-1;
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
 extern int cache_fill_status;
 
 float stream_cache_min_percent=20.0;
@@ -325,7 +325,7 @@
 int   subcc_enabled=0;
 int suboverlap_enabled = 1;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 #include "libass/ass.h"
 #include "libass/ass_mp.h"
 #endif
@@ -568,7 +568,7 @@
 /// step size of mixer changes
 int volstep = 3;
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 static void mp_dvdnav_context_free(MPContext *ctx){
     if (ctx->nav_smpi) free_mp_image(ctx->nav_smpi);
     ctx->nav_smpi = NULL;
@@ -628,7 +628,7 @@
     current_module="uninit_vo";
     mpctx->video_out->uninit();
     mpctx->video_out=NULL;
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
     mp_dvdnav_context_free(mpctx);
 #endif
   }
@@ -708,7 +708,7 @@
 #endif
   free_osd_list();
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   ass_library_done(ass_library);
 #endif
 
@@ -1016,7 +1016,7 @@
 void add_subtitles(char *filename, float fps, int noerr)
 {
     sub_data *subd;
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     ass_track_t *asst = 0;
 #endif
 
@@ -1025,9 +1025,9 @@
     }
 
     subd = sub_read_file(filename, fps);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     if (ass_enabled)
-#ifdef USE_ICONV
+#ifdef CONFIG_ICONV
         asst = ass_read_file(ass_library, filename, sub_cp);
 #else
         asst = ass_read_file(ass_library, filename, 0);
@@ -1042,7 +1042,7 @@
         mp_msg(MSGT_CPLAYER, noerr ? MSGL_WARN : MSGL_ERR, MSGTR_CantLoadSub,
 		filename_recode(filename));
     
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
     if (!asst && !subd) return;
     mpctx->set_of_ass_tracks[mpctx->set_of_sub_size] = asst;
 #else
@@ -1091,7 +1091,7 @@
       vo_spudec=spudec_new_scaled(palette, width, height);
   }
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
   if (vo_spudec==NULL && mpctx->stream->type==STREAMTYPE_DVD) {
     current_module="spudec_init_dvdread";
     vo_spudec=spudec_new_scaled(((dvd_priv_t *)(mpctx->stream->priv))->cur_pgc->palette,
@@ -1099,7 +1099,7 @@
   }
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
   if (vo_spudec==NULL && mpctx->stream->type==STREAMTYPE_DVDNAV) {
     unsigned int *palette = mp_dvdnav_get_spu_clut(mpctx->stream);
     current_module="spudec_init_dvdnav";
@@ -1262,7 +1262,7 @@
   if (sh_video) 
     saddf(line, &pos, width, "%d %d ", drop_frame_cnt, output_quality);
 
-#ifdef USE_STREAM_CACHE
+#ifdef CONFIG_STREAM_CACHE
   // cache stats
   if (stream_cache_size > 0)
     saddf(line, &pos, width, "%d%% ", cache_fill_status);
@@ -1812,7 +1812,7 @@
     return time_frame;
 }
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 #ifndef FF_B_TYPE
 #define FF_B_TYPE 3
 #endif
@@ -1939,7 +1939,7 @@
     if (decoded_frame && mpctx->nav_smpi != decoded_frame)
         mpctx->nav_smpi = mp_dvdnav_copy_mpi(mpctx->nav_smpi,decoded_frame);
 }
-#endif /* USE_DVDNAV */
+#endif /* CONFIG_DVDNAV */
 
 static void adjust_sync_and_print_status(int between_frames, float timing_error)
 {
@@ -2175,7 +2175,7 @@
     sh_video->vfilter=(void*)vf_menu;
 #endif
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   if(ass_enabled) {
     int i;
     int insert = 1;
@@ -2200,7 +2200,7 @@
 
   sh_video->vfilter=(void*)append_filters(sh_video->vfilter);
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   if (ass_enabled)
     ((vf_instance_t *)sh_video->vfilter)->control(sh_video->vfilter, VFCTRL_INIT_EOSD, ass_library);
 #endif
@@ -2261,7 +2261,7 @@
 	frame_time = sh_video->next_frame_time;
 	in_size = video_read_frame(sh_video, &sh_video->next_frame_time,
 				   &start, force_fps);
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	/// wait, still frame or EOF
 	if (mpctx->stream->type == STREAMTYPE_DVDNAV && in_size < 0) {
 	    if (mp_dvdnav_is_eof(mpctx->stream)) return -1;
@@ -2284,14 +2284,14 @@
 	update_teletext(sh_video, mpctx->demuxer, 0);
 	update_osd_msg();
 	current_module = "decode_video";
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	decoded_frame = mp_dvdnav_restore_smpi(&in_size,&start,decoded_frame);
 	/// still frame has been reached, no need to decode
 	if (in_size > 0 && !decoded_frame)
 #endif
 	decoded_frame = decode_video(sh_video, start, in_size, drop_frame,
 				     sh_video->pts);
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 	/// save back last still frame for future display
 	mp_dvdnav_save_smpi(in_size,start,decoded_frame);
 #endif
@@ -2570,11 +2570,11 @@
   m_config_preparse_command_line(mconfig,argc,argv);
 
   print_version();
-#if defined(WIN32) && defined(USE_WIN32DLL)
+#if defined(WIN32) && defined(CONFIG_WIN32DLL)
   set_path_env();
-#endif /*WIN32 && USE_WIN32DLL*/
-
-#ifdef USE_TV
+#endif /*WIN32 && CONFIG_WIN32DLL*/
+
+#ifdef CONFIG_TV
   stream_tv_defaults.immediate = 1;
 #endif
 
@@ -2812,7 +2812,7 @@
 
   vo_init_osd();
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
   ass_library = ass_init();
 #endif
 
@@ -2850,7 +2850,7 @@
       mp_msg(MSGT_CPLAYER, MSGL_V, "Using %s timing\n",
 	     softsleep?"software":timer_name);
 
-#ifdef USE_TERMCAP
+#ifdef CONFIG_TERMCAP
   if ( !use_gui ) load_termcap(NULL); // load key-codes
 #endif
 
@@ -3195,7 +3195,7 @@
   exit_player_with_rc(MSGTR_Exit_eof, 0);
 }
 
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
 if(mpctx->stream->type==STREAMTYPE_DVD){
   current_module="dvd lang->id";
   if(audio_id==-1) audio_id=dvd_aid_from_lang(mpctx->stream,audio_lang);
@@ -3208,7 +3208,7 @@
 }
 #endif
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 if(mpctx->stream->type==STREAMTYPE_DVDNAV){
   current_module="dvdnav lang->id";
   if(audio_id==-1) audio_id=mp_dvdnav_aid_from_lang(mpctx->stream,audio_lang);
@@ -3317,7 +3317,7 @@
 if (mpctx->global_sub_size <= mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id)
   mpctx->global_sub_size = mpctx->global_sub_indices[SUB_SOURCE_DEMUX] + dvdsub_id + 1;
 
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 if (ass_enabled && ass_library) {
   for (i = 0; i < mpctx->demuxer->num_attachments; ++i) {
     demux_attachment_t* att = mpctx->demuxer->attachments + i;
@@ -3663,7 +3663,7 @@
     end_at.type = END_AT_NONE;
 }
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
 mp_dvdnav_context_free(mpctx);
 if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
     mp_dvdnav_read_wait(mpctx->stream, 0, 1);
@@ -3810,7 +3810,7 @@
 
 } // end if(mpctx->sh_video)
 
-#ifdef USE_DVDNAV
+#ifdef CONFIG_DVDNAV
  if (mpctx->stream->type == STREAMTYPE_DVDNAV) {
    nav_highlight_t hl;
    mp_dvdnav_get_highlight (mpctx->stream, &hl);
@@ -3904,7 +3904,7 @@
 	if(guiIntfStruct.Playing==0) break; // STOP
 	if(guiIntfStruct.Playing==2) mpctx->osd_function=OSD_PAUSE;
         if ( guiIntfStruct.DiskChanged || guiIntfStruct.NewPlay ) goto goto_next_file;
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
         if ( mpctx->stream->type == STREAMTYPE_DVD )
 	 {
 	  dvd_priv_t * dvdp = mpctx->stream->priv;
@@ -3966,7 +3966,7 @@
     current_module="sub_free";
     for(i = 0; i < mpctx->set_of_sub_size; ++i) {
         sub_free(mpctx->set_of_subtitles[i]);
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
         if(mpctx->set_of_ass_tracks[i])
             ass_free_track( mpctx->set_of_ass_tracks[i] );
 #endif
@@ -3975,7 +3975,7 @@
 }
 vo_sub_last = vo_sub=NULL;
 subdata=NULL;
-#ifdef USE_ASS
+#ifdef CONFIG_ASS
 ass_track = NULL;
 if(ass_library)
     ass_clear_fonts(ass_library);
@@ -4022,7 +4022,7 @@
 
 #ifdef HAVE_NEW_GUI
 if(use_gui && !mpctx->playtree_iter) {
-#ifdef USE_DVDREAD
+#ifdef CONFIG_DVDREAD
     if(!guiIntfStruct.DiskChanged)
 #endif
         mplEnd();