Mercurial > mplayer.hg
diff libmpdemux/open.c @ 5472:4bd766a5632b
dvdnav functions moved out to dvdnav_steram.c
author | arpi |
---|---|
date | Wed, 03 Apr 2002 17:55:31 +0000 |
parents | 9451df83c04b |
children | 194bca17117b |
line wrap: on
line diff
--- a/libmpdemux/open.c Wed Apr 03 17:50:48 2002 +0000 +++ b/libmpdemux/open.c Wed Apr 03 17:55:31 2002 +0000 @@ -31,10 +31,10 @@ int dvd_angle=1; char* dvd_device=NULL; char* cdrom_device=NULL; -int dvd_nav=0; +int dvd_nav=0; /* use libdvdnav? */ #ifdef USE_DVDNAV -#include <dvdnav.h> +#include "dvdnav_stream.h" #endif #ifdef USE_DVDREAD @@ -117,20 +117,22 @@ //============ Open DVD title ============== #ifdef USE_DVDNAV if(dvd_nav){ - dvdnav_t *dvdnav; + dvdnav_priv_t *dvdnav_priv; int event,len,tmplen=0; - if(!filename) filename=DEFAULT_DVD_DEVICE; - if(dvdnav_open(&dvdnav,filename)!=DVDNAV_STATUS_OK) { - mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename); - return NULL; - } stream=new_stream(-1,STREAMTYPE_DVDNAV); if (!stream) { mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_Exit_error); return NULL; } - stream->priv=(void*)dvdnav; + + if(!filename) filename=DEFAULT_DVD_DEVICE; + if (!(dvdnav_priv=new_dvdnav_stream(filename))) { + mp_msg(MSGT_OPEN,MSGL_ERR,MSGTR_CantOpenDVD,filename); + return NULL; + } + + stream->priv=(void*)dvdnav_priv; return stream; } #endif