[vlc-commits] vout: update vout display documentation

Thomas Guillem git at videolan.org
Mon Mar 1 14:42:51 UTC 2021


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Feb 19 14:52:46 2021 +0100| [97e5030e68ca5bb935d15c891ab221e6965742e6] | committer: Thomas Guillem

vout: update vout display documentation

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

 include/vlc_vout_display.h | 8 ++++++--
 src/video_output/display.c | 3 +++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
index 36018a9542..868a3bb505 100644
--- a/include/vlc_vout_display.h
+++ b/include/vlc_vout_display.h
@@ -247,8 +247,9 @@ struct vlc_display_operations
      * or upload the picture to video memory. If supported, this can also
      * queue the picture to be shown asynchronously at the given date.
      *
-     * If prepare is not \c NULL, there is an implicit guarantee that display
-     * will be invoked with the exact same picture afterwards:
+     *
+     * If prepare and display are not \c NULL, there is an implicit guarantee
+     * that display will be invoked with the exact same picture afterwards:
      * prepare 1st picture, display 1st picture, prepare 2nd picture, display
      * 2nd picture, and so on.
      *
@@ -269,6 +270,9 @@ struct vlc_display_operations
      * This callback is invoked at the time when the picture should be shown.
      * The picture must be displayed as soon as possible.
      *
+     * If NULL, prepare must be valid. In that case, the plugin can handle
+     * asynchronous display at the time given by the prepare call.
+     *
      * \note The picture buffers may have multiple references.
      * Therefore the pixel content of the picture or of the subpicture
      * must not be changed.
diff --git a/src/video_output/display.c b/src/video_output/display.c
index 06dd9533db..e4ce16e88f 100644
--- a/src/video_output/display.c
+++ b/src/video_output/display.c
@@ -703,6 +703,9 @@ vout_display_t *vout_display_New(vlc_object_t *parent,
                         vout_display_start, osys) == NULL)
         goto error;
 
+    assert(vd->ops);
+    assert(vd->ops->prepare || vd->ops->display);
+
     if (VoutDisplayCreateRender(vd)) {
         if (vd->ops->close != NULL)
             vd->ops->close(vd);



More information about the vlc-commits mailing list