Commit 7ccf7f7e authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

DVDnav: require 4.2.1

Ref #6649
parent 02b2b799
...@@ -1674,20 +1674,7 @@ PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread], [dvdread input module], [auto]) ...@@ -1674,20 +1674,7 @@ PKG_ENABLE_MODULES_VLC([DVDREAD], [], [dvdread], [dvdread input module], [auto])
dnl dnl
dnl libdvdnav plugin dnl libdvdnav plugin
dnl dnl
AC_ARG_ENABLE(dvdnav, PKG_ENABLE_MODULES_VLC([DVDNAV], [], [dvdnav >= 4.2.1], [DVD with navigation input module (dvdnav)], [auto])
[AS_HELP_STRING([--disable-dvdnav],
[disable DVD navigation with libdvdnav (default auto)])])
AS_IF([test "${enable_dvdnav}" != "no"], [
PKG_CHECK_MODULES(DVDNAV, dvdnav, [
VLC_ADD_PLUGIN([dvdnav])
AC_CHECK_LIB(dvdnav, dvdnav_get_video_resolution,
AC_DEFINE(HAVE_DVDNAV_GET_VIDEO_RESOLUTION, 1, [Define if you have dvdnav_get_video_resolution.]),
[], [${LIBS_dvdnav}])
AC_CHECK_LIB(dvdnav, dvdnav_describe_title_chapters,
AC_DEFINE(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS, 1, [Define if you have dvdnav_describe_title_chapters.]),
[], [${LIBS_dvdnav}])],
[AC_MSG_WARN([${DVDNAV_PKG_ERRORS}.])])
])
dnl dnl
dnl Blu-ray Disc Support with libbluray dnl Blu-ray Disc Support with libbluray
......
...@@ -793,7 +793,6 @@ static int Demux( demux_t *p_demux ) ...@@ -793,7 +793,6 @@ static int Demux( demux_t *p_demux )
tk->b_seen = false; tk->b_seen = false;
} }
#if defined(HAVE_DVDNAV_GET_VIDEO_RESOLUTION)
uint32_t i_width, i_height; uint32_t i_width, i_height;
if( dvdnav_get_video_resolution( p_sys->dvdnav, if( dvdnav_get_video_resolution( p_sys->dvdnav,
&i_width, &i_height ) ) &i_width, &i_height ) )
...@@ -813,7 +812,6 @@ static int Demux( demux_t *p_demux ) ...@@ -813,7 +812,6 @@ static int Demux( demux_t *p_demux )
p_sys->sar.i_den = 0; p_sys->sar.i_den = 0;
break; break;
} }
#endif
if( dvdnav_current_title_info( p_sys->dvdnav, &i_title, if( dvdnav_current_title_info( p_sys->dvdnav, &i_title,
&i_part ) == DVDNAV_STATUS_OK ) &i_part ) == DVDNAV_STATUS_OK )
...@@ -1045,7 +1043,6 @@ static void DemuxTitles( demux_t *p_demux ) ...@@ -1045,7 +1043,6 @@ static void DemuxTitles( demux_t *p_demux )
uint64_t i_title_length; uint64_t i_title_length;
uint64_t *p_chapters_time; uint64_t *p_chapters_time;
#if defined(HAVE_DVDNAV_DESCRIBE_TITLE_CHAPTERS)
i_chapters = dvdnav_describe_title_chapters( p_sys->dvdnav, i, i_chapters = dvdnav_describe_title_chapters( p_sys->dvdnav, i,
&p_chapters_time, &p_chapters_time,
&i_title_length ); &i_title_length );
...@@ -1054,12 +1051,6 @@ static void DemuxTitles( demux_t *p_demux ) ...@@ -1054,12 +1051,6 @@ static void DemuxTitles( demux_t *p_demux )
i_title_length = 0; i_title_length = 0;
p_chapters_time = NULL; p_chapters_time = NULL;
} }
#else
if( dvdnav_get_number_of_parts( p_sys->dvdnav, i, &i_chapters ) != DVDNAV_STATUS_OK )
i_chapters = 0;
i_title_length = 0;
p_chapters_time = NULL;
#endif
t = vlc_input_title_New(); t = vlc_input_title_New();
t->i_length = i_title_length * 1000 / 90; t->i_length = i_title_length * 1000 / 90;
for( int j = 0; j < __MAX( i_chapters, 1 ); j++ ) for( int j = 0; j < __MAX( i_chapters, 1 ); j++ )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment