Skip to content

Commit

Permalink
#3592 stub vpl encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
totaam committed Oct 7, 2022
1 parent 4578beb commit ea57d96
Show file tree
Hide file tree
Showing 6 changed files with 524 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ tests/unittests/test-file*
/xpra/codecs/v4l2/pusher.c
/xpra/codecs/vpx/decoder.c
/xpra/codecs/vpx/encoder.c
/xpra/codecs/vpl/encoder.c
/xpra/codecs/webp/encoder.c
/xpra/codecs/webp/decoder.c
/xpra/codecs/avif/encoder.c
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ def has_header_file(name, isdir=False):
jpeg_decoder_ENABLED = DEFAULT and pkg_config_version("1.4", "libturbojpeg")
avif_ENABLED = DEFAULT and pkg_config_version("0.9", "libavif") and not OSX
vpx_ENABLED = DEFAULT and pkg_config_version("1.8", "vpx") and BITS==64
vpl_ENABLED = False #DEFAULT and pkg_config_version("2.7", "vpl")
enc_ffmpeg_ENABLED = DEFAULT and BITS==64 and pkg_config_version("58.18", "libavcodec")
#opencv currently broken on 32-bit windows (crashes on load):
webcam_ENABLED = DEFAULT and not OSX and not WIN32
Expand Down Expand Up @@ -246,7 +247,7 @@ def has_header_file(name, isdir=False):
"enc_x264", "enc_x265", "enc_ffmpeg", "nvenc",
"cuda_kernels", "cuda_rebuild",
"nvfbc",
"vpx", "webp", "pillow",
"vpx", "vpl", "webp", "pillow",
"spng_decoder", "spng_encoder",
"jpeg_encoder", "jpeg_decoder",
"nvjpeg_encoder", "nvjpeg_decoder", "avif", "argb",
Expand Down Expand Up @@ -352,7 +353,7 @@ def has_header_file(name, isdir=False):
if not cython_ENABLED:
enc_ffmpeg_ENABLED = enc_x264_ENABLED = enc_x265_ENABLED = nvenc_ENABLED = False
csc_swscale_ENABLED = csc_libyuv_ENABLED = csc_cython_ENABLED = False
vpx_ENABLED = nvfbc_ENABLED = dec_avcodec2_ENABLED = False
vpx_ENABLED = nvfbc_ENABLED = dec_avcodec2_ENABLED = vpl_ENABLED = False
spng_decoder_ENABLED = spng_encoder_ENABLED = False
webp_ENABLED = jpeg_encoder_ENABLED = jpeg_decoder_ENABLED = False
server_ENABLED = client_ENABLED = shadow_ENABLED = False
Expand Down Expand Up @@ -1044,6 +1045,7 @@ def clean():
"xpra/buffers/cyxor.c",
"xpra/codecs/vpx/encoder.c",
"xpra/codecs/vpx/decoder.c",
"xpra/codecs/vpl/encoder.c",
"xpra/codecs/nvenc/encoder.c",
"xpra/codecs/nvfbc/fbc_capture_linux.cpp",
"xpra/codecs/nvfbc/fbc_capture_win.cpp",
Expand Down Expand Up @@ -2226,6 +2228,8 @@ def nvcc_compile(cmd):
toggle_packages(vpx_ENABLED, "xpra.codecs.vpx")
tace(vpx_ENABLED, "xpra.codecs.vpx.encoder", "vpx")
tace(vpx_ENABLED, "xpra.codecs.vpx.decoder", "vpx")
toggle_packages(vpl_ENABLED, "xpra.codecs.vpl")
tace(vpl_ENABLED, "xpra.codecs.vpl.encoder", "vpl")
toggle_packages(enc_ffmpeg_ENABLED, "xpra.codecs.enc_ffmpeg")
tace(enc_ffmpeg_ENABLED, "xpra.codecs.enc_ffmpeg.encoder", "libavcodec,libavformat,libavutil", extra_compile_args="-Wno-deprecated-declarations")
toggle_packages(v4l2_ENABLED, "xpra.codecs.v4l2")
Expand Down
5 changes: 3 additions & 2 deletions xpra/codecs/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#these codecs may well not load because we
#do not require the libraries to be installed
NOWARN = ["nvenc", "enc_nvjpeg", "dec_nvjpeg", "nvfbc", "enc_x265", "enc_ffmpeg"]
NOWARN = ["nvenc", "enc_nvjpeg", "dec_nvjpeg", "nvfbc", "enc_x265", "enc_ffmpeg", "enc_vpl"]

SELFTEST = envbool("XPRA_CODEC_SELFTEST", True)
FULL_SELFTEST = envbool("XPRA_CODEC_FULL_SELFTEST", False)
Expand All @@ -37,7 +37,7 @@ def filt(*values):

CSC_CODECS = filt("csc_swscale", "csc_cython", "csc_libyuv")
ENCODER_CODECS = filt("enc_rgb", "enc_pillow", "enc_spng", "enc_webp", "enc_jpeg", "enc_nvjpeg", "enc_avif")
ENCODER_VIDEO_CODECS = filt("enc_vpx", "enc_x264", "enc_x265", "nvenc", "enc_ffmpeg")
ENCODER_VIDEO_CODECS = filt("enc_vpx", "enc_x264", "enc_x265", "nvenc", "enc_ffmpeg", "enc_vpl")
DECODER_CODECS = filt("dec_pillow", "dec_spng", "dec_webp", "dec_jpeg", "dec_nvjpeg", "dec_avif")
DECODER_VIDEO_CODECS = filt("dec_vpx", "dec_avcodec2")
SOURCES = filt("v4l2", "evdi", "drm", "nvfbc")
Expand Down Expand Up @@ -190,6 +190,7 @@ def xpra_codec_import(name, description, top_module, class_module, classname):
"enc_x265" : ("x265 encoder", "enc_x265", "encoder", "Encoder"),
"nvenc" : ("nvenc encoder", "nvenc", "encoder", "Encoder"),
"enc_ffmpeg" : ("ffmpeg encoder", "enc_ffmpeg", "encoder", "Encoder"),
"enc_vpl" : ("oneVPL encoder", "vpl", "encoder", "Encoder"),
#csc:
"csc_swscale" : ("swscale colorspace conversion", "csc_swscale", "colorspace_converter", "ColorspaceConverter"),
"csc_libyuv" : ("libyuv colorspace conversion", "csc_libyuv", "colorspace_converter", "ColorspaceConverter"),
Expand Down
4 changes: 4 additions & 0 deletions xpra/codecs/vpl/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file is part of Xpra.
# Copyright (C) 2022 Antoine Martin <antoine@xpra.org>
# Xpra is released under the terms of the GNU GPL v2, or, at your option, any
# later version. See the file COPYING for details.
Loading

0 comments on commit ea57d96

Please sign in to comment.