[vlc-commits] mmal: move the common subpicture chroma in common code

John Cox git at videolan.org
Mon Jan 20 08:25:31 CET 2020


vlc | branch: master | John Cox <jc at kynesim.co.uk> | Fri Jan 17 13:25:58 2020 +0100| [877d8de0278a5d638cfd57b6953163ce6d9d8d2c] | committer: Steve Lhomme

mmal: move the common subpicture chroma in common code

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=877d8de0278a5d638cfd57b6953163ce6d9d8d2c
---

 modules/hw/mmal/mmal_picture.c | 3 +++
 modules/hw/mmal/mmal_picture.h | 4 ++++
 modules/hw/mmal/vout.c         | 7 +------
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/modules/hw/mmal/mmal_picture.c b/modules/hw/mmal/mmal_picture.c
index 889e807110..e24db2c35f 100644
--- a/modules/hw/mmal/mmal_picture.c
+++ b/modules/hw/mmal/mmal_picture.c
@@ -26,6 +26,9 @@
 
 #include "mmal_picture.h"
 
+const vlc_fourcc_t hw_mmal_vzc_subpicture_chromas[] = { VLC_CODEC_RGBA, 0 };
+
+
 int mmal_picture_lock(picture_t *picture)
 {
     picture_sys_t *pic_sys = picture->p_sys;
diff --git a/modules/hw/mmal/mmal_picture.h b/modules/hw/mmal/mmal_picture.h
index a7186a9dc8..c2ed09785a 100644
--- a/modules/hw/mmal/mmal_picture.h
+++ b/modules/hw/mmal/mmal_picture.h
@@ -39,4 +39,8 @@ typedef struct
 
 int mmal_picture_lock(picture_t *picture);
 
+// At the moment we cope with any mono-planar RGBA thing
+// We could cope with many other things but they currently don't occur
+extern const vlc_fourcc_t hw_mmal_vzc_subpicture_chromas[];
+
 #endif
diff --git a/modules/hw/mmal/vout.c b/modules/hw/mmal/vout.c
index 0c2e3e5e0d..fff8031d6e 100644
--- a/modules/hw/mmal/vout.c
+++ b/modules/hw/mmal/vout.c
@@ -141,11 +141,6 @@ struct vout_display_sys_t {
     subpicture_t *prepare_subpicture;
 };
 
-static const vlc_fourcc_t subpicture_chromas[] = {
-    VLC_CODEC_RGBA,
-    0
-};
-
 /* Utility functions */
 static inline uint32_t align(uint32_t x, uint32_t y);
 static void configure_display(vout_display_t *vd, const vout_display_cfg_t *cfg,
@@ -316,7 +311,7 @@ static int OpenMmalVout(vout_display_t *vd, const vout_display_cfg_t *cfg,
     }
 
     sys->dmx_handle = vc_dispmanx_display_open(0);
-    vd->info.subpicture_chromas = subpicture_chromas;
+    vd->info.subpicture_chromas = hw_mmal_vzc_subpicture_chromas;
 
 out:
     if (ret != VLC_SUCCESS)



More information about the vlc-commits mailing list