[vlc-devel] [PATCH 00/26] Road to push video context

Steve Lhomme robux4 at ycbcr.xyz
Fri Sep 20 16:28:30 CEST 2019


Here is a set of patches that get the decoder device from the vout into the VA
modules (and NVDec) so they can create their video context that will be used
to create the display module and filters.

The split of the decoder_UpdateVideoFormat is similar to what I proposed a few
weeks back.

The DXVA modules don't create their pool yet so it's not fully working as they are
still relying on decoder_NewPicture() but that's the architecture we are leading to.

Steve Lhomme (26):
  opengl: pass the video context rather than the decoder device
  vout: create/release the decoder device when the window is
    enabled/disabled
  decoder: get the decoder device from the vout
  video_output: split vout_Request into vout_HoldDevice and
    vout_RequestDisplay
  input: resource: split the call to vout_Request()
  audio filters: split the call to vout_Request()
  vout: remove unused vout_Request()
  decoder: split the decoder format update in 2 parts
  input: resource: split input_resource_GetVout()
  decoder: move the video_format cleaning for the display in a function
  decoder: split the creation of the vout/decoder device and the display
    module
  video context: add a Create/Release function for the video context
  video context: make the video context structure private
  avcodec: get the decoder device before creating the VA
  avcodec: provide the vlc_decoder_device from the vout thread to the VA
    constructor
  d3d11va: use the decoder device to init the D3D11 device
  dxva2: use the decoder device to init the D3D9 device
  avcodec: vaapi: allocate output pictures locally
  vaapi: use the decoder device to get the VADisplay
  avcodec: do not use a picture from the display before creating the VA
  decoder: allow decoders to set their output vlc_video_context
  avcodec: get the vlc_video_context created by the VA
  nvdec: create a video context for the decoder
  d3d11va: create a video context for the VA
  dxva2: create a video context for the VA
  vaapi: create a dummy video context

 include/vlc_codec.h                           |  38 +++
 include/vlc_picture.h                         |  24 +-
 include/vlc_vout_display.h                    |   2 +-
 modules/codec/avcodec/d3d11va.c               |  47 ++--
 modules/codec/avcodec/dxva2.c                 |  38 +--
 modules/codec/avcodec/va.c                    |   9 +-
 modules/codec/avcodec/va.h                    |   6 +-
 modules/codec/avcodec/vaapi.c                 |  39 +--
 modules/codec/avcodec/video.c                 |  42 +++-
 modules/hw/nvdec/nvdec.c                      |  18 +-
 modules/hw/nvdec/nvdec_gl.c                   |   3 +-
 modules/hw/vdpau/avcodec.c                    |   4 +-
 modules/video_chroma/d3d11_fmt.h              |   3 +-
 modules/video_chroma/d3d9_fmt.h               |   3 +-
 modules/video_output/opengl/converter.h       |   4 +-
 modules/video_output/opengl/converter_vaapi.c |  24 +-
 modules/video_output/opengl/converter_vdpau.c |  25 +-
 modules/video_output/opengl/vout_helper.c     |   2 +-
 modules/video_output/splitter.c               |   8 +-
 modules/video_output/win32/direct3d9.c        |   2 +-
 src/audio_output/filters.c                    |  15 +-
 src/input/decoder.c                           | 231 +++++++++++-------
 src/input/decoder_helpers.c                   |  91 +++++++
 src/input/resource.c                          |  30 ++-
 src/input/resource.h                          |   6 +-
 src/libvlccore.sym                            |   7 +
 src/video_output/display.c                    |  19 +-
 src/video_output/video_output.c               |  41 +++-
 src/video_output/vout_internal.h              |  16 +-
 src/video_output/vout_wrapper.c               |   4 +-
 30 files changed, 584 insertions(+), 217 deletions(-)

-- 
2.17.1



More information about the vlc-devel mailing list