changeset 18312:3b5b7e78b9af

Make EDL compilation unconditional
author uau
date Thu, 27 Apr 2006 12:40:29 +0000
parents 6727756ba981
children b73c04429a00
files cfg-common.h cfg-mencoder.h cfg-mplayer.h configure edl.c input/input.c input/input.h mencoder.c mplayer.c
diffstat 9 files changed, 2 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/cfg-common.h	Thu Apr 27 12:00:56 2006 +0000
+++ b/cfg-common.h	Thu Apr 27 12:40:29 2006 +0000
@@ -90,11 +90,8 @@
 	{"sb", &seek_to_byte, CONF_TYPE_POSITION, CONF_MIN, 0, 0, NULL},
 	{"ss", &seek_to_sec, CONF_TYPE_STRING, CONF_MIN, 0, 0, NULL},
 
-#ifdef USE_EDL
 	{"edl", &edl_filename,  CONF_TYPE_STRING, 0, 0, 0, NULL},
-#else
-	{"edl", "MPlayer was compiled without EDL support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-#endif
+
 	// AVI specific: force non-interleaved mode
 	{"ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1, NULL},
 	{"noni", &force_ni, CONF_TYPE_FLAG, 0, 1, 0, NULL},
@@ -361,10 +358,8 @@
 
 #include "libmpdemux/tv.h"
 
-#ifdef USE_EDL
 extern char* edl_filename;
 extern char* edl_output_filename;
-#endif
 
 #ifdef USE_TV
 m_option_t tvopts_conf[]={
--- a/cfg-mencoder.h	Thu Apr 27 12:00:56 2006 +0000
+++ b/cfg-mencoder.h	Thu Apr 27 12:40:29 2006 +0000
@@ -204,10 +204,8 @@
 
 	{"frameno-file", &frameno_filename, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL},
 
-#ifdef USE_EDL
         {"hr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 0, 1, NULL},
         {"nohr-edl-seek", &edl_seek_type, CONF_TYPE_FLAG, 0, 1, 0, NULL},
-#endif
 
 	// set output framerate - recommended for variable-FPS (ASF etc) files
 	// and for 29.97FPS progressive MPEG2 streams
--- a/cfg-mplayer.h	Thu Apr 27 12:00:56 2006 +0000
+++ b/cfg-mplayer.h	Thu Apr 27 12:40:29 2006 +0000
@@ -165,11 +165,7 @@
             CONF_TYPE_PRINT, 0, 0, 0, NULL},
 	{"noalsa", "-noalsa has been removed. Remove it from your config file.\n",
             CONF_TYPE_PRINT, 0, 0, 0, NULL},
-#ifdef USE_EDL
 	{"edlout", &edl_output_filename,  CONF_TYPE_STRING, 0, 0, 0, NULL}, 
-#else
-	{"edlout", "MPlayer was compiled without EDL support.\n", CONF_TYPE_PRINT, 0, 0, 0, NULL},
-#endif
 
 #ifdef HAVE_X11
 	{"display", &mDisplayName, CONF_TYPE_STRING, 0, 0, 0, NULL},
--- a/configure	Thu Apr 27 12:00:56 2006 +0000
+++ b/configure	Thu Apr 27 12:40:29 2006 +0000
@@ -197,7 +197,6 @@
   --disable-tv-v4l       disable Video4Linux TV Interface support [autodetect]
   --disable-tv-v4l2      disable Video4Linux2 TV Interface support [autodetect]
   --disable-tv-bsdbt848  disable BSD BT848 Interface support [autodetect]
-  --disable-edl          disable EDL (edit decision list) support [enable]
   --disable-rtc          disable RTC (/dev/rtc) on Linux [autodetect]
   --disable-network      disable network support (for: http/mms/rtp) [enable]
   --enable-winsock2      enable winsock2 usage [autodetect]
@@ -1548,7 +1547,6 @@
 _tv_v4l=auto
 _tv_v4l2=auto
 _tv_bsdbt848=auto
-_edl=yes
 _network=yes
 _winsock2=auto
 _smbsupport=auto
@@ -1771,8 +1769,6 @@
   --disable-alsa)	_alsa=no	;;
   --enable-tv)		_tv=yes		;;
   --disable-tv)		_tv=no		;;
