From 1f4109d85e5a788817321f44c45fa763bce5ffed Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 19 Dec 2009 15:18:22 +0000 Subject: Experimental support for external libass. So far probably only works with the libass from Ubuntu 9.10 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30066 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Changelog | 2 ++ Makefile | 7 ++++--- configure | 10 +++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Changelog b/Changelog index f124a2801d..caaaa87e3c 100644 --- a/Changelog +++ b/Changelog @@ -35,6 +35,8 @@ MPlayer (1.0) Configure with --enable-protocol="file_protocol pipe_protocol http_protocol rtmp_protocol tcp_protocol udp_protocol" and use e.g. ffmpeg://http://example.com/test + * experimental support for external libass, configure with + --disable-ass-internal MEncoder: * add -tsprog for demuxer lavf diff --git a/Makefile b/Makefile index b09576e13a..0ff5d43ece 100644 --- a/Makefile +++ b/Makefile @@ -116,16 +116,17 @@ SRCS_COMMON-$(LIBA52_INTERNAL) += liba52/crc.c \ liba52/imdct.c \ liba52/parse.c \ -SRCS_COMMON-$(LIBASS) += libass/ass.c \ +SRCS_COMMON-$(LIBASS) += libmpcodecs/vf_ass.c \ + libass/ass_mp.c \ + +SRCS_COMMON-$(LIBASS_INTERNAL) += libass/ass.c \ libass/ass_bitmap.c \ libass/ass_cache.c \ libass/ass_font.c \ libass/ass_fontconfig.c \ libass/ass_library.c \ - libass/ass_mp.c \ libass/ass_render.c \ libass/ass_utils.c \ - libmpcodecs/vf_ass.c \ SRCS_COMMON-$(LIBAVCODEC) += av_opts.c \ libaf/af_lavcresample.c \ diff --git a/configure b/configure index d6919d55f8..234ad41c58 100755 --- a/configure +++ b/configure @@ -280,7 +280,8 @@ Optional features: --disable-vstream disable TiVo vstream client support [autodetect] --disable-pthreads disable Posix threads support [autodetect] --disable-w32threads disable Win32 threads support [autodetect] - --disable-ass disable internal SSA/ASS subtitle support [autodetect] + --disable-ass-internal disable internal SSA/ASS subtitle support [autodetect] + --disable-ass disable SSA/ASS subtitle support [autodetect] --enable-rpath enable runtime linker path for extra libs [disabled] Codecs: @@ -741,6 +742,7 @@ _vstream=auto _pthreads=auto _w32threads=auto _ass=auto +ass_internal=yes _rpath=no _asmalign_pot=auto _stream_cache=yes @@ -1248,6 +1250,8 @@ for ac_option do --disable-w32threads) _w32threads=no ;; --enable-ass) _ass=yes ;; --disable-ass) _ass=no ;; + --enable-ass-internal) ass_internal=yes ;; + --disable-ass-internal) ass_internal=no ;; --enable-rpath) _rpath=yes ;; --disable-rpath) _rpath=no ;; @@ -6166,6 +6170,9 @@ EOF cc_check $($_freetypeconfig --cflags) $($_freetypeconfig --libs) && _ass=yes if test "$_ass" = no ; then _res_comment="FreeType >= 2.1.8 needed" + elif test "$ass_internal" = no ; then + _res_comment="external" + extra_ldflags="$extra_ldflags -lass" fi fi if test "$_ass" = yes ; then @@ -8304,6 +8311,7 @@ LADSPA = $_ladspa LIBA52 = $_liba52 LIBA52_INTERNAL = $_liba52_internal LIBASS = $_ass +LIBASS_INTERNAL = $ass_internal LIBBS2B = $_libbs2b LIBDCA = $_libdca LIBDV = $_libdv -- cgit v1.2.3 From 4ab63df7af7ceac58d3cb6a3068cb16b4e3ff6ee Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 19 Dec 2009 15:32:17 +0000 Subject: Never include ass.h and ass_types.h directly, use ass_mp.h instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30067 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 1 - libmpdemux/demuxer.h | 2 +- mpcommon.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/command.c b/command.c index 1edcc42bcb..669afa8aca 100644 --- a/command.c +++ b/command.c @@ -39,7 +39,6 @@ #include "stream/stream_dvd.h" #endif #include "stream/stream_dvdnav.h" -#include "libass/ass.h" #include "libass/ass_mp.h" #include "m_struct.h" #include "libmenu/menu.h" diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index bf0d4412ed..a2e9185b1e 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -26,7 +26,7 @@ #include "stream/stream.h" #ifdef CONFIG_ASS -#include "libass/ass_types.h" +#include "libass/ass_mp.h" #endif #ifdef HAVE_BUILTIN_EXPECT diff --git a/mpcommon.c b/mpcommon.c index 81ed9c1113..2cdebe5305 100644 --- a/mpcommon.c +++ b/mpcommon.c @@ -19,7 +19,6 @@ double sub_last_pts = -303; #ifdef CONFIG_ASS -#include "libass/ass.h" #include "libass/ass_mp.h" ass_track_t* ass_track = 0; // current track to render #endif -- cgit v1.2.3 From bfd01bdc1700bac53392dc827f3f7870124d0406 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 19 Dec 2009 15:41:47 +0000 Subject: Make ass_mp.h use the system-libass headers when the internal one is disabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30068 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 6 ++++++ libass/ass_mp.h | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 234ad41c58..05af22bf37 100755 --- a/configure +++ b/configure @@ -6180,6 +6180,11 @@ if test "$_ass" = yes ; then else def_ass='#undef CONFIG_ASS' fi +if test "$ass_internal" = yes ; then + def_ass_internal='#define CONFIG_ASS_INTERNAL 1' +else + def_ass_internal='#undef CONFIG_ASS_INTERNAL' +fi echores "$_ass" @@ -8772,6 +8777,7 @@ $def_tv_v4l2 /* font stuff */ $def_ass +$def_ass_internal $def_bitmap_font $def_enca $def_fontconfig diff --git a/libass/ass_mp.h b/libass/ass_mp.h index 64b411a550..1c013c0db9 100644 --- a/libass/ass_mp.h +++ b/libass/ass_mp.h @@ -24,8 +24,11 @@ #define LIBASS_MP_H #include "subreader.h" -#include "ass_types.h" +#ifdef CONFIG_LIBASS_INTERNAL #include "ass.h" +#else +#include +#endif extern ass_library_t* ass_library; extern int ass_enabled; -- cgit v1.2.3