<html><head></head><body>Look, you don't have to write documentation if you don't want to, but please don't ask me why I write some.<br><br><div class="gmail_quote">Le 14 janvier 2019 09:12:16 GMT+02:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Hi,<br><br>On 12/01/2019 14:43, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> vlc | branch: master | Rémi Denis-Courmont <remi@remlab.net> | Wed Jan 2 14:59:31 2019 +0200| [353ec59c3f7864b3cb5e4dc166eebea6f8924c27] | committer: Rémi Denis-Courmont<br><br> display: convert picture in vout_display_Prepare()<br><br> This allows non-core vout display usage without assuming DR.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"><a href="http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=353ec59c3f7864b3cb5e4dc166eebea6f8924c27">http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=353ec59c3f7864b3cb5e4dc166eebea6f8924c27</a><br></blockquote><hr> include/vlc_vout_display.h | 27 +++++++++++++++++++++------<br> src/libvlccore.sym | 1 +<br> src/video_output/display.c | 19 ++++++++++++++-----<br> src/video_output/video_output.c | 4 ++--<br> 4 files changed, 38 insertions(+), 13 deletions(-)<br><br> diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h<br> index 9c343fbcb6..04dc010e3b 100644<br> --- a/include/vlc_vout_display.h<br> +++ b/include/vlc_vout_display.h<br> @@ -312,13 +312,28 @@ VLC_API void vout_display_Delete(vout_display_t *);<br> <br> /**<br> * Prepares a picture for display.<br> + *<br> + * This renders a picture for subsequent display, with vout_display_Display().<br> + *<br> + * \note A reference to the input picture is consumed by the function, which<br> + * returns a reference to an output picture for display. The input and output<br> + * picture may or may not be equal depending on the underlying display setup.<br> + *<br> + * \bug Currently, only one picture can be prepared at a time. It must be<br></blockquote><br>This is going to break 3D branches (which are bound to be merged in <br>4.0). Why this change ?<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">+ * displayed with vout_display_Display() before any picture is prepared or<br>+ * before the display is destroyd with vout_display_Delete().<br>+ *<br>+ \ bug Rendering subpictures is not supported with this function yet.<br>+ * \c subpic must be @c NULL .<br>+ *<br>+ * \param vd display to prepare the picture for<br>+ * \param picture picure to be prepared<br></blockquote><br>typo<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> + * \param subpic reserved, must be NULL<br> + * \param date intended time to show the picture<br> + * \return The prepared picture is returned, NULL on error.<br> */<br> -static inline void vout_display_Prepare(vout_display_t *vd, picture_t *picture,<br> - subpicture_t *subpic, vlc_tick_t date)<br> -{<br> - if (vd->prepare != NULL)<br> - vd->prepare(vd, picture, subpic, date);<br> -}<br> +VLC_API picture_t *vout_display_Prepare(vout_display_t *vd, picture_t *picture,<br> + subpicture_t *subpic, vlc_tick_t date);<br> <br> /**<br> * Displays a picture.<br> diff --git a/src/libvlccore.sym b/src/libvlccore.sym<br> index 87a656f62d..4551406515 100644<br> --- a/src/libvlccore.sym<br> +++ b/src/libvlccore.sym<br> @@ -752,6 +752,7 @@ vout_display_SendEventPicturesInvalid<br> vout_display_SendMouseMovedDisplayCoordinates<br> vout_display_New<br> vout_display_Delete<br> +vout_display_Prepare<br> xml_Create<br> text_style_Copy<br> text_style_Create<br> diff --git a/src/video_output/display.c b/src/video_output/display.c<br> index d47aa826eb..56c16c1398 100644<br> --- a/src/video_output/display.c<br> +++ b/src/video_output/display.c<br> @@ -453,6 +453,17 @@ picture_t *vout_FilterDisplay(vout_display_t *vd, picture_t *picture)<br> return picture;<br> }<br> <br> +picture_t *vout_display_Prepare(vout_display_t *vd, picture_t *picture,<br> + subpicture_t *subpic, vlc_tick_t date)<br> +{<br> + assert(subpic == NULL); /* TODO */<br> + picture = vout_FilterDisplay(vd, picture);<br> +<br> + if (picture != NULL && vd->prepare != NULL)<br> + vd->prepare(vd, picture, subpic, date);<br> + return picture;<br> +}<br> +<br> void vout_FilterFlush(vout_display_t *vd)<br> {<br> vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display);<br> @@ -860,11 +871,9 @@ static void SplitterPrepare(vout_display_t *vd,<br> return;<br> }<br> <br> - for (int i = 0; i < sys->count; i++) {<br> - sys->picture[i] = vout_FilterDisplay(sys->display[i], sys->picture[i]);<br> - if (sys->picture[i])<br> - vout_display_Prepare(sys->display[i], sys->picture[i], NULL, date);<br> - }<br> + for (int i = 0; i < sys->count; i++)<br> + sys->picture[i] = vout_display_Prepare(sys->display[i],<br> + sys->picture[i], NULL, date);<br> }<br> static void SplitterDisplay(vout_display_t *vd, picture_t *picture)<br> {<br> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c<br> index 41daa5cf51..314e06004f 100644<br> --- a/src/video_output/video_output.c<br> +++ b/src/video_output/video_output.c<br> @@ -1154,8 +1154,8 @@ static int ThreadDisplayRenderPicture(vout_thread_t *vout, bool is_forced)<br> if (!do_dr_spu && sys->spu_blend != NULL && subpic != NULL)<br> picture_BlendSubpicture(todisplay, sys->spu_blend, subpic);<br> <br> - vout_display_Prepare(vd, todisplay, do_dr_spu ? subpic : NULL,<br> - todisplay->date);<br> + if (vd->prepare != NULL)<br> + vd->prepare(vd, todisplay, do_dr_spu ? subpic : NULL, todisplay->date);<br> <br> vout_chrono_Stop(&sys->render);<br> #if 0<hr> vlc-commits mailing list<br> vlc-commits@videolan.org<br> <a href="https://mailman.videolan.org/listinfo/vlc-commits">https://mailman.videolan.org/listinfo/vlc-commits</a><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>