-  --enable-edl)		_edl=yes	;;
-  --disable-edl)	_edl=no		;;
   --enable-tv-bsdbt848)	_tv_bsdbt848=yes	;;
   --disable-tv-bsdbt848)	_tv_bsdbt848=no	;;
   --enable-tv-v4l)	_tv_v4l=yes	;;
@@ -6550,16 +6546,6 @@
 fi
 echores "$_tv"
 
-echocheck "EDL support"
-if test "$_edl" = yes ; then
-  _def_edl='#define USE_EDL'
-  _inputmodules="edl $_inputmodules"
-else
-  _noinputmodules="edl $_noinputmodules"
-  _def_edl='#undef USE_EDL'
-fi
-echores "$_edl"
-
 echocheck "*BSD BrookTree 848 TV interface"
 if test "$_tv_bsdbt848" = auto ; then
  _tv_bsdbt848=no
@@ -7816,9 +7802,6 @@
 /* Enable TV Interface support */
 $_def_tv
 
-/* Enable EDL support */
-$_def_edl
-
 /* Enable Video 4 Linux TV interface support */
 $_def_tv_v4l
 
--- a/edl.c	Thu Apr 27 12:00:56 2006 +0000
+++ b/edl.c	Thu Apr 27 12:40:29 2006 +0000
@@ -8,8 +8,6 @@
 char *edl_filename; // file to extract EDL entries from (-edl)
 char *edl_output_filename; // file to put EDL entries in (-edlout)
 
-#ifdef USE_EDL
-
 /**
  *  Allocates a new EDL record and makes sure allocation was successful.
  *
@@ -131,5 +129,3 @@
 
     return edl_records;
 }
-
-#endif
--- a/input/input.c	Thu Apr 27 12:00:56 2006 +0000
+++ b/input/input.c	Thu Apr 27 12:40:29 2006 +0000
@@ -48,9 +48,7 @@
 
 static mp_cmd_t mp_cmds[] = {
   { MP_CMD_SEEK, "seek", 1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
-#ifdef USE_EDL
   { MP_CMD_EDL_MARK, "edl_mark", 0, { {-1,{0}} } },
-#endif
   { MP_CMD_AUDIO_DELAY, "audio_delay", 1, { {MP_CMD_ARG_FLOAT,{0}}, {MP_CMD_ARG_INT,{0}}, {-1,{0}} } },
   { MP_CMD_SPEED_INCR, "speed_incr", 1, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } },
   { MP_CMD_SPEED_MULT, "speed_mult", 1, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } },
@@ -356,9 +354,7 @@
   { { 'j', 0 }, "vobsub_lang" },
   { { 'F', 0 }, "forced_subs_only" },
   { { '#', 0 }, "switch_audio" },
-#ifdef USE_EDL
   { { 'i', 0 }, "edl_mark" },
-#endif
 #ifdef USE_TV
   { { 'h', 0 }, "tv_step_channel 1" },
   { { 'k', 0 }, "tv_step_channel -1" },
--- a/input/input.h	Thu Apr 27 12:00:56 2006 +0000
+++ b/input/input.h	Thu Apr 27 12:40:29 2006 +0000
@@ -37,9 +37,7 @@
 #define MP_CMD_GET_PERCENT_POS 35
 #define MP_CMD_SUB_STEP 36
 #define MP_CMD_TV_SET_CHANNEL 37
-#ifdef USE_EDL
 #define MP_CMD_EDL_MARK 38
-#endif
 #define MP_CMD_SUB_ALIGNMENT 39
 #define MP_CMD_TV_LAST_CHANNEL 40
 #define MP_CMD_OSD_SHOW_TEXT 41
--- a/mencoder.c	Thu Apr 27 12:00:56 2006 +0000
+++ b/mencoder.c	Thu Apr 27 12:40:29 2006 +0000
@@ -268,7 +268,6 @@
 /// Deletes audio or video as told by -delay to sync
 static void fixdelay(demux_stream_t *d_video, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy);
 
-#ifdef USE_EDL
 #include "edl.h"
 static edl_record_ptr edl_records = NULL; ///< EDL entries memory area
 static edl_record_ptr next_edl_record = NULL; ///< only for traversing edl_records
@@ -279,7 +278,6 @@
     \return 1 for success, 0 for failure, 2 for EOF.
 */
 static int edl_seek(edl_record_ptr next_edl_record, demuxer_t* demuxer, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy);
