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