Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce autoprobing for decoder driver #19

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

rzerres
Copy link
Contributor

@rzerres rzerres commented Apr 16, 2019

[v1] autoprobing capable decoder drivers

Without the patch, user needs to provide a working environment
variables that define the video_path and media_path
(via: LIBVA-V4L2_REQUEST_MEDIA_PATH and LIBVA_V4L2_REQUEST_VIDEO_PATH)
This patch will introduce needed infrastructure to autoscan suitable devices.

  • introduce libudev support: scan the class 'media' for available v4l2 devices
  • introduce media topology scan: parse entities and interfaces that do provide
    video-decoding functionality (MEDIA_IOC_G_TOPOLOGY)
  • introduce decoder 'vector': store v4l2 entities that offer needed
    decoder capabilities
  • if multiple capable drivers are preset, use the first one
  • respect precedence of given environment variables (with validity check)

- const struct codec (.name, .type)
- refer 'codec_type' enum values to their lexical names
- define a V4L2 buffer type structure (.name, .type)
- refer 'v4l2_buf_type' enum values to their lexical names

Signed-off-by: Ralf Zerres <[email protected]>
@rzerres rzerres force-pushed the wip-decoder-autoscan branch from 1471f37 to f921a1f Compare April 16, 2019 12:36
rzerres added 4 commits April 16, 2019 17:06
- include libudev checks
- include ACLOCAL_AMFLAGS (-I m4)
- include AC_CONFIG_MACRO_DIRS([m4])

Signed-off-by: Ralf Zerres <[email protected]>
- include library checks: libva, libdrm, libudev
- set default_library -> shared
- introduce shared library version
- update configure_file to use mesonconfig.h.in
  this will create an autoconfig.h that only defines
  preprocessor definitions we need when using meson

Signed-off-by: Ralf Zerres <[email protected]>
Without the patch, the user needs to provide working environment
variables that define the video_path and media_path
(via: LIBVA-V4L2_REQUEST_MEDIA_PATH and LIBVA_V4L2_REQUEST_VIDEO_PATH).
This patch will introduce needed infrastructure to autoscan suitable devices.

- introduce libudev support: scan the class 'media' for available v4l2 devices
- introduce media topology scan: parse entities and interfaces that do provide
  video-decoding functionality (MEDIA_IOC_G_TOPOLOGY)
- introduce decoder 'vector': store v4l2 entities that offer needed
  decoder capabilities
- probe streaming capability for given decoder entity
- if multiple capable drivers are present (offering decoding and
  streaming), use the first one
- respect precedence of given environment variables (with validity check)

Signed-off-by: Ralf Zerres <[email protected]>
@rzerres rzerres force-pushed the wip-decoder-autoscan branch from f921a1f to f3a0ea3 Compare April 16, 2019 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant