summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-19 16:55:32 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-12-19 16:55:32 +0000
commit44d4752274c6b19492c0556207a8f8a1014d953d (patch)
tree9be0d7b592644790ff386592dbf9f3cf8c3f8233 /mplayer.c
parent4854fe36aed765bcabaed844575cb7cbbd21c08c (diff)
downloadmpv-44d4752274c6b19492c0556207a8f8a1014d953d.tar.bz2
mpv-44d4752274c6b19492c0556207a8f8a1014d953d.tar.xz
better dvd support
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3619 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c32
1 files changed, 26 insertions, 6 deletions
diff --git a/mplayer.c b/mplayer.c
index 68d049b692..f91c5f2055 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -188,7 +188,7 @@ int allow_dshow=0;
// streaming:
int audio_id=-1;
int video_id=-1;
-static int dvdsub_id=-1;
+int dvdsub_id=-1;
static int vcd_track=0;
// cache2:
@@ -628,7 +628,7 @@ if(!parse_codec_cfg(get_path("codecs.conf"))){
printf("Using %s timing\n",softsleep?"software":"usleep()");
#ifdef USE_TERMCAP
- load_termcap(NULL); // load key-codes
+ if ( !use_gui ) load_termcap(NULL); // load key-codes
#endif
// ========== Init keyboard FIFO (connection to libvo) ============
@@ -657,6 +657,17 @@ play_next_file:
#ifdef HAVE_NEW_GUI
if ( use_gui ) {
+
+#ifdef USE_DVDREAD
+ if ( mplShMem->DVDChanged )
+ {
+ mplShMem->DVDChanged=0;
+ mplShMem->Playing=1;
+ filename="/dev/dvd";
+ goto play_dvd;
+ }
+#endif
+
if(filename && !mplShMem->FilenameChanged) strcpy( mplShMem->Filename,filename );
// mplShMem->Playing= (gui_no_filename) ? 0 : 1;
while(mplShMem->Playing!=1){
@@ -664,6 +675,8 @@ play_next_file:
EventHandling();
}
+play_dvd:
+
#ifdef USE_SUB
if ( mplShMem->SubtitleChanged || !mplShMem->FilenameChanged )
{
@@ -2095,6 +2108,7 @@ if(rel_seek_secs || abs_seek_pos){
}
mplShMem->Volume=(float)mixer_getbothvolume();
#ifdef USE_DVDREAD
+ if ( mplShMem->DVDChanged ) goto goto_next_file;
if ( stream->type == STREAMTYPE_DVD )
{
dvd_priv_t * dvdp = stream->priv;
@@ -2164,6 +2178,7 @@ mp_msg(MSGT_GLOBAL,MSGL_V,"EOF code: %d \n",eof);
}
+goto_next_file: // don't jump here after ao/vo/getch initialization!
if(curr_filename+1<num_filenames || use_gui){
// partial uninit:
@@ -2172,16 +2187,21 @@ if(curr_filename+1<num_filenames || use_gui){
}
-goto_next_file: // don't jump here after ao/vo/getch initialization!
-
#ifdef HAVE_NEW_GUI
if(use_gui)
{
- mplStop();
+#ifdef USE_DVDREAD
+ if ( !mplShMem->DVDChanged )
+#endif
+ mplStop();
}
#endif
-if(use_gui || ++curr_filename<num_filenames){
+if(use_gui || ++curr_filename<num_filenames
+#if defined( HAVE_NEW_GUI ) && defined( USE_DVDREAD )
+ || mplShMem->DVDChanged
+#endif
+){
current_module="uninit_vcodec";
if(sh_video) uninit_video(sh_video);