Fix build on steamrt for the Frame
This commit is contained in:
+3
-1
@@ -204,7 +204,9 @@ if (WIVRN_BUILD_CLIENT)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIVRN_BUILD_CLIENT AND NOT ANDROID)
|
if (WIVRN_BUILD_CLIENT AND NOT ANDROID)
|
||||||
pkg_check_modules(LIBAV_CLIENT REQUIRED IMPORTED_TARGET libavcodec libavutil libswscale)
|
if(NOT WIVRN_USE_V4L2)
|
||||||
|
pkg_check_modules(LIBAV_CLIENT REQUIRED IMPORTED_TARGET libavcodec libavutil libswscale)
|
||||||
|
endif()
|
||||||
find_package(Fontconfig REQUIRED)
|
find_package(Fontconfig REQUIRED)
|
||||||
|
|
||||||
if (WIVRN_USE_SYSTEM_OPENXR)
|
if (WIVRN_USE_SYSTEM_OPENXR)
|
||||||
|
|||||||
@@ -157,6 +157,28 @@
|
|||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"WIVRN_USE_SYSTEM_BOOST": "OFF"
|
"WIVRN_USE_SYSTEM_BOOST": "OFF"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "frame",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"cacheVariables": {
|
||||||
|
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
|
||||||
|
"CMAKE_INTERPROCEDURAL_OPTIMIZATION": "ON",
|
||||||
|
"CMAKE_BUILD_TYPE": "Release",
|
||||||
|
"WIVRN_BUILD_CLIENT": "ON",
|
||||||
|
"WIVRN_BUILD_SERVER": "OFF",
|
||||||
|
"WIVRN_BUILD_SERVER_LIBRARY": "OFF",
|
||||||
|
"WIVRN_BUILD_DASHBOARD": "OFF",
|
||||||
|
"WIVRN_BUILD_DISSECTOR": "OFF",
|
||||||
|
"WIVRN_BUILD_WIVRNCTL": "OFF",
|
||||||
|
"WIVRN_USE_PIPEWIRE": "ON",
|
||||||
|
"WIVRN_USE_V4L2": "ON",
|
||||||
|
"WIVRN_USE_SYSTEM_BOOST": "OFF",
|
||||||
|
"WIVRN_USE_SYSTEM_LIBKTX": "OFF",
|
||||||
|
"WIVRN_USE_SYSTEM_OPENXR": "OFF",
|
||||||
|
"WIVRN_COMPRESS_GLB": "ON",
|
||||||
|
"WIVRN_WERROR": "ON"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"buildPresets": [
|
"buildPresets": [
|
||||||
|
|||||||
@@ -108,16 +108,17 @@ else()
|
|||||||
target_link_libraries(wivrn openxr_loader)
|
target_link_libraries(wivrn openxr_loader)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(wivrn PkgConfig::LIBAV_CLIENT Fontconfig::Fontconfig CURL::libcurl)
|
target_link_libraries(wivrn Fontconfig::Fontconfig CURL::libcurl)
|
||||||
|
|
||||||
file(GLOB PLATFORM_SOURCE CONFIGURE_DEPENDS
|
|
||||||
"decoder/ffmpeg/*.cpp")
|
|
||||||
|
|
||||||
if(WIVRN_USE_V4L2)
|
if(WIVRN_USE_V4L2)
|
||||||
file(GLOB CLIENT_V4L2_SOURCE CONFIGURE_DEPENDS
|
file(GLOB CLIENT_V4L2_SOURCE CONFIGURE_DEPENDS
|
||||||
"decoder/v4l2/*.cpp")
|
"decoder/v4l2/*.cpp")
|
||||||
list(APPEND PLATFORM_SOURCE ${CLIENT_V4L2_SOURCE})
|
list(APPEND PLATFORM_SOURCE ${CLIENT_V4L2_SOURCE})
|
||||||
target_compile_definitions(wivrn PRIVATE WIVRN_USE_V4L2)
|
target_compile_definitions(wivrn PRIVATE WIVRN_USE_V4L2)
|
||||||
|
else()
|
||||||
|
target_link_libraries(wivrn PkgConfig::LIBAV_CLIENT)
|
||||||
|
file(GLOB PLATFORM_SOURCE CONFIGURE_DEPENDS
|
||||||
|
"decoder/ffmpeg/*.cpp")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIVRN_USE_PIPEWIRE)
|
if(WIVRN_USE_PIPEWIRE)
|
||||||
|
|||||||
@@ -21,14 +21,13 @@
|
|||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
#include "decoder/android/android_decoder.h"
|
#include "decoder/android/android_decoder.h"
|
||||||
#else
|
#else
|
||||||
#include "decoder/ffmpeg/ffmpeg_decoder.h"
|
|
||||||
#ifdef WIVRN_USE_V4L2
|
#ifdef WIVRN_USE_V4L2
|
||||||
#include "decoder/v4l2/v4l2_decoder.h"
|
#include "decoder/v4l2/v4l2_decoder.h"
|
||||||
|
#else
|
||||||
|
#include "decoder/ffmpeg/ffmpeg_decoder.h"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#include "decoder/raw_decoder.h"
|
#include "decoder/raw_decoder.h"
|
||||||
#include "spdlog/spdlog.h"
|
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
wivrn::decoder::~decoder() = default;
|
wivrn::decoder::~decoder() = default;
|
||||||
|
|
||||||
@@ -54,21 +53,10 @@ std::shared_ptr<wivrn::decoder> wivrn::decoder::make(
|
|||||||
stream_index,
|
stream_index,
|
||||||
scene,
|
scene,
|
||||||
acc);
|
acc);
|
||||||
|
#elifdef WIVRN_USE_V4L2
|
||||||
|
return std::make_shared<wivrn::v4l2::decoder>(
|
||||||
|
device, phys_dev, vk_queue_family_index, description, stream_index, scene, acc);
|
||||||
#else
|
#else
|
||||||
#ifdef WIVRN_USE_V4L2
|
|
||||||
if (wivrn::v4l2::decoder::available_for(description.codec[stream_index]))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return std::make_shared<wivrn::v4l2::decoder>(
|
|
||||||
device, phys_dev, vk_queue_family_index, description, stream_index, scene, acc);
|
|
||||||
}
|
|
||||||
catch (const std::exception & e)
|
|
||||||
{
|
|
||||||
spdlog::warn("V4L2 iris decoder initialization failed: {}. Falling back to FFmpeg.", e.what());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return std::make_shared<wivrn::ffmpeg::decoder>(
|
return std::make_shared<wivrn::ffmpeg::decoder>(
|
||||||
device, phys_dev, description, stream_index, scene, acc);
|
device, phys_dev, description, stream_index, scene, acc);
|
||||||
#endif
|
#endif
|
||||||
@@ -90,15 +78,10 @@ static std::vector<wivrn::video_codec> supported_codecs_()
|
|||||||
std::vector<wivrn::video_codec> res;
|
std::vector<wivrn::video_codec> res;
|
||||||
#ifdef __ANDROID__
|
#ifdef __ANDROID__
|
||||||
wivrn::android::decoder::supported_codecs(res);
|
wivrn::android::decoder::supported_codecs(res);
|
||||||
#else
|
#elifdef WIVRN_USE_V4L2
|
||||||
#ifdef WIVRN_USE_V4L2
|
|
||||||
wivrn::v4l2::decoder::supported_codecs(res);
|
wivrn::v4l2::decoder::supported_codecs(res);
|
||||||
#endif
|
#else
|
||||||
std::vector<wivrn::video_codec> software_codecs;
|
wivrn::ffmpeg::decoder::supported_codecs(res);
|
||||||
wivrn::ffmpeg::decoder::supported_codecs(software_codecs);
|
|
||||||
for (auto codec: software_codecs)
|
|
||||||
if (not std::ranges::contains(res, codec))
|
|
||||||
res.push_back(codec);
|
|
||||||
#endif
|
#endif
|
||||||
res.push_back(wivrn::video_codec::raw);
|
res.push_back(wivrn::video_codec::raw);
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
Reference in New Issue
Block a user