1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-26 17:12:36 +00:00

Make EDL compilation unconditional

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18313 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
uau 2006-04-27 12:40:29 +00:00
parent 9706c6b616
commit 8f30963c37
9 changed files with 2 additions and 75 deletions

View File

@ -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 @@ extern off_t ts_probe;
#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[]={

View File

@ -204,10 +204,8 @@ m_option_t mencoder_opts[]={
{"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

View File

@ -165,11 +165,7 @@ m_option_t mplayer_opts[]={
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},

17
configure vendored
View File

@ -197,7 +197,6 @@ Optional features:
--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=yes
_tv_v4l=auto
_tv_v4l2=auto
_tv_bsdbt848=auto
_edl=yes
_network=yes
_winsock2=auto
_smbsupport=auto
@ -1771,8 +1769,6 @@ for ac_option do
--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 @@ else
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 @@ $_def_nas
/* Enable TV Interface support */
$_def_tv
/* Enable EDL support */
$_def_edl
/* Enable Video 4 Linux TV interface support */
$_def_tv_v4l

4
edl.c
View File

@ -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 @@ edl_record_ptr edl_parse_file(void)
return edl_records;
}
#endif

View File

@ -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 @@ static mp_cmd_bind_t def_cmd_binds[] = {
{ { '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" },

View File

@ -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

View File

@ -268,7 +268,6 @@ static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_au
/// 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 @@ static short edl_seek_type; ///< When non-zero, frames are discarded instead of
\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 @@ if(file_format == DEMUXER_TYPE_TV)
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 @@ edl_seeking = 1;
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 @@ while(!at_eof){
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 @@ goto_redo_edl:
next_edl_record=next_edl_record->next;
}
}
#endif
if(sh_audio){
@ -1655,7 +1649,6 @@ static float stop_time(demuxer_t* demuxer, muxer_stream_t* mux_v) {
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 @@ static float stop_time(demuxer_t* demuxer, muxer_stream_t* mux_v) {
}
}
}
#endif
return timeleft;
}
@ -1743,12 +1735,10 @@ static int slowseek(float end_pts, demux_stream_t *d_video, demux_stream_t *d_au
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 @@ static void fixdelay(demux_stream_t *d_video, demux_stream_t *d_audio, muxer_str
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 @@ static int edl_seek(edl_record_ptr next_edl_record, demuxer_t* demuxer, demux_st
return slowseek(next_edl_record->stop_sec, demuxer->video, d_audio, mux_a, frame_data, framecopy, 1);
}
#endif

View File

@ -71,9 +71,7 @@ extern int mp_input_win32_slave_cmd_func(int fd,char* dest,int size);
#include <dvdnav.h>
#endif
#ifdef USE_EDL
#include "edl.h"
#endif
#include "spudec.h"
#include "vobsub.h"
@ -395,14 +393,12 @@ static int nortc;
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 @@ static void exit_player_with_rc(char* how, int rc){
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 @@ static int mp_property_volume(m_option_t* prop,int action,void* arg) {
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 @@ static int mp_property_mute(m_option_t* prop,int action,void* arg) {
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 @@ while (player_idle_mode && !filename) {
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 @@ if (edl_output_filename) {
edl_output_filename);
}
}
#endif
//==================== Open VOB-Sub ============================
@ -4137,7 +4121,6 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
//================= 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 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
}
}
}
#endif
//================= Keyboard events, SEEKing ====================
@ -4227,14 +4209,12 @@ if (stream->type==STREAMTYPE_DVDNAV && dvd_nav_still)
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 @@ if(rel_seek_secs || abs_seek_pos){
}
// 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(rel_seek_secs || abs_seek_pos){
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 @@ while (next_edl_record)
}
if ((user_muted | edl_muted) != mixer.muted) mixer_mute(&mixer);
#endif
rel_seek_secs=0;
abs_seek_pos=0;
frame_time_remaining=0;