<html><head></head><body>Hi,<br><br>Does VA require an actual window? I'd think it only requires a display, so a vout_window_t in disabled state should suffice.<br><br><div class="gmail_quote">Le 13 janvier 2020 15:56:43 GMT+02:00, Thomas Guillem <thomas@gllm.fr> 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"><br>On Mon, Jan 13, 2020, at 13:35, Steve Lhomme wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">"In some cases (nvdec, mmal, mediacodec ?) the actual size of the video <br>to decode is known only after data have been processed, long after the <br>device is setup to use with this API. There are hacks to try to guess <br>the size early but in the end it's just a hack."<br></blockquote><br>What to we do when we have a hw decoder that doesn't know its actual size but a window is required ? (vaapi).<br><br>> <br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">This removes the need for these hacks for those using a decoder device <br>that doesn't need a window.<br><br>On 2020-01-13 13:27, Alexandre Janniaux wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">Hi,<br><br>This looks dangerous if it is expected to have an enabled<br>window at decoder device creation. vout_window handle<br>values will basically be undefined without any way for the<br>decoder device to know it. Why do you need this?<br><br>Regards,<br>--<br>Alexandre Janniaux<br>Videolabs<br><br>On Mon, Jan 13, 2020 at 12:07:33PM +0100, Steve Lhomme wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #8ae234; padding-left: 1ex;"><hr>   src/video_output/video_output.c | 20 +++++++++-----------<br>   1 file changed, 9 insertions(+), 11 deletions(-)<br><br> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c<br> index 5d583dbe0ca..9540707ab2b 100644<br> --- a/src/video_output/video_output.c<br> +++ b/src/video_output/video_output.c<br> @@ -2099,20 +2099,18 @@ vlc_decoder_device *vout_GetDevice(const vout_device_configuration_t *cfg)<br>       assert(cfg->fmt != NULL);<br>       vout_thread_sys_t *sys = cfg->vout->p;<br><br> -    if (!VoutCheckFormat(cfg->fmt))<br> -        return NULL;<br> -<br> -    video_format_t original;<br> -    VoutFixFormat(&original, cfg->fmt);<br> -<br>       vlc_mutex_lock(&sys->window_lock);<br> -    int res = EnableWindowLocked(cfg->vout, &original);<br> -    if (res == 0 && sys->dec_device == NULL)<br> +    if (VoutCheckFormat(cfg->fmt))<br> +    {<br> +        video_format_t original;<br> +        VoutFixFormat(&original, cfg->fmt);<br> +<br> +        EnableWindowLocked(cfg->vout, &original);<br> +        video_format_Clean(&original);<br> +    }<br> +    if (sys->dec_device == NULL)<br>           sys->dec_device = vlc_decoder_device_Create(&cfg->vout->obj, sys->display_cfg.window);<br>       dec_device = sys->dec_device ? vlc_decoder_device_Hold( sys->dec_device ) : NULL;<br>       vlc_mutex_unlock(&sys->window_lock);<br> -    video_format_Clean(&original);<br> -    if (res != 0)<br> -        return NULL;<br>       return dec_device;<br>   }<br> --<br> 2.17.1<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><br><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><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>