浏览代码

MVK: update libvlc to use VT with frame reordering and MPEG TS support

0-copy is still forthcoming
Felix Paul Kühne 10 年之前
父节点
当前提交
6bd0665d0b

+ 3 - 3
MobileVLCKit/patches/0001-arm_neon-added-function-macro-to-handle-the-undersco.patch

@@ -1,7 +1,7 @@
-From f46e3693a5412b729564a6c3818b0c8b208a12a6 Mon Sep 17 00:00:00 2001
+From 4e135f13be04c4b8eedf20fdbaa072bd6fe2b072 Mon Sep 17 00:00:00 2001
 From: David Geldreich <david.geldreich@free.fr>
 Date: Fri, 20 Apr 2012 16:41:19 +0200
-Subject: [PATCH 01/10] arm_neon: added function macro to handle the underscore
+Subject: [PATCH 01/11] arm_neon: added function macro to handle the underscore
  prefix for the iOS ARM ABI
 
 ---
@@ -65,5 +65,5 @@ index 0000000..d853255
 +.endm
 +
 -- 
-2.4.4
+2.4.6
 

+ 3 - 3
MobileVLCKit/patches/0002-arm_neon-use-a-macro-to-fix-compilation-for-iOS.patch

@@ -1,7 +1,7 @@
-From 3ad6c2c1c07d9b39a73511c9481e1da4b2c019fe Mon Sep 17 00:00:00 2001
+From dfaeadfb6a32cbe4b9f7e1a76834b486b3e1b41f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Fri, 10 Aug 2012 16:01:49 +0200
-Subject: [PATCH 02/18] arm_neon: use a macro to fix compilation for iOS
+Subject: [PATCH 02/11] arm_neon: use a macro to fix compilation for iOS
 
 ---
  modules/arm_neon/amplify.S              |  9 +++---
@@ -204,5 +204,5 @@ index dcc51ed..4722be4 100644
  	pop {r4,pc}
 +endfunc
 -- 
-2.4.3
+2.4.6
 

+ 3 - 3
MobileVLCKit/patches/0003-deinterlace-merge-use-a-macro-to-fix-compilation-for.patch

@@ -1,7 +1,7 @@
-From c477ea16265a3bd28f8280eea80a92b65ed12d59 Mon Sep 17 00:00:00 2001
+From c5385c3db1037b91e3ca781f8c56e458a001878d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Fri, 10 Aug 2012 16:02:07 +0200
-Subject: [PATCH 03/10] deinterlace/merge: use a macro to fix compilation for
+Subject: [PATCH 03/11] deinterlace/merge: use a macro to fix compilation for
  iOS
 
 ---
@@ -82,5 +82,5 @@ index dd77902..03e5042 100644
  	b		1b
 +endfunc
 -- 
-2.4.4
+2.4.6
 

+ 3 - 3
MobileVLCKit/patches/0004-libass-fix-text-rendering-on-iOS-by-providing-a-font.patch

@@ -1,7 +1,7 @@
-From 15ef7ebbc9dd138380ed3c8429783a85e7519586 Mon Sep 17 00:00:00 2001
+From 5e9949ee2de20b9868c62318fa596e5c59e2fb67 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 29 May 2013 13:25:54 +0200
-Subject: [PATCH 04/10] libass: fix text rendering on iOS by providing a font
+Subject: [PATCH 04/11] libass: fix text rendering on iOS by providing a font
  lookup mechanism for the font shipped with Aspen
 
 ---
@@ -65,5 +65,5 @@ index 067ef6b..8460dad 100644
      const char *psz_font = NULL; /* We don't ship a default font with VLC */
      const char *psz_family = "Arial"; /* Use Arial if we can't find anything more suitable */
 -- 
-2.4.4
+2.4.6
 

+ 5 - 5
MobileVLCKit/patches/0005-freetype-added-a-fake-font-lookup-mechanism-for-iOS-.patch