-#endif
 
 #include "cfg-mencoder.h"
 
@@ -1074,7 +1072,6 @@
 play_n_frames=play_n_frames_mf;
 if (curfile && end_at_type == END_AT_TIME) end_at += mux_v->timer;
 
-#ifdef USE_EDL
 if (edl_records) free_edl(edl_records);
 next_edl_record = edl_records = NULL;
 edl_muted = 0;
@@ -1082,7 +1079,6 @@
 if (edl_filename) {
     next_edl_record = edl_records = edl_parse_file();
 }
-#endif
 
 if (sh_audio && audio_delay != 0.) fixdelay(d_video, d_audio, mux_a, &frame_data, mux_v->codec==VCODEC_COPY);
 
@@ -1102,7 +1098,6 @@
       if(play_n_frames<0) break;
     }
 
-#ifdef USE_EDL
 goto_redo_edl:
     if (next_edl_record && sh_video && sh_video->pts >= next_edl_record->start_sec) {
         if (next_edl_record->action == EDL_SKIP && edl_seeking) {
@@ -1140,7 +1135,6 @@
             next_edl_record=next_edl_record->next;
         }
     }
-#endif
 
 
 if(sh_audio){
@@ -1655,7 +1649,6 @@
 	float timeleft = -1;
 	if (play_n_frames >= 0) timeleft = mux_v->timer + play_n_frames * (double)(mux_v->h.dwScale) / mux_v->h.dwRate;
 	if (end_at_type == END_AT_TIME && (timeleft > end_at || timeleft == -1)) timeleft = end_at;
-#ifdef USE_EDL
 	if (next_edl_record && demuxer && demuxer->video) { // everything is OK to be checked
 		float tmp = mux_v->timer + next_edl_record->start_sec - demuxer->video->pts;
 		if (timeleft == -1 || timeleft > tmp) {
@@ -1668,7 +1661,6 @@
 			}
 		}
 	}
-#endif
 	return timeleft;
 }
 
@@ -1743,12 +1735,10 @@
             decode_video(sh_video, frame_data->start, frame_data->in_size, !softskip, MP_NOPTS_VALUE);
         }
 
-#ifdef USE_EDL
         if (print_info) mp_msg(MSGT_MENCODER, MSGL_STATUS,
                "EDL SKIP: Start: %.2f  End: %.2f   Current: V: %.2f  A: %.2f     \r",
                next_edl_record->start_sec, next_edl_record->stop_sec,
                sh_video->pts, a_pts);
-#endif
     }
     if (interrupted) return 2;
     return 1;
@@ -1775,7 +1765,6 @@
     slowseek(a_pts - audio_delay, d_video, d_audio, mux_a, frame_data, framecopy, 0);
 }
 
-#ifdef USE_EDL
 static int edl_seek(edl_record_ptr next_edl_record, demuxer_t* demuxer, demux_stream_t *d_audio, muxer_stream_t* mux_a, s_frame_data * frame_data, int framecopy) {
     sh_video_t * sh_video = demuxer->video ? demuxer->video->sh : NULL;
 
@@ -1799,4 +1788,3 @@
 
     return slowseek(next_edl_record->stop_sec, demuxer->video, d_audio, mux_a, frame_data, framecopy, 1);
 }
-#endif
--- a/mplayer.c	Thu Apr 27 12:00:56 2006 +0000
+++ b/mplayer.c	Thu Apr 27 12:40:29 2006 +0000
@@ -71,9 +71,7 @@
 #include <dvdnav.h>
 #endif
 
-#ifdef USE_EDL
 #include "edl.h"
-#endif
 
 #include "spudec.h"
 #include "vobsub.h"
@@ -395,14 +393,12 @@
 static char* rtc_device;
 #endif
 
-#ifdef USE_EDL
 edl_record_ptr edl_records = NULL; ///< EDL entries memory area
 edl_record_ptr next_edl_record = NULL; ///< only for traversing edl_records
 short user_muted = 0; ///< Stores whether User wanted muted mode.
 short edl_muted  = 0; ///< Stores whether EDL is currently in muted mode.
 short edl_decision = 0; ///< 1 when an EDL operation has been made
 FILE* edl_fd = NULL; ///< fd to write to when in -edlout mode
