[vlc-commits] mmal: make pic_ctx_mmal_t private

Steve Lhomme git at videolan.org
Fri Jan 24 14:15:55 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jan 24 13:54:50 2020 +0100| [023a3241d667ed7d73ff4def8d7aa270030685cf] | committer: Steve Lhomme

mmal: make pic_ctx_mmal_t private

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

 modules/hw/mmal/mmal_picture.c | 19 +++++++++++++++++++
 modules/hw/mmal/mmal_picture.h | 18 +-----------------
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/modules/hw/mmal/mmal_picture.c b/modules/hw/mmal/mmal_picture.c
index 0d8af70f74..06b3eb7763 100644
--- a/modules/hw/mmal/mmal_picture.c
+++ b/modules/hw/mmal/mmal_picture.c
@@ -313,6 +313,25 @@ MMAL_STATUS_T hw_mmal_opaque_output(vlc_object_t * const obj,
     return MMAL_SUCCESS;
 }
 
+//----------------------------------------------------------------------------
+
+#define CTX_BUFS_MAX 4
+typedef struct pic_ctx_mmal_s {
+    picture_context_t cmn;  // PARENT: Common els at start
+
+    cma_buf_t * cb;
+
+    unsigned int buf_count;
+    MMAL_BUFFER_HEADER_T * bufs[CTX_BUFS_MAX];
+
+} pic_ctx_mmal_t;
+
+MMAL_BUFFER_HEADER_T * hw_mmal_pic_sub_buf_get(picture_t * const pic, const unsigned int sub_no)
+{
+    pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic->context;
+
+    return sub_no + 1 > ctx->buf_count ? NULL : ctx->bufs[sub_no + 1];
+}
 
 static void hw_mmal_pic_ctx_destroy(picture_context_t * pic_ctx_cmn)
 {
diff --git a/modules/hw/mmal/mmal_picture.h b/modules/hw/mmal/mmal_picture.h
index dc79db004a..7804c7780b 100644
--- a/modules/hw/mmal/mmal_picture.h
+++ b/modules/hw/mmal/mmal_picture.h
@@ -34,17 +34,6 @@
 #define NUM_ACTUAL_OPAQUE_BUFFERS 30
 
 
-#define CTX_BUFS_MAX 4
-typedef struct pic_ctx_mmal_s {
-    picture_context_t cmn;  // PARENT: Common els at start
-
-    cma_buf_t * cb;
-
-    unsigned int buf_count;
-    MMAL_BUFFER_HEADER_T * bufs[CTX_BUFS_MAX];
-
-} pic_ctx_mmal_t;
-
 MMAL_FOURCC_T vlc_to_mmal_video_fourcc(const video_frame_format_t * const vf_vlc);
 MMAL_FOURCC_T vlc_to_mmal_color_space(const video_color_space_t vlc_cs);
 void hw_mmal_vlc_fmt_to_mmal_fmt(MMAL_ES_FORMAT_T *const es_fmt, const video_frame_format_t * const vf_vlc);
@@ -70,12 +59,7 @@ MMAL_STATUS_T hw_mmal_opaque_output(vlc_object_t * const obj,
                                     MMAL_PORT_T * const port,
                                     const unsigned int extra_buffers, MMAL_PORT_BH_CB_T callback);
 
-static inline MMAL_BUFFER_HEADER_T * hw_mmal_pic_sub_buf_get(picture_t * const pic, const unsigned int n)
-{
-    pic_ctx_mmal_t * const ctx = (pic_ctx_mmal_t *)pic->context;
-
-    return n + 1 > ctx->buf_count ? NULL : ctx->bufs[n + 1];
-}
+MMAL_BUFFER_HEADER_T * hw_mmal_pic_sub_buf_get(picture_t * const pic, const unsigned int n);
 
 static inline bool hw_mmal_chroma_is_mmal(const vlc_fourcc_t chroma)
 {



More information about the vlc-commits mailing list