[vlc-devel] [PATCH 1/2] vout: update vout display documentation
Thomas Guillem
thomas at gllm.fr
Fri Feb 19 13:55:02 UTC 2021
---
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 36018a9542a..868a3bb5057 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 06dd9533db8..e4ce16e88f2 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);
--
2.30.0
More information about the vlc-devel
mailing list