-#endif
 
 static unsigned int inited_flags=0;
 #define INITED_VO 1
@@ -542,9 +538,7 @@
     play_tree_free(playtree, 1);
 
 
-#ifdef USE_EDL
   if(edl_records != NULL) free(edl_records); // free mem allocated for EDL
-#endif
   if(how) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_ExitingHow,how);
   mp_msg(MSGT_CPLAYER,MSGL_DBG2,"max framesize was %d bytes\n",max_framesize);
 
@@ -1488,10 +1482,8 @@
         return M_PROPERTY_NOT_IMPLEMENTED;
     }
 
-#ifdef USE_EDL
     if (edl_muted) return M_PROPERTY_DISABLED;
     user_muted = 0;
-#endif
 
     switch(action) {
    case M_PROPERTY_SET:
@@ -1522,28 +1514,22 @@
     
     switch(action) {
     case M_PROPERTY_SET:
-#ifdef USE_EDL
         if(edl_muted) return M_PROPERTY_DISABLED;
-#endif
         if(!arg) return 0;
         if((!!*(int*)arg) != mixer.muted)
             mixer_mute(&mixer);
         return 1;
     case M_PROPERTY_STEP_UP:
     case M_PROPERTY_STEP_DOWN:
-#ifdef USE_EDL
         if(edl_muted) return M_PROPERTY_DISABLED;
-#endif
         mixer_mute(&mixer);
         return 1;
     case M_PROPERTY_PRINT:
         if(!arg) return 0;
-#ifdef USE_EDL
         if(edl_muted) {
             *(char**)arg = strdup(MSGTR_EnabledEdl);
             return 1;
         }
-#endif
     default:
         return m_property_flag(prop,action,arg,&mixer.muted);
 
@@ -2869,7 +2855,6 @@
 
     if(filename) mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_Playing, filename);
 
-#ifdef USE_EDL
 if (edl_filename) {
     if (edl_records) free_edl(edl_records);
     next_edl_record = edl_records = edl_parse_file();
@@ -2882,7 +2867,6 @@
                edl_output_filename);
     }
 }
-#endif
 
 //==================== Open VOB-Sub ============================
 
@@ -4137,7 +4121,6 @@
 
 //================= EDL =========================================
 
-#ifdef USE_EDL
  if( next_edl_record ) { // Are we (still?) doing EDL?
   if ( !sh_video ) {
     mp_msg( MSGT_CPLAYER, MSGL_ERR, MSGTR_EdlNOsh_video );
@@ -4161,7 +4144,6 @@
    }
   }
  }
-#endif
 
 //================= Keyboard events, SEEKing ====================
 
@@ -4227,14 +4209,12 @@
         mp_msg(MSGT_GLOBAL,MSGL_INFO, "ANS_%s=%s\n",cmd->args[0].v.s,tmp);
         free(tmp);
     } break;
-#ifdef USE_EDL
     case MP_CMD_EDL_MARK:
       if( edl_fd ) {
 	float v = sh_video->pts;
 	fprintf( edl_fd, "%f %f %d\n", v-2, v, 0 );
       }
       break;
-#endif
     case MP_CMD_SWITCH_RATIO : {
       if (cmd->nargs == 0)
 	movie_aspect = (float) sh_video->disp_w / sh_video->disp_h;
@@ -4918,9 +4898,7 @@
       }
         // Set OSD:
       if(!loop_seek){
-#ifdef USE_EDL
 	if( !edl_decision )
-#endif
           set_osd_bar(0,"Position",0,100,demuxer_get_percent_pos(demuxer));
       }
 
@@ -4936,7 +4914,6 @@
         if(vo_spudec) spudec_reset(vo_spudec);
       }
   }
-#ifdef USE_EDL
 /*
  * We saw a seek, have to rewind the EDL operations stack
  * and find the next EDL action to take care of.
@@ -4959,7 +4936,7 @@
 
 }
 if ((user_muted | edl_muted) != mixer.muted) mixer_mute(&mixer);
-#endif
+
   rel_seek_secs=0;
   abs_seek_pos=0;
   frame_time_remaining=0;