Mercurial > mplayer.hg
changeset 25031:5e1e61012a05
report why the dvd couldn't be opened. Patch by Jan Knutar jknutar+nic+fi
author | nicodvb |
---|---|
date | Fri, 16 Nov 2007 21:32:09 +0000 |
parents | a76ba4c634a7 |
children | aad0f4a495ab |
files | help/help_mp-en.h stream/stream_dvd.c stream/stream_dvdnav.c |
diffstat | 3 files changed, 8 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/help/help_mp-en.h Fri Nov 16 19:09:41 2007 +0000 +++ b/help/help_mp-en.h Fri Nov 16 21:32:09 2007 +0000 @@ -537,7 +537,7 @@ #define MSGTR_SMBFileNotFound "Could not open from LAN: '%s'\n" #define MSGTR_SMBNotCompiled "MPlayer was not compiled with SMB reading support.\n" -#define MSGTR_CantOpenDVD "Couldn't open DVD device: %s\n" +#define MSGTR_CantOpenDVD "Couldn't open DVD device: %s (%s)\n" // stream_dvd.c #define MSGTR_DVDspeedCantOpen "Couldn't open DVD device for writing, changing DVD speed needs write access.\n"
--- a/stream/stream_dvd.c Fri Nov 16 19:09:41 2007 +0000 +++ b/stream/stream_dvd.c Fri Nov 16 21:32:09 2007 +0000 @@ -24,6 +24,8 @@ #include <sys/ioctl.h> #endif +#include <errno.h> + #define FIRST_AC3_AID 128 #define FIRST_DTS_AID 136 #define FIRST_MPG_AID 0 @@ -781,12 +783,12 @@ snprintf(temp_device, len, "/dev/rdisk%d", i); dvd = DVDOpen(temp_device); if(!dvd) { - mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device); + mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device, strerror(errno)); } else { #if DVDREAD_VERSION <= LIBDVDREAD_VERSION(0,9,4) dvd_file_t *dvdfile = DVDOpenFile(dvd,dvd_title,DVD_READ_INFO_FILE); if(!dvdfile) { - mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device); + mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,temp_device, strerror(errno)); DVDClose(dvd); continue; } @@ -806,7 +808,7 @@ { dvd = DVDOpen(dvd_device); if(!dvd) { - mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,dvd_device); + mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,dvd_device, strerror(errno)); m_struct_free(&stream_opts,opts); return STREAM_UNSUPPORTED; }
--- a/stream/stream_dvdnav.c Fri Nov 16 19:09:41 2007 +0000 +++ b/stream/stream_dvdnav.c Fri Nov 16 21:32:09 2007 +0000 @@ -4,6 +4,7 @@ #include <stdio.h> #include <unistd.h> #include <string.h> +#include <errno.h> #include "mp_msg.h" #include "osdep/timer.h" #include "input/input.h" @@ -356,7 +357,7 @@ else if(dvd_device) filename= dvd_device; else filename = DEFAULT_DVD_DEVICE; if(!(priv=new_dvdnav_stream(filename))) { - mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename); + mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename, strerror(errno)); return STREAM_UNSUPPORTED; }