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