@@ -1,7 +1,7 @@
-From 16d400237fcab9d20bfb1c6fc723d591102ded76 Mon Sep 17 00:00:00 2001
+From 0c1641a3593413ba01a28da9a8b674a89a486705 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 22 Jan 2014 13:55:16 +0100
-Subject: [PATCH 05/10] freetype: added a fake font lookup mechanism for iOS to
+Subject: [PATCH 05/11] freetype: added a fake font lookup mechanism for iOS to
  use the packaged demo fonts
 
 ---
@@ -11,10 +11,10 @@ Subject: [PATCH 05/10] freetype: added a fake font lookup mechanism for iOS to
  3 files changed, 45 insertions(+)
 
 diff --git a/modules/text_renderer/freetype.c b/modules/text_renderer/freetype.c
-index 2773779..3bca706 100644
+index 6b24586..1dcd3cf 100644
 --- a/modules/text_renderer/freetype.c
 +++ b/modules/text_renderer/freetype.c
-@@ -1280,6 +1280,8 @@ static int Create( vlc_object_t *p_this )
+@@ -1243,6 +1243,8 @@ static int Create( vlc_object_t *p_this )
  #elif defined( __APPLE__ )
  #if !TARGET_OS_IPHONE
      p_sys->pf_select = MacLegacy_Select;
@@ -96,5 +96,5 @@ index cff52b1..40b25fb 100644
  #endif
  
 -- 
-2.4.4
+2.4.6
 

+ 3 - 3
MobileVLCKit/patches/0007-contrib-gcrypt-simplify-compilation-by-disabling-doc.patch

@@ -1,7 +1,7 @@
-From b3373efef08c287679a8ca0e56b998b5606c62a1 Mon Sep 17 00:00:00 2001
+From 24d2fec8b470585ae2a375af7ebf2f7409b287d4 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Sun, 7 Dec 2014 20:02:18 +0100
-Subject: [PATCH 07/10] contrib/gcrypt: simplify compilation by disabling /doc
+Subject: [PATCH 06/11] contrib/gcrypt: simplify compilation by disabling /doc
  and work-around a libtool limitation
 
 ---
@@ -106,5 +106,5 @@ index 0000000..df97ffb
 + AM_CFLAGS = $(GPG_ERROR_CFLAGS)
 + 
 -- 
-2.4.4
+2.4.6
 

+ 5 - 5
MobileVLCKit/patches/0008-lib-media-player-inherit-deinterlace-variable-to-ach.patch

@@ -1,7 +1,7 @@
-From 5175b5b287061ce06139418bfc99cf5b64440ba5 Mon Sep 17 00:00:00 2001
+From 85880ce55a94beb2c38700f7238ee1ca1b13448d Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Tue, 9 Dec 2014 22:14:55 +0100
-Subject: [PATCH 08/10] lib/media player: inherit deinterlace variable to
+Subject: [PATCH 07/11] lib/media player: inherit deinterlace variable to
  achieve correct value on first use
 
 ---
@@ -9,10 +9,10 @@ Subject: [PATCH 08/10] lib/media player: inherit deinterlace variable to
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/media_player.c b/lib/media_player.c
-index f701a49..d9dde1a 100644
+index ba7158e..18363db 100644
 --- a/lib/media_player.c
 +++ b/lib/media_player.c
-@@ -530,7 +530,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
+@@ -602,7 +602,7 @@ libvlc_media_player_new( libvlc_instance_t *instance )
      var_Create (mp, "zoom", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
      var_Create (mp, "aspect-ratio", VLC_VAR_STRING);
      var_Create (mp, "crop", VLC_VAR_STRING);
@@ -22,5 +22,5 @@ index f701a49..d9dde1a 100644
  
      var_Create (mp, "vbi-page", VLC_VAR_INTEGER);
 -- 
-2.4.4
+2.4.6
 

+ 3 - 3
MobileVLCKit/patches/0009-arm_neon-work-around-libtool-issue.patch

@@ -1,7 +1,7 @@
-From f2b955348c86405fddc697acec7bc531fcb92b41 Mon Sep 17 00:00:00 2001
+From 8a9f38d159d34b04d962d28e0783887b214e8764 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Wed, 18 Feb 2015 21:35:16 +0100
-Subject: [PATCH 09/10] arm_neon: work-around libtool issue
+Subject: [PATCH 08/11] arm_neon: work-around libtool issue
 
 ---
  modules/arm_neon/Makefile.am | 2 ++
@@ -18,5 +18,5 @@ index 4e73a4f..43ef527 100644
  
  libsimple_channel_mixer_neon_plugin_la_SOURCES = \
 -- 
-2.4.4
+2.4.6
 

+ 3 - 3
MobileVLCKit/patches/0010-libvlc-media-re-parse-if-flags-changed.patch

@@ -1,7 +1,7 @@
-From 50a5d0ad39c707e2b4fcb5319fd85f30b37e9223 Mon Sep 17 00:00:00 2001
+From 366c424f6396653052769e68616fde591065cc0f Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Fri, 19 Jun 2015 15:26:06 +0200
-Subject: [PATCH 10/10] libvlc/media: re-parse if flags changed
+Subject: [PATCH 09/11] libvlc/media: re-parse if flags changed
 
 ---
  lib/media.c          | 6 ++++++
@@ -38,5 +38,5 @@ index 35f06a4..d28297e 100644
  
  /* Media Descriptor */
 -- 
-2.4.4
+2.4.6
 

+ 3 - 3
MobileVLCKit/patches/0011-disable-neon-volume-plugin.patch

@@ -1,7 +1,7 @@
-From b049fc61efe79c76fc44766b82a29b6997e03ad8 Mon Sep 17 00:00:00 2001
+From 3c15be854de4b1e2e84d72babbd5ba8b29066fe5 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Fri, 10 Jul 2015 19:57:18 +0200
-Subject: [PATCH 12/12] disable neon volume plugin
+Subject: [PATCH 10/11] disable neon volume plugin
 
 ---
  modules/arm_neon/Makefile.am | 1 -
@@ -19,5 +19,5 @@ index 43ef527..db81e3e 100644
  	libyuv_rgb_neon_plugin.la
  endif
 -- 
-2.4.4
+2.4.6
 

+ 34 - 42
MobileVLCKit/patches/0006-libvlc-add-preliminary-code-path-to-modify-quartztex.patch

@@ -1,22 +1,22 @@
-From 26a19e04ca03f0d22ac05028c95473751e3ffe1e Mon Sep 17 00:00:00 2001
+From 57631dbe84723508407b4810c3bc91439a8440a8 Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Felix=20Paul=20K=C3=BChne?= <fkuehne@videolan.org>
 Date: Mon, 31 Mar 2014 17:54:01 +0200
-Subject: [PATCH 06/10] libvlc: add preliminary code path to modify quartztext
+Subject: [PATCH 11/11] libvlc: add preliminary code path to modify quartztext
  variables on-the-fly
 
 ---
- include/vlc/libvlc_media_player.h  | 21 +++++++++++++
+ include/vlc/libvlc_media_player.h  | 21 ++++++++++++++
  lib/libvlc.sym                     |  4 +++
  lib/media_player.c                 |  6 ++++
- lib/video.c                        | 47 +++++++++++++++++++++++++++++
- modules/text_renderer/quartztext.c | 60 +++++++++++++++++++++++++++++++++-----
- 5 files changed, 130 insertions(+), 8 deletions(-)
+ lib/video.c                        | 47 ++++++++++++++++++++++++++++++++
+ modules/text_renderer/quartztext.c | 56 ++++++++++++++++++++++++++++++++++----
+ 5 files changed, 128 insertions(+), 6 deletions(-)
 
 diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
-index 3bccb5b..7053b39 100644
+index 0c7351b..b0b4208 100644
 --- a/include/vlc/libvlc_media_player.h
 +++ b/include/vlc/libvlc_media_player.h
-@@ -1472,6 +1472,27 @@ LIBVLC_API float libvlc_video_get_adjust_float( libvlc_media_player_t *p_mi,
+@@ -1495,6 +1495,27 @@ LIBVLC_API float libvlc_video_get_adjust_float( libvlc_media_player_t *p_mi,
  LIBVLC_API void libvlc_video_set_adjust_float( libvlc_media_player_t *p_mi,
                                                     unsigned option, float value );
  
@@ -67,10 +67,10 @@ index 03577c7..d084c44 100644
  libvlc_video_take_snapshot
  libvlc_vlm_add_broadcast
 diff --git a/lib/media_player.c b/lib/media_player.c
-index 83af6cd..f701a49 100644
+index 18363db..1b8c948 100644
 --- a/lib/media_player.c
 +++ b/lib/media_player.c
-@@ -560,6 +560,12 @@ libvlc_media_player_new( libvlc_instance_t *instance )
+@@ -632,6 +632,12 @@ libvlc_media_player_new( libvlc_instance_t *instance )
      var_Create (mp, "saturation", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
      var_Create (mp, "gamma", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT);
  
@@ -82,7 +82,7 @@ index 83af6cd..f701a49 100644
 +
       /* Audio */
      var_Create (mp, "aout", VLC_VAR_STRING | VLC_VAR_DOINHERIT);
-     var_Create (mp, "mute", VLC_VAR_BOOL);
+     var_Create (mp, "audio-device", VLC_VAR_STRING);
 diff --git a/lib/video.c b/lib/video.c
 index b2c9b34..588aa1d 100644
 --- a/lib/video.c
@@ -139,10 +139,10 @@ index b2c9b34..588aa1d 100644
 +    return get_string( p_mi, "quartztext", textrenderer_option_bynumber(option) );
 +}
 diff --git a/modules/text_renderer/quartztext.c b/modules/text_renderer/quartztext.c
-index 3b8e6ca..d81b531 100644
+index 02e0482..5711d4c 100644
 --- a/modules/text_renderer/quartztext.c
 +++ b/modules/text_renderer/quartztext.c
-@@ -65,6 +65,10 @@
+@@ -66,6 +66,10 @@
  static int  Create (vlc_object_t *);
  static void Destroy(vlc_object_t *);
  
@@ -153,7 +153,7 @@ index 3b8e6ca..d81b531 100644
  static int LoadFontsFromAttachments(filter_t *p_filter);
  
  static int RenderText(filter_t *, subpicture_region_t *,
-@@ -131,16 +135,20 @@ vlc_module_begin ()
+@@ -124,16 +128,20 @@ vlc_module_begin ()
  
      add_string("quartztext-font", DEFAULT_FONT, FONT_TEXT, FONT_LONGTEXT,
                false)
@@ -175,29 +175,31 @@ index 3b8e6ca..d81b531 100644
      set_callbacks(Create, Destroy)
  vlc_module_end ()
  
-@@ -182,7 +190,8 @@ struct offscreen_bitmap_t
+@@ -175,6 +183,7 @@ struct offscreen_bitmap_t
   *****************************************************************************/
  struct filter_sys_t
  {
--    char          *psz_font_name;
-+    vlc_mutex_t    lock;
-+    char           *psz_font_name;
++	vlc_mutex_t    lock;
      uint8_t        i_font_opacity;
      int            i_font_color;
-     int            i_font_size;
-@@ -209,9 +218,9 @@ static int Create(vlc_object_t *p_this)
-     p_filter->p_sys = p_sys = malloc(sizeof(filter_sys_t));
+     bool           b_outline;
+@@ -202,13 +211,13 @@ static int Create(vlc_object_t *p_this)
      if (!p_sys)
          return VLC_ENOMEM;
--    p_sys->psz_font_name  = var_CreateGetString(p_this, "quartztext-font");
-+    p_sys->psz_font_name  = var_CreateGetStringCommand(p_this, "quartztext-font");
+ 
+-    p_sys->style.psz_fontname = var_CreateGetString(p_this, "quartztext-font");;
++    p_sys->style.psz_fontname = var_CreateGetStringCommand(p_this, "quartztext-font");
+     p_sys->style.psz_monofontname = strdup(p_sys->style.psz_fontname);
+     p_sys->style.i_font_size = GetFontSize(p_filter);;
+     p_sys->style.i_style_flags = 0;
+ 
      p_sys->i_font_opacity = 255;
 -    p_sys->i_font_color = VLC_CLIP(var_CreateGetInteger(p_this, "quartztext-color") , 0, 0xFFFFFF);
 +    p_sys->i_font_color = VLC_CLIP(var_CreateGetIntegerCommand(p_this, "quartztext-color") , 0, 0xFFFFFF);
      p_sys->b_outline = var_InheritBool(p_this, "quartztext-outline");
      p_sys->b_shadow = var_InheritBool(p_this, "quartztext-shadow");
-     p_sys->i_font_size = GetFontSize(p_filter);
-@@ -224,6 +233,11 @@ static int Create(vlc_object_t *p_this)
+ 
+@@ -219,6 +228,11 @@ static int Create(vlc_object_t *p_this)
      p_sys->i_fonts = 0;
  #endif
  
@@ -209,7 +211,7 @@ index 3b8e6ca..d81b531 100644
      LoadFontsFromAttachments(p_filter);
  
      return VLC_SUCCESS;
-@@ -238,6 +252,16 @@ static void Destroy(vlc_object_t *p_this)
+@@ -233,6 +247,16 @@ static void Destroy(vlc_object_t *p_this)
  {
      filter_t *p_filter = (filter_t *)p_this;
      filter_sys_t *p_sys = p_filter->p_sys;
@@ -226,17 +228,7 @@ index 3b8e6ca..d81b531 100644
  #ifndef TARGET_OS_IPHONE
      if (p_sys->p_fonts) {
          for (int k = 0; k < p_sys->i_fonts; k++) {
-@@ -245,8 +269,8 @@ static void Destroy(vlc_object_t *p_this)
- 
-         free(p_sys->p_fonts);
-     }
--#endif
-     free(p_sys->psz_font_name);
-+#endif
-     free(p_sys);
- }
- 
-@@ -1001,12 +1025,12 @@ static int GetFontSize(filter_t *p_filter)
+@@ -619,12 +643,12 @@ static int GetFontSize(filter_t *p_filter)
  {
      int i_size = 0;
  
@@ -252,7 +244,7 @@ index 3b8e6ca..d81b531 100644
          msg_Warn( p_filter, "invalid fontsize, using 12" );
          i_size = 12;
      }
-@@ -1092,3 +1116,23 @@ static int RenderYUVA(filter_t *p_filter, subpicture_region_t *p_region,
+@@ -710,3 +734,23 @@ static int RenderYUVA(filter_t *p_filter, subpicture_region_t *p_region,
  
      return VLC_SUCCESS;
  }
@@ -267,15 +259,15 @@ index 3b8e6ca..d81b531 100644
 +
 +    vlc_mutex_lock( &p_sys->lock );
 +    if( !strcmp( psz_var, "quartztext-font" ) )
-+        p_sys->psz_font_name = newval.psz_string;
++        p_sys->style.psz_fontname = newval.psz_string;
 +    else if( !strcmp( psz_var, "quartztext-fontsize" ) )
-+        p_sys->i_font_size = (int)p_filter->fmt_out.video.i_height / newval.i_int;
++        p_sys->style.i_font_size = (int)p_filter->fmt_out.video.i_height / newval.i_int;
 +    else if( !strcmp( psz_var, "quartztext-color" ) )
-+        p_sys->i_font_color = VLC_CLIP(newval.i_int, 0, 0xFFFFFF);
++        p_sys->style.i_font_color = VLC_CLIP(newval.i_int, 0, 0xFFFFFF);
 +    vlc_mutex_unlock( &p_sys->lock );
 +
 +    return VLC_SUCCESS;
 +}
 -- 
-2.4.4
+2.4.6
 

+ 1 - 1
buildMobileVLCKit.sh

@@ -15,7 +15,7 @@ NONETWORK=no
 SKIPLIBVLCCOMPILATION=no
 SCARY=yes
 
-TESTEDHASH=bfd01076
+TESTEDHASH=5ef42a88
 
 usage()
 {