[vlc-devel] [PATCH 17/19] vout: move documentation to vlc_vout.h

Kartik Ohri kartikohri13 at gmail.com
Thu Jul 23 15:18:32 CEST 2020


Move documentation for VLC API methods vout_GetPicture and
vout_PutPicture from src/video_output/video_output.c to
include/vlc_vout.h.
---
 include/vlc_vout.h              | 19 ++++++++++++++++++-
 src/video_output/video_output.c | 17 -----------------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/include/vlc_vout.h b/include/vlc_vout.h
index 64bc35012f..c1bc26f9ee 100644
--- a/include/vlc_vout.h
+++ b/include/vlc_vout.h
@@ -118,8 +118,25 @@ VLC_API int vout_GetSnapshot( vout_thread_t *p_vout,
                               video_format_t *p_fmt,
                               const char *psz_format, vlc_tick_t i_timeout );
 
-/* */
+/**
+ * Allocates a video output picture buffer.
+ *
+ * Either vout_PutPicture() or picture_Release() must be used to return the
+ * buffer to the video output free buffer pool.
+ *
+ * You may use picture_Hold() (paired with picture_Release()) to keep a
+ * read-only reference.
+ */
 VLC_API picture_t * vout_GetPicture( vout_thread_t * );
+
+/**
+ * It gives to the vout a picture to be displayed.
+ *
+ * The given picture MUST comes from vout_GetPicture.
+ *
+ * Becareful, after vout_PutPicture is called, picture_t::p_next cannot be
+ * read/used.
+ */
 VLC_API void vout_PutPicture( vout_thread_t *, picture_t * );
 
 /* Subpictures channels ID */
diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
index ea24ad6a15..f8644d923b 100644
--- a/src/video_output/video_output.c
+++ b/src/video_output/video_output.c
@@ -455,15 +455,6 @@ void vout_SetSpuHighlight( vout_thread_t *vout,
         spu_SetHighlight(sys->spu, spu_hl);
 }
 
-/**
- * Allocates a video output picture buffer.
- *
- * Either vout_PutPicture() or picture_Release() must be used to return the
- * buffer to the video output free buffer pool.
- *
- * You may use picture_Hold() (paired with picture_Release()) to keep a
- * read-only reference.
- */
 picture_t *vout_GetPicture(vout_thread_t *vout)
 {
     vout_thread_sys_t *sys = VOUT_THREAD_TO_SYS(vout);
@@ -476,14 +467,6 @@ picture_t *vout_GetPicture(vout_thread_t *vout)
     return picture;
 }
 
-/**
- * It gives to the vout a picture to be displayed.
- *
- * The given picture MUST comes from vout_GetPicture.
- *
- * Becareful, after vout_PutPicture is called, picture_t::p_next cannot be
- * read/used.
- */
 void vout_PutPicture(vout_thread_t *vout, picture_t *picture)
 {
     vout_thread_sys_t *sys = VOUT_THREAD_TO_SYS(vout);
-- 
2.25.1



More information about the vlc-devel mailing list