From cc7f8ee6204ffbeac195623a6be59ab9bcc32622 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 22 Sep 2013 03:04:57 +0200 Subject: mplayer: attempt to make playback resume work with DVD/BD The problem with DVD/BD and playback resume is that most often, the filename is just "dvd://", while the actual path to the DVD disk image is given with --dvd-device. But playback resume works on the filename only. Add a pretty bad hack that includes the path to the disk image if the filename starts with dvd://, and the same for BD respectively. (It's a bad hack, but I want to go to bed, so here we go. I might revert or improve it later, depending on user feedback.) We have to cleanup the global variable mess around the dvd_device. Ideally, this should go into MPOpts, but it isn't yet. Make the code paths in mplayer.c take MPOpts anyway. --- stream/stream.h | 3 +++ stream/stream_cdda.c | 2 -- stream/stream_dvd_common.h | 2 -- stream/stream_vcd.c | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) (limited to 'stream') diff --git a/stream/stream.h b/stream/stream.h index 525265b52c..49d9abcf67 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -257,8 +257,11 @@ int stream_check_interrupt(int time); bool stream_manages_timeline(stream_t *s); +/* stream/stream_dvd.c */ extern int dvd_title; extern int dvd_angle; +extern int dvd_speed; +extern char *dvd_device, *cdrom_device; extern int bluray_angle; extern char *bluray_device; diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index 4c114ca1ac..9c7504a83d 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -50,8 +50,6 @@ #include "mpvcore/mp_msg.h" -extern char *cdrom_device; - typedef struct { cdrom_drive_t *cd; cdrom_paranoia_t *cdp; diff --git a/stream/stream_dvd_common.h b/stream/stream_dvd_common.h index 8044c6251b..0a6c6789e1 100644 --- a/stream/stream_dvd_common.h +++ b/stream/stream_dvd_common.h @@ -23,11 +23,9 @@ #include #include -extern char *dvd_device; extern const char * const dvd_audio_stream_channels[6]; extern const char * const dvd_audio_stream_types[8]; -extern int dvd_speed; void dvd_set_speed(char *device, unsigned speed); int mp_dvdtimetomsec(dvd_time_t *dt); diff --git a/stream/stream_vcd.c b/stream/stream_vcd.c index dacf2763f8..4c6dbcc074 100644 --- a/stream/stream_vcd.c +++ b/stream/stream_vcd.c @@ -56,8 +56,6 @@ #define vcd_close(priv) (close(((mp_vcd_priv_t*)priv)->fd)) #endif -extern char *cdrom_device; - static int fill_buffer(stream_t *s, char* buffer, int max_len){ if(s->pos > s->end_pos) /// don't past end of current track return 0; -- cgit v1.2.3