[vlc-devel] [PATCH 1/2] decoder device: allow modules to create a decoder device

Alexandre Janniaux ajanni at videolabs.io
Sat Oct 26 15:59:00 CEST 2019


Hi,

Thank you for the information (and precision as it is also
the same with VAAPI).

For my part, the «from window» terminology comes from the
fact that decoder device adapts hardware hints for a window
when only staying in current VLC concepts. However, it is
really either explicit device or connection to display
server like X11 or Wayland-based compositor.

In this situation, we can have vlc_decoder_device_New that
will probe the best decoder device for the windowm but when
it comes to matching a decoder with a filter chain and an
encoder, I don't know if probing is the easiest solution.

We could as well expose specialized decoder device creation
helper as the one creating the device in the chain might
depend on this, or extract the window handle part as native
handle from the vout_window and ask a window handle in any
case?

Regards,
--
Alexandre Janniaux
Videolabs

On Sat, Oct 26, 2019 at 01:09:25PM +0100, Rémi Denis-Courmont wrote:
> Hi,
>
> VDPAU needs an X11 server, not a window. Indeed VA does not even need a display server, if render device nodes are supported.
>
> Le 26 octobre 2019 10:19:08 GMT+01:00, Alexandre Janniaux <ajanni at videolabs.io> a écrit :
> >Hi,
> >
> >On Fri, Oct 25, 2019 at 02:44:22PM +0200, Steve Lhomme wrote:
> >> On 2019-10-25 14:37, Steve Lhomme wrote:
> >> > On 2019-10-25 14:33, Rémi Denis-Courmont wrote:
> >> > > Don't remove the used qualifier.
> >> >
> >> > OK
> >> >
> >> > > And this won't work anyway because sout does not have, and should
> >> > > not need a window. This needs a different function.
> >> >
> >> > It works fine with QSV is my work branch (hardware decoding,
> >hardware
> >> > encoding, sharing the same decoder device).
> >>
> >> NVDEC, D3D11 and D3D9 don't use the window in their decoder device.
> >So the
> >> hardware acceleration can be used without a window.
> >>
> >> VAAPI and VDPAU seem to need a window. I think with VAAPI there might
> >be
> >> ways around this as QSV might be usable without a window at all.
> >
> >I don't know for VDPAU but VAAPI can work with DRM and
> >thus avoid using a window. It means that you need to
> >synchronize the DRM device in the filter chain for things
> >like vulkan or OpenGL, and probably use the same for the
> >encoder.
> >
> >Regards,
> >--
> >Alexandre Janniaux
> >Videolabs
> >
> >>
> >> > The no-window comment is also mentioned in the next patch.
> >> >
> >> > > Le 25 octobre 2019 15:31:06 GMT+03:00, Steve Lhomme
> >> > > <robux4 at ycbcr.xyz> a écrit :
> >> > >
> >> > >     Like the transcoder or the mosaic bridge.
> >> > >
> >------------------------------------------------------------------------
> >> > >       include/vlc_codec.h | 2 +-
> >> > >       src/libvlccore.sym  | 1 +
> >> > >       2 files changed, 2 insertions(+), 1 deletion(-)
> >> > >
> >> > >     diff --git a/include/vlc_codec.h b/include/vlc_codec.h
> >> > >     index 6649ef94cc2..c51d4eba1a7 100644
> >> > >     --- a/include/vlc_codec.h
> >> > >     +++ b/include/vlc_codec.h
> >> > >     @@ -604,7 +604,7 @@ typedef int
> >> > > (*vlc_decoder_device_Open)(vlc_decoder_device *device,
> >> > >        * This function will be hidden in the future. It is now
> >used
> >> > > by opengl vout
> >> > >        * module as a transition.
> >> > >        */
> >> > >     -VLC_USED vlc_decoder_device *
> >> > >     +VLC_API vlc_decoder_device *
> >> > >       vlc_decoder_device_Create(vout_window_t *window);
> >> > >       /**
> >> > >     diff --git a/src/libvlccore.sym b/src/libvlccore.sym
> >> > >     index d1a048be988..ce18e3ad6b6 100644
> >> > >     --- a/src/libvlccore.sym
> >> > >     +++ b/src/libvlccore.sym
> >> > >     @@ -83,6 +83,7 @@ decoder_AbortPictures
> >> > >       decoder_NewAudioBuffer
> >> > >       decoder_UpdateVideoFormat
> >> > >       decoder_UpdateVideoOutput
> >> > >     +vlc_decoder_device_Create
> >> > >       vlc_decoder_device_Hold
> >> > >       vlc_decoder_device_Release
> >> > >       demux_PacketizerDestroy
> >> > >
> >> > >
> >> > > --
> >> > > Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
> >> > > excuser ma brièveté.
> >> > >
> >> > > _______________________________________________
> >> > > vlc-devel mailing list
> >> > > To unsubscribe or modify your subscription options:
> >> > > https://mailman.videolan.org/listinfo/vlc-devel
> >> > >
> >> > _______________________________________________
> >> > vlc-devel mailing list
> >> > To unsubscribe or modify your subscription options:
> >> > https://mailman.videolan.org/listinfo/vlc-devel
> >> _______________________________________________
> >> vlc-devel mailing list
> >> To unsubscribe or modify your subscription options:
> >> https://mailman.videolan.org/listinfo/vlc-devel
> >_______________________________________________
> >vlc-devel mailing list
> >To unsubscribe or modify your subscription options:
> >https://mailman.videolan.org/listinfo/vlc-devel
>
> --
> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel



More information about the vlc-devel mailing list