Commit a29321a1 authored by Harish Krupo's avatar Harish Krupo

clients: Add simple-hdr-video-gbm client

The client uses ffmpeg to decode videos and to extract the colorspace
information and HDR metadata. This metadata and colorspace
information is sent using the colorspace-unstable-v1-protocol and
hdr-metadata-v1-protocol to the compositor along with the buffer.
The client supports YUV420 and YUV420_10 bit formats. It converts the
YUV420_10 bit format to P010 (interleaved) format.
P010 format support was introduced in mesa from the following commit:
mesa/mesa@2a2e69f9Signed-off-by: Harish Krupo's avatarHarish Krupo <harishkrupo@gmail.com>
parent 30db870b
......@@ -389,6 +389,58 @@ if simple_hdr_video_deps.length() > 0
)
endif
simple_hdr_video_gbm_opts = get_option('simple-hdr-video')
simple_hdr_video_gbm_deps = []
foreach driver : [ 'intel']
if simple_hdr_video_gbm_opts.contains(driver)
required = true
enabled = true
elif simple_hdr_video_gbm_opts.contains('auto')
required = get_option('auto_features').enabled()
enabled = not get_option('auto_features').disabled()
else
enabled = false
endif
if enabled
dep = dependency('libdrm_' + driver, required: false)
if dep.found()
simple_hdr_video_gbm_deps += dep
config_h.set('HAVE_LIBDRM_' + driver.to_upper(), 1)
elif required
error('simple-hdr-video is configured to use @0@ but it was not found. Or, you can remove @1@ from \'-Dsimple-hdr-video\' list.'.format('libdrm_' + driver, driver))
endif
simple_hdr_video_gbm_deps += dependency('libavutil')
simple_hdr_video_gbm_deps += dependency('libavcodec')
simple_hdr_video_gbm_deps += dependency('libavformat')
simple_hdr_video_gbm_deps += dependency('gbm')
endif
endforeach
if simple_hdr_video_gbm_deps.length() > 0
executable(
'weston-simple-hdr-video-gbm',
'simple-hdr-video-gbm.c',
xdg_shell_client_protocol_h,
xdg_shell_protocol_c,
linux_dmabuf_unstable_v1_client_protocol_h,
linux_dmabuf_unstable_v1_protocol_c,
hdr_metadata_unstable_v1_protocol_c,
hdr_metadata_unstable_v1_client_protocol_h,
colorspace_unstable_v1_protocol_c,
colorspace_unstable_v1_client_protocol_h,
include_directories: include_directories('..'),
dependencies: [
dep_wayland_client,
dep_libdrm,
simple_hdr_video_gbm_deps,
dep_toytoolkit
],
install: true
)
endif
if get_option('shell-desktop')
exe_keyboard = executable(
'weston-keyboard',
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment