diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/BUILDDATE kodi-21.0+git20230503.0300-acaf1ae685/BUILDDATE --- kodi-21.0+git20230501.0300-54e9471bc6/BUILDDATE 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/BUILDDATE 2013-05-12 08:41:54.000000000 +0000 @@ -1 +1 @@ -20230501 +20230503 diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/cmake/modules/FindPlayerAPIs.cmake kodi-21.0+git20230503.0300-acaf1ae685/cmake/modules/FindPlayerAPIs.cmake --- kodi-21.0+git20230501.0300-54e9471bc6/cmake/modules/FindPlayerAPIs.cmake 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/cmake/modules/FindPlayerAPIs.cmake 2013-05-12 08:41:54.000000000 +0000 @@ -23,7 +23,7 @@ find_library(PLAYERAPIS_LIBRARY NAMES playerAPIs PATHS ${PC_PLAYERAPIS_LIBDIR}) -set(PLAYERAPIS_VERSION 1.0.0) +set(PLAYERAPIS_VERSION ${PC_PLAYERAPIS_VERSION}) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(PlayerAPIs diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/debian/changelog kodi-21.0+git20230503.0300-acaf1ae685/debian/changelog --- kodi-21.0+git20230501.0300-54e9471bc6/debian/changelog 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/debian/changelog 2013-05-12 08:41:54.000000000 +0000 @@ -1,4 +1,4 @@ -kodi (6:21.0+git20230501.0300-54e9471bc6-0~jammy) jammy; urgency=medium +kodi (6:21.0+git20230503.0300-acaf1ae685-0~jammy) jammy; urgency=medium [ kodi ] * autogenerated dummy changelog diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/VERSION kodi-21.0+git20230503.0300-acaf1ae685/VERSION --- kodi-21.0+git20230501.0300-54e9471bc6/VERSION 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/VERSION 2013-05-12 08:41:54.000000000 +0000 @@ -1 +1 @@ -54e9471bc6 +acaf1ae685 diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/AudioEngine/Sinks/AESinkStarfish.cpp kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/AudioEngine/Sinks/AESinkStarfish.cpp --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/AudioEngine/Sinks/AESinkStarfish.cpp 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/AudioEngine/Sinks/AESinkStarfish.cpp 2013-05-12 08:41:54.000000000 +0000 @@ -13,9 +13,22 @@ #include "utils/log.h" #include "xbmc/cores/AudioEngine/AESinkFactory.h" -#include #include +using namespace std::chrono_literals; + +namespace +{ +constexpr unsigned int STARFISH_AUDIO_BUFFERS = 8; +constexpr unsigned int AC3_SYNCFRAME_SIZE = 2560; + +static constexpr auto ms_audioCodecMap = make_map({ + {CAEStreamInfo::STREAM_TYPE_AC3, "AC3"}, + {CAEStreamInfo::STREAM_TYPE_EAC3, "AC3 PLUS"}, +}); + +} // namespace + void CAESinkStarfish::Register() { AE::AESinkRegEntry entry; @@ -44,54 +57,33 @@ // PCM disabled for now as the latency is just too high, needs more research // Thankfully, ALSA or PulseAudio do work as an alternative for PCM content - /*info.m_dataFormats.push_back(AE_FMT_U8); - info.m_dataFormats.push_back(AE_FMT_S16NE); - info.m_dataFormats.push_back(AE_FMT_S16LE); - info.m_dataFormats.push_back(AE_FMT_S16BE); - info.m_dataFormats.push_back(AE_FMT_S32NE); - info.m_dataFormats.push_back(AE_FMT_S32LE); - info.m_dataFormats.push_back(AE_FMT_S32BE); - info.m_dataFormats.push_back(AE_FMT_FLOAT); - info.m_dataFormats.push_back(AE_FMT_DOUBLE);*/ - info.m_dataFormats.push_back(AE_FMT_RAW); + info.m_dataFormats.emplace_back(AE_FMT_RAW); info.m_deviceType = AE_DEVTYPE_IEC958; - info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_AC3); - //info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_EAC3); - //info.m_streamTypes.push_back(CAEStreamInfo::STREAM_TYPE_TRUEHD); - - info.m_sampleRates.push_back(48000); - info.m_sampleRates.push_back(44100); - info.m_sampleRates.push_back(32000); - info.m_sampleRates.push_back(24000); - info.m_sampleRates.push_back(22050); - info.m_sampleRates.push_back(16000); - info.m_sampleRates.push_back(12000); - info.m_sampleRates.push_back(8000); + info.m_streamTypes.emplace_back(CAEStreamInfo::STREAM_TYPE_AC3); + info.m_streamTypes.emplace_back(CAEStreamInfo::STREAM_TYPE_EAC3); - list.push_back(info); + list.emplace_back(info); } CAESinkStarfish::CAESinkStarfish() : m_starfishMediaAPI(std::make_unique()) { } -CAESinkStarfish::~CAESinkStarfish() -{ -} +CAESinkStarfish::~CAESinkStarfish() = default; bool CAESinkStarfish::Initialize(AEAudioFormat& format, std::string& device) { m_format = format; - m_pts = 0; + m_pts = 0ns; if (m_format.m_dataFormat != AE_FMT_RAW) + { + CLog::LogF(LOGERROR, "CAESinkStarfish: Unsupported format PCM"); return false; + } m_format.m_frameSize = 1; - CLog::Log(LOGDEBUG, "CAESinkStarfish::Initialize Channel count is {}", - m_format.m_channelLayout.Count()); - format = m_format; CVariant payload; @@ -106,77 +98,36 @@ payload["option"]["transmission"]["contentsType"] = "LIVE"; // "LIVE", "WEBRTC" payload["option"]["lowDelayMode"] = true; - /*payload["option"]["bufferControl"]["preBufferTime"] = 0; - payload["option"]["bufferControl"]["userBufferCtrl"] = true; - payload["option"]["bufferControl"]["bufferingMinTime"] = 0; - payload["option"]["bufferControl"]["bufferingMaxTime"] = 100;*/ - m_bufferSize = 12288; - if (m_format.m_dataFormat == AE_FMT_RAW) + switch (m_format.m_streamInfo.m_type) { - switch (m_format.m_streamInfo.m_type) + case CAEStreamInfo::STREAM_TYPE_AC3: { - case CAEStreamInfo::STREAM_TYPE_AC3: - payload["option"]["externalStreamingInfo"]["contents"]["codec"]["audio"] = "AC3"; - if (!format.m_streamInfo.m_ac3FrameSize) - format.m_streamInfo.m_ac3FrameSize = 2560; - format.m_frames = format.m_streamInfo.m_ac3FrameSize; - m_bufferSize = format.m_frames * 8; - break; - case CAEStreamInfo::STREAM_TYPE_EAC3: - payload["option"]["externalStreamingInfo"]["contents"]["codec"]["audio"] = "AC3 PLUS"; - payload["option"]["externalStreamingInfo"]["contents"]["ac3PlusInfo"]["channels"] = - m_format.m_streamInfo.m_channels; - payload["option"]["externalStreamingInfo"]["contents"]["ac3PlusInfo"]["frequency"] = - static_cast(m_format.m_streamInfo.m_sampleRate) / 1000; - - if (!format.m_streamInfo.m_ac3FrameSize) - format.m_streamInfo.m_ac3FrameSize = 2560; - format.m_frames = format.m_streamInfo.m_ac3FrameSize; - m_bufferSize = format.m_frames * 8; - break; - default: - CLog::Log(LOGDEBUG, "CAESinkStarfish::Initialize Unsupported format {}", - m_format.m_streamInfo.m_type); - return false; + if (!format.m_streamInfo.m_ac3FrameSize) + format.m_streamInfo.m_ac3FrameSize = AC3_SYNCFRAME_SIZE; + format.m_frames = format.m_streamInfo.m_ac3FrameSize; + m_bufferSize = format.m_frames * STARFISH_AUDIO_BUFFERS; + break; } - } - else - { - payload["option"]["externalStreamingInfo"]["contents"]["pcmInfo"]["bitsPerSample"] = - CAEUtil::DataFormatToBits(m_format.m_dataFormat); - payload["option"]["externalStreamingInfo"]["contents"]["pcmInfo"]["sampleRate"] = - m_format.m_sampleRate; - payload["option"]["externalStreamingInfo"]["contents"]["pcmInfo"]["layout"] = - AE_IS_PLANAR(m_format.m_dataFormat) ? "non-interleaved" : "interleaved"; - - std::string channel; - switch (m_format.m_channelLayout.Count()) + case CAEStreamInfo::STREAM_TYPE_EAC3: { - case 1: - channel = "mono"; - break; - case 2: - channel = "stereo"; - break; - case 6: - channel = "6-channel"; - break; - default: - CLog::Log(LOGDEBUG, "CAESinkStarfish::Initialize Unsupported channel count {}", - m_format.m_channelLayout.Count()); - return false; + payload["option"]["externalStreamingInfo"]["contents"]["ac3PlusInfo"]["channels"] = + m_format.m_streamInfo.m_channels; + payload["option"]["externalStreamingInfo"]["contents"]["ac3PlusInfo"]["frequency"] = + static_cast(m_format.m_streamInfo.m_sampleRate) / 1000; + + if (!format.m_streamInfo.m_ac3FrameSize) + format.m_streamInfo.m_ac3FrameSize = AC3_SYNCFRAME_SIZE; + format.m_frames = format.m_streamInfo.m_ac3FrameSize; + m_bufferSize = format.m_frames * STARFISH_AUDIO_BUFFERS; + break; } - payload["option"]["externalStreamingInfo"]["contents"]["pcmInfo"]["channelMode"] = channel; - auto pcmFormat = AEFormatToStarfishFormat(m_format.m_dataFormat); - if (pcmFormat.empty()) - { - CLog::Log(LOGWARNING, "CAESinkStarfish::Initialize PCM format is empty"); + default: + CLog::LogF(LOGDEBUG, "CAESinkStarfish: Unsupported format {}", m_format.m_streamInfo.m_type); return false; - } - payload["option"]["externalStreamingInfo"]["contents"]["pcmInfo"]["format"] = pcmFormat.data(); - payload["option"]["externalStreamingInfo"]["contents"]["codec"]["audio"] = "PCM"; } + payload["option"]["externalStreamingInfo"]["contents"]["codec"]["audio"] = + ms_audioCodecMap.at(m_format.m_streamInfo.m_type).data(); payload["option"]["externalStreamingInfo"]["bufferingCtrInfo"]["preBufferByte"] = 0; payload["option"]["externalStreamingInfo"]["bufferingCtrInfo"]["bufferMinLevel"] = 0; @@ -198,10 +149,10 @@ CJSONVariantWriter::Write(payloadArgs, json, true); m_starfishMediaAPI->notifyForeground(); - CLog::Log(LOGDEBUG, "CAESinkStarfish: Sending Load payload {}", json); + CLog::LogFC(LOGDEBUG, LOGAUDIO, "CAESinkStarfish: Sending Load payload {}", json); if (!m_starfishMediaAPI->Load(json.c_str(), &CAESinkStarfish::PlayerCallback, this)) { - CLog::Log(LOGERROR, "CAESinkStarfish::Initialize Load failed"); + CLog::LogF(LOGERROR, "CAESinkStarfish: Load failed"); return false; } @@ -216,7 +167,11 @@ double CAESinkStarfish::GetCacheTotal() { if (m_format.m_dataFormat == AE_FMT_RAW) - return 8 * m_format.m_streamInfo.GetDuration(); + { + auto frameTimeSeconds = std::chrono::duration_cast>( + std::chrono::duration(m_format.m_streamInfo.GetDuration())); + return STARFISH_AUDIO_BUFFERS * frameTimeSeconds.count(); + } else return 0.0; } @@ -229,24 +184,21 @@ unsigned int CAESinkStarfish::AddPackets(uint8_t** data, unsigned int frames, unsigned int offset) { CVariant payload; - auto buffer = data[0] + offset * m_format.m_frameSize; + uint8_t* buffer = data[0] + offset * m_format.m_frameSize; payload["bufferAddr"] = fmt::format("{:#x}", reinterpret_cast(buffer)); payload["bufferSize"] = frames * m_format.m_frameSize; - payload["pts"] = m_pts; + payload["pts"] = m_pts.count(); payload["esData"] = 2; - int64_t frameTime; - if (m_format.m_dataFormat == AE_FMT_RAW) - frameTime = static_cast(m_format.m_streamInfo.GetDuration() * 1000000.0); - else - frameTime = 1000000000 * frames / m_format.m_sampleRate; + auto frameTime = std::chrono::duration_cast( + std::chrono::duration(m_format.m_streamInfo.GetDuration())); m_pts += frameTime; std::string json; CJSONVariantWriter::Write(payload, json, true); - auto result = m_starfishMediaAPI->Feed(json.c_str()); + std::string result = m_starfishMediaAPI->Feed(json.c_str()); while (result.find("BufferFull") != std::string::npos) { std::this_thread::sleep_for(std::chrono::nanoseconds(frameTime)); @@ -256,14 +208,12 @@ if (result.find("Ok") != std::string::npos) return frames; - CLog::Log(LOGWARNING, "CAESinkStarfish::AddPackets Buffer submit returned error: {}", result); + CLog::LogF(LOGWARNING, "CAESinkStarfish: Buffer submit returned error: {}", result); return 0; } void CAESinkStarfish::AddPause(unsigned int millis) { - //m_starfishMediaAPI->pushAudioDiscontinuityGap(m_playtime, m_playtime + millis * 1000000); - //m_pts += millis * 1000000; m_starfishMediaAPI->Pause(); std::this_thread::sleep_for(std::chrono::milliseconds(millis)); m_starfishMediaAPI->Play(); @@ -271,8 +221,9 @@ void CAESinkStarfish::GetDelay(AEDelayStatus& status) { - constexpr double hwLatency = 0.25; - status.SetDelay(hwLatency + static_cast(m_delay) / 1000000000.0); + constexpr auto hwLatency = 250ms; + status.SetDelay( + std::chrono::duration_cast>(m_delay + hwLatency).count()); } void CAESinkStarfish::Drain() @@ -280,16 +231,6 @@ m_starfishMediaAPI->flush(); } -bool CAESinkStarfish::HasVolume() -{ - return false; -} - -void CAESinkStarfish::SetVolume(float volume) -{ - //m_starfishMediaAPI->SetVolume(volume * 100); -} - void CAESinkStarfish::PlayerCallback(const int32_t type, const int64_t numValue, const char* strValue) @@ -297,20 +238,15 @@ switch (type) { case PF_EVENT_TYPE_FRAMEREADY: - m_playtime = numValue; - m_delay = m_pts - numValue; + m_delay = m_pts - std::chrono::nanoseconds(numValue); break; case PF_EVENT_TYPE_STR_STATE_UPDATE__LOADCOMPLETED: m_starfishMediaAPI->Play(); break; default: - std::string logstr; - if (strValue) - { - logstr = strValue; - } - CLog::Log(LOGDEBUG, "CAESinkStarfish::PlayerCallback type: {}, numValue: {}, strValue: {}", - type, numValue, logstr); + std::string logstr = strValue != nullptr ? strValue : ""; + CLog::LogF(LOGDEBUG, "CAESinkStarfish: type: {}, numValue: {}, strValue: {}", type, numValue, + logstr); } } @@ -321,30 +257,3 @@ { static_cast(data)->PlayerCallback(type, numValue, strValue); } - -std::string_view CAESinkStarfish::AEFormatToStarfishFormat(AEDataFormat format) -{ - switch (format) - { - case AE_FMT_U8: - return "U8"; - case AE_FMT_S16NE: - return "S16LE"; - case AE_FMT_S16LE: - return "S16LE"; - case AE_FMT_S16BE: - return "S16BE"; - case AE_FMT_S32NE: - return "S32LE"; - case AE_FMT_S32LE: - return "S32LE"; - case AE_FMT_S32BE: - return "S32BE"; - case AE_FMT_FLOAT: - return "F32LE"; - case AE_FMT_DOUBLE: - return "F64LE"; - default: - return ""; - } -} diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/AudioEngine/Sinks/AESinkStarfish.h kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/AudioEngine/Sinks/AESinkStarfish.h --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/AudioEngine/Sinks/AESinkStarfish.h 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/AudioEngine/Sinks/AESinkStarfish.h 2013-05-12 08:41:54.000000000 +0000 @@ -11,6 +11,9 @@ #include "cores/AudioEngine/Interfaces/AESink.h" #include "cores/AudioEngine/Utils/AEDeviceInfo.h" #include "cores/AudioEngine/Utils/AEUtil.h" +#include "utils/Map.h" + +#include #include @@ -33,8 +36,6 @@ void AddPause(unsigned int millis) override; void GetDelay(AEDelayStatus& status) override; void Drain() override; - bool HasVolume() override; - void SetVolume(float volume) override; private: void PlayerCallback(const int32_t type, const int64_t numValue, const char* strValue); @@ -43,12 +44,9 @@ const char* strValue, void* data); - std::string_view AEFormatToStarfishFormat(AEDataFormat format); - std::unique_ptr m_starfishMediaAPI; AEAudioFormat m_format; - int64_t m_pts{0}; + std::chrono::nanoseconds m_pts{0}; int64_t m_bufferSize{0}; - int64_t m_delay{0}; - int64_t m_playtime{0}; + std::chrono::nanoseconds m_delay{0}; }; diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/RetroPlayer/process/RPProcessInfo.h kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/RetroPlayer/process/RPProcessInfo.h --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/RetroPlayer/process/RPProcessInfo.h 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/RetroPlayer/process/RPProcessInfo.h 2013-05-12 08:41:54.000000000 +0000 @@ -17,7 +17,10 @@ #include #include +extern "C" +{ #include +} class CDataCacheCore; diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/RetroPlayer/rendering/RenderTranslator.h kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/RetroPlayer/rendering/RenderTranslator.h --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/RetroPlayer/rendering/RenderTranslator.h 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/RetroPlayer/rendering/RenderTranslator.h 2013-05-12 08:41:54.000000000 +0000 @@ -10,7 +10,10 @@ #include "cores/GameSettings.h" +extern "C" +{ #include +} namespace KODI { diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecStarfish.cpp kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecStarfish.cpp --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecStarfish.cpp 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecStarfish.cpp 2013-05-12 08:41:54.000000000 +0000 @@ -22,7 +22,6 @@ #include "utils/BitstreamConverter.h" #include "utils/CPUInfo.h" #include "utils/JSONVariantWriter.h" -#include "utils/TimeUtils.h" #include "utils/log.h" #include "windowing/wayland/WinSystemWaylandWebOS.h" @@ -30,6 +29,7 @@ #include using namespace KODI::MESSAGING; +using namespace std::chrono_literals; CDVDVideoCodecStarfish::CDVDVideoCodecStarfish(CProcessInfo& processInfo) : CDVDVideoCodec(processInfo), m_starfishMediaAPI(std::make_unique()) @@ -59,11 +59,11 @@ // allow only 1 instance here if (ms_instanceGuard.exchange(true)) { - CLog::Log(LOGERROR, "CDVDVideoCodecStarfish::Open - InstanceGuard locked"); + CLog::LogF(LOGERROR, "CDVDVideoCodecStarfish: InstanceGuard locked"); return false; } - auto ok = OpenInternal(hints, options); + bool ok = OpenInternal(hints, options); if (!ok) ms_instanceGuard.exchange(false); @@ -79,48 +79,38 @@ if (hints.cryptoSession) { - CLog::Log(LOGERROR, "CDVDVideoCodecStarfish::OpenInternal CryptoSessions unsupported"); + CLog::LogF(LOGERROR, "CDVDVideoCodecStarfish: CryptoSessions unsupported"); return false; } if (!hints.width || !hints.height) { - CLog::Log(LOGERROR, "CDVDVideoCodecStarfish::OpenInternal - {}", "null size, cannot handle"); + CLog::LogF(LOGERROR, "CDVDVideoCodecStarfish: {}", "null size, cannot handle"); return false; } - CLog::Log( - LOGDEBUG, - "CDVDVideoCodecStarfish::OpenInternal hints: Width {} x Height {}, Fpsrate {} / Fpsscale " - "{}, CodecID {}, Level {}, Profile {}, PTS_invalid {}, Tag {}, Extradata-Size: {}", - hints.width, hints.height, hints.fpsrate, hints.fpsscale, hints.codec, hints.level, - hints.profile, hints.ptsinvalid, hints.codec_tag, hints.extrasize); + CLog::LogF(LOGDEBUG, + "CDVDVideoCodecStarfish: hints: Width {} x Height {}, Fpsrate {} / Fpsscale {}, " + "CodecID {}, Level {}, Profile {}, PTS_invalid {}, Tag {}, Extradata-Size: {}", + hints.width, hints.height, hints.fpsrate, hints.fpsscale, hints.codec, hints.level, + hints.profile, hints.ptsinvalid, hints.codec_tag, hints.extrasize); + + if (ms_codecMap.find(hints.codec) == ms_codecMap.cend() || + ms_formatInfoMap.find(hints.codec) == ms_formatInfoMap.cend()) + { + CLog::LogF(LOGDEBUG, "CDVDVideoCodecStarfish: Unsupported hints.codec({})", hints.codec); + return false; + } + + m_codecname = ms_codecMap.at(hints.codec); + m_formatname = ms_formatInfoMap.at(hints.codec); m_hints = hints; switch (m_hints.codec) { - case AV_CODEC_ID_MPEG2VIDEO: - m_formatname = "starfish-mpeg2"; - m_codecname = "MPEG2"; - break; - case AV_CODEC_ID_MPEG4: - m_formatname = "starfish-mpeg4"; - m_codecname = "MPEG4"; - break; - case AV_CODEC_ID_VP8: - m_formatname = "starfish-vp8"; - m_codecname = "VP8"; - break; - case AV_CODEC_ID_VP9: - m_formatname = "starfish-vp9"; - m_codecname = "VP9"; - break; case AV_CODEC_ID_AVS: case AV_CODEC_ID_CAVS: case AV_CODEC_ID_H264: - m_formatname = "starfish-h264"; - m_codecname = "H264"; - // check for h264-avcC and convert to h264-annex-b if (m_hints.extradata && !m_hints.cryptoSession) { @@ -134,9 +124,6 @@ break; case AV_CODEC_ID_HEVC: { - m_formatname = "starfish-hevc"; - m_codecname = "H265"; - bool isDvhe = (m_hints.codec_tag == MKTAG('d', 'v', 'h', 'e')); bool isDvh1 = (m_hints.codec_tag == MKTAG('d', 'v', 'h', '1')); @@ -152,23 +139,14 @@ if (isDvhe || isDvh1) { - bool supportsDovi = true; - - CLog::Log(LOGDEBUG, - "CDVDVideoCodecStarfish::OpenInternal Dolby Vision playback support: {}", - supportsDovi); + m_formatname = isDvhe ? "starfish-dvhe" : "starfish-dvh1"; - if (supportsDovi) - { - m_formatname = isDvhe ? "starfish-dvhe" : "starfish-dvh1"; - - payloadArg["option"]["externalStreamingInfo"]["contents"]["DolbyHdrInfo"] - ["encryptionType"] = "clear"; //"clear", "bl", "el", "all" - payloadArg["option"]["externalStreamingInfo"]["contents"]["DolbyHdrInfo"]["profileId"] = - m_hints.dovi.dv_profile; // profile 0-9 - payloadArg["option"]["externalStreamingInfo"]["contents"]["DolbyHdrInfo"]["trackType"] = - m_hints.dovi.el_present_flag ? "dual" : "single"; // "single" / "dual" - } + payloadArg["option"]["externalStreamingInfo"]["contents"]["DolbyHdrInfo"] + ["encryptionType"] = "clear"; //"clear", "bl", "el", "all" + payloadArg["option"]["externalStreamingInfo"]["contents"]["DolbyHdrInfo"]["profileId"] = + m_hints.dovi.dv_profile; // profile 0-9 + payloadArg["option"]["externalStreamingInfo"]["contents"]["DolbyHdrInfo"]["trackType"] = + m_hints.dovi.el_present_flag ? "dual" : "single"; // "single" / "dual" } // check for hevc-hvcC and convert to h265-annex-b @@ -183,25 +161,16 @@ } } break; - case AV_CODEC_ID_VC1: - m_formatname = "starfish-vc1"; - m_codecname = "VC1"; - break; - case AV_CODEC_ID_AV1: - m_formatname = "starfish-av1"; - m_codecname = "AV1"; - break; default: - CLog::Log(LOGDEBUG, "CDVDVideoCodecStarfish::OpenInternal Unknown hints.codec({})", - hints.codec); - return false; + break; } m_starfishMediaAPI->notifyForeground(); - auto exportedWindowName = - static_cast(CServiceBroker::GetWinSystem()) - ->GetExportedWindowName(); + using namespace KODI::WINDOWING::WAYLAND; + auto winSystem = static_cast(CServiceBroker::GetWinSystem()); + + std::string exportedWindowName = winSystem->GetExportedWindowName(); payloadArg["mediaTransportType"] = "BUFFERSTREAM"; payloadArg["option"]["windowId"] = exportedWindowName; @@ -225,28 +194,16 @@ payloadArg["option"]["seekMode"] = "late_Iframe"; payloadArg["option"]["lowDelayMode"] = true; - /*payloadArg["option"]["externalStreamingInfo"]["bufferingCtrInfo"]["preBufferByte"] = 0; - payloadArg["option"]["externalStreamingInfo"]["bufferingCtrInfo"]["bufferMinLevel"] = 0; - payloadArg["option"]["externalStreamingInfo"]["bufferingCtrInfo"]["bufferMaxLevel"] = 0; - payloadArg["option"]["externalStreamingInfo"]["bufferingCtrInfo"]["qBufferLevelVideo"] = 1048576; - payloadArg["option"]["externalStreamingInfo"]["bufferingCtrInfo"]["srcBufferLevelVideo"]["minimum"] = 1048576; - payloadArg["option"]["externalStreamingInfo"]["bufferingCtrInfo"]["srcBufferLevelVideo"]["maximum"] = 8388608;*/ - - /*payloadArg["option"]["bufferControl"]["preBufferTime"] = 1000000000; - payloadArg["option"]["bufferControl"]["userBufferCtrl"] = true; - payloadArg["option"]["bufferControl"]["bufferingMinTime"] = 0; - payloadArg["option"]["bufferControl"]["bufferingMaxTime"] = 1000000000;*/ - payloadArgs["args"] = CVariant(CVariant::VariantTypeArray); payloadArgs["args"].push_back(std::move(payloadArg)); std::string payload; CJSONVariantWriter::Write(payloadArgs, payload, true); - CLog::Log(LOGDEBUG, "CDVDVideoCodecStarfish::OpenInternal Sending Load payload {}", payload); + CLog::LogFC(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecStarfish: Sending Load payload {}", payload); if (!m_starfishMediaAPI->Load(payload.c_str(), &CDVDVideoCodecStarfish::PlayerCallback, this)) { - CLog::Log(LOGERROR, "CDVDVideoCodecStarfish::OpenInternal Load failed"); + CLog::LogF(LOGERROR, "CDVDVideoCodecStarfish: Load failed"); return false; } @@ -254,7 +211,7 @@ m_codecControlFlags = 0; - CLog::Log(LOGINFO, "CDVDVideoCodecStarfish::OpenInternal Starfish {}", m_codecname); + CLog::LogF(LOGINFO, "CDVDVideoCodecStarfish: Starfish {}", m_codecname); // first make sure all properties are reset. m_videobuffer.Reset(); @@ -296,17 +253,20 @@ if (!m_opened) return false; - double pts = packet.pts; - double dts = packet.dts; + auto pts = std::chrono::duration_cast( + std::chrono::duration>(packet.pts)); + auto dts = std::chrono::duration_cast( + std::chrono::duration>(packet.pts)); + + CLog::LogFC(LOGDEBUG, LOGVIDEO, + "CDVDVideoCodecStarfish: dts:{} ns pts:{} ns sz:{} current state {}", dts.count(), + pts.count(), packet.iSize, m_state); - if (CServiceBroker::GetLogging().CanLogComponent(LOGVIDEO)) - CLog::Log(LOGDEBUG, - "CDVDVideoCodecStarfish::AddData dts:{:0.2f} pts:{:0.2f} sz:{} " - "current state ({})", - dts, pts, packet.iSize, static_cast(m_state)); + if (packet.dts == DVD_NOPTS_VALUE) + dts = 0ns; if (m_hints.ptsinvalid) - pts = DVD_NOPTS_VALUE; + pts = dts; uint8_t* pData = packet.pData; size_t iSize = packet.iSize; @@ -318,7 +278,7 @@ if (m_state == StarfishState::FLUSHED && !m_bitstream->CanStartDecode()) { - CLog::Log(LOGDEBUG, "CDVDVideoCodecStarfish::AddData: waiting for keyframe (bitstream)"); + CLog::LogF(LOGDEBUG, "CDVDVideoCodecStarfish: Waiting for keyframe (bitstream)"); return true; } @@ -328,8 +288,11 @@ if (m_state == StarfishState::FLUSHED) { - if (pts > 0) - m_starfishMediaAPI->Seek(std::to_string(DVD_TIME_TO_MSEC(pts)).c_str()); + if (pts > 0ns) + { + auto seekTime = std::chrono::duration_cast(pts).count(); + m_starfishMediaAPI->Seek(std::to_string(seekTime).c_str()); + } m_state = StarfishState::RUNNING; } @@ -338,13 +301,13 @@ CVariant payload; payload["bufferAddr"] = fmt::format("{:#x}", reinterpret_cast(pData)); payload["bufferSize"] = iSize; - payload["pts"] = DVD_TIME_TO_MSEC(pts) * 1000000; + payload["pts"] = pts.count(); payload["esData"] = 1; std::string json; CJSONVariantWriter::Write(payload, json, true); - auto result = m_starfishMediaAPI->Feed(json.c_str()); + std::string result = m_starfishMediaAPI->Feed(json.c_str()); if (result.find("Ok") != std::string::npos) return true; @@ -352,7 +315,7 @@ if (result.find("BufferFull") != std::string::npos) return false; - CLog::Log(LOGWARNING, "Buffer submit returned error: {}", result); + CLog::LogF(LOGWARNING, "CDVDVideoCodecStarfish: Buffer submit returned error: {}", result); } return true; @@ -360,10 +323,10 @@ void CDVDVideoCodecStarfish::Reset() { - CLog::Log(LOGDEBUG, "CDVDVideoCodecStarfish::Reset"); if (!m_opened) return; + CLog::LogF(LOGDEBUG, "CDVDVideoCodecStarfish: Reset"); m_starfishMediaAPI->flush(); m_state = StarfishState::FLUSHED; @@ -380,11 +343,11 @@ if (m_hints.Equal(hints, CDVDStreamInfo::COMPARE_ALL & ~(CDVDStreamInfo::COMPARE_ID | CDVDStreamInfo::COMPARE_EXTRADATA))) { - CLog::Log(LOGDEBUG, "CDVDVideoCodecStarfish::Reconfigure: true"); + CLog::LogF(LOGDEBUG, "CDVDVideoCodecStarfish: true"); m_hints = hints; return true; } - CLog::Log(LOGDEBUG, "CDVDVideoCodecStarfish::Reconfigure: false"); + CLog::LogF(LOGDEBUG, "CDVDVideoCodecStarfish: false"); return false; } @@ -398,9 +361,9 @@ return VC_BUFFER; } - CLog::Log(LOGDEBUG, "GetPlaytime is {}", m_starfishMediaAPI->getCurrentPlaytime()); - - auto currentPlaytime = m_starfishMediaAPI->getCurrentPlaytime(); + std::chrono::nanoseconds currentPlaytime(m_starfishMediaAPI->getCurrentPlaytime()); + CLog::LogFC(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecStarfish: GetPlaytime is {} ns", + currentPlaytime.count()); // The playtime didn't advance probably we need more data if (currentPlaytime == m_currentPlaytime) @@ -412,10 +375,11 @@ pVideoPicture->SetParams(m_videobuffer); pVideoPicture->videoBuffer = m_videobuffer.videoBuffer; pVideoPicture->dts = 0; - pVideoPicture->pts = DVD_MSEC_TO_TIME(m_starfishMediaAPI->getCurrentPlaytime() / 1000000); + using dvdTime = std::ratio<1, DVD_TIME_BASE>; + pVideoPicture->pts = + std::chrono::duration_cast>(currentPlaytime).count(); - CLog::Log(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecStarfish::GetPicture pts:{:0.4f}", - pVideoPicture->pts); + CLog::LogFC(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecStarfish: pts:{:0.4f}", pVideoPicture->pts); return VC_PICTURE; } @@ -424,7 +388,8 @@ { if (m_codecControlFlags != flags) { - CLog::LogFC(LOGDEBUG, LOGVIDEO, "{:x}->{:x}", m_codecControlFlags, flags); + CLog::LogFC(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecStarfish: {:x}->{:x}", m_codecControlFlags, + flags); m_codecControlFlags = flags; } } @@ -440,7 +405,7 @@ m_starfishMediaAPI->Pause(); break; default: - CLog::Log(LOGWARNING, "CDVDVideoCodecStarfish::SetSpeed unknown playback speed"); + CLog::LogF(LOGWARNING, "CDVDVideoCodecStarfish: Unknown playback speed"); break; } } @@ -456,18 +421,10 @@ { CVariant hdrData; - switch (m_hints.colorTransferCharacteristic) - { - case AVColorTransferCharacteristic::AVCOL_TRC_SMPTEST2084: - hdrData["hdrType"] = "HDR10"; - break; - case AVColorTransferCharacteristic::AVCOL_TRC_ARIB_STD_B67: - hdrData["hdrType"] = "HLG"; - break; - default: - hdrData["hdrType"] = "none"; - break; - } + if (ms_hdrInfoMap.find(m_hints.colorTransferCharacteristic) != ms_hdrInfoMap.cend()) + hdrData["hdrType"] = ms_hdrInfoMap.at(m_hints.colorTransferCharacteristic).data(); + else + hdrData["hdrType"] = "none"; CVariant sei; // for more information, see CTA+861.3-A standard document @@ -513,7 +470,7 @@ std::string payload; CJSONVariantWriter::Write(hdrData, payload, true); - CLog::Log(LOGDEBUG, "CDVDVideoCodecStarfish::SetHDR setting hdr data payload {}", payload); + CLog::LogFC(LOGDEBUG, LOGVIDEO, "CDVDVideoCodecStarfish: Setting HDR data payload {}", payload); m_starfishMediaAPI->setHdrInfo(payload.c_str()); } } @@ -522,21 +479,17 @@ { m_processInfo.SetVideoFps(static_cast(m_hints.fpsrate) / m_hints.fpsscale); - CLog::Log(LOGDEBUG, "CDVDVideoCodecStarfish::UpdateFpsDuration fpsRate:{} fpsscale:{}", - m_hints.fpsrate, m_hints.fpsscale); + CLog::LogF(LOGDEBUG, "CDVDVideoCodecStarfish: fpsRate:{} fpsscale:{}", m_hints.fpsrate, + m_hints.fpsscale); } void CDVDVideoCodecStarfish::PlayerCallback(const int32_t type, const int64_t numValue, const char* strValue) { - std::string logstr; - if (strValue) - { - logstr = strValue; - } - CLog::Log(LOGDEBUG, "CStarfishVideoCodec::PlayerCallback type: {}, numValue: {}, strValue: {}", - type, numValue, logstr); + std::string logstr = strValue != nullptr ? strValue : ""; + CLog::LogF(LOGDEBUG, "CDVDVideoCodecStarfish: type: {}, numValue: {}, strValue: {}", type, + numValue, logstr); switch (type) { @@ -546,6 +499,7 @@ break; } } + void CDVDVideoCodecStarfish::PlayerCallback(const int32_t type, const int64_t numValue, const char* strValue, diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecStarfish.h kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecStarfish.h --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecStarfish.h 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/DVDCodecs/Video/DVDVideoCodecStarfish.h 2013-05-12 08:41:54.000000000 +0000 @@ -15,6 +15,7 @@ #include "threads/Thread.h" #include "utils/Geometry.h" +#include #include class CBitstreamConverter; @@ -26,6 +27,39 @@ AVPixelFormat GetFormat() override { return AV_PIX_FMT_NONE; } }; +enum class StarfishState +{ + RESET, + FLUSHED, + RUNNING, + MAX, +}; + +template<> +struct fmt::formatter : fmt::formatter +{ +public: + template + constexpr auto format(const StarfishState& state, FormatContext& ctx) + { + const auto it = ms_stateMap.find(state); + if (it == ms_stateMap.cend()) + throw std::range_error("no starfish state string found"); + + return fmt::formatter::format(it->second, ctx); + } + +private: + static constexpr auto ms_stateMap = make_map({ + {StarfishState::RESET, "Reset"}, + {StarfishState::FLUSHED, "Flushed"}, + {StarfishState::RUNNING, "Running"}, + }); + static_assert(static_cast(StarfishState::MAX) == ms_stateMap.size(), + "ms_stateMap doesn't match the size of StarfishState, did you forget to " + "add/remove a mapping?"); +}; + class CDVDVideoCodecStarfish : public CDVDVideoCodec { public: @@ -65,18 +99,43 @@ std::string m_formatname{"starfish"}; bool m_opened{false}; int m_codecControlFlags; - int64_t m_currentPlaytime{0}; + std::chrono::nanoseconds m_currentPlaytime{0}; - enum class StarfishState - { - RESET, - FLUSHED, - RUNNING, - }; StarfishState m_state{StarfishState::FLUSHED}; VideoPicture m_videobuffer; std::unique_ptr m_bitstream; + static constexpr auto ms_codecMap = make_map({ + {AV_CODEC_ID_MPEG2VIDEO, "MPEG2"}, + {AV_CODEC_ID_MPEG4, "MPEG4"}, + {AV_CODEC_ID_VP8, "VP8"}, + {AV_CODEC_ID_VP9, "VP9"}, + {AV_CODEC_ID_AVS, "H264"}, + {AV_CODEC_ID_CAVS, "H264"}, + {AV_CODEC_ID_H264, "H264"}, + {AV_CODEC_ID_HEVC, "H265"}, + {AV_CODEC_ID_VC1, "VC1"}, + {AV_CODEC_ID_AV1, "AV1"}, + }); + + static constexpr auto ms_formatInfoMap = make_map({ + {AV_CODEC_ID_MPEG2VIDEO, "starfish-mpeg2"}, + {AV_CODEC_ID_MPEG4, "starfish-mpeg4"}, + {AV_CODEC_ID_VP8, "starfish-vp8"}, + {AV_CODEC_ID_VP9, "starfish-vp9"}, + {AV_CODEC_ID_AVS, "starfish-h264"}, + {AV_CODEC_ID_CAVS, "starfish-h264"}, + {AV_CODEC_ID_H264, "starfish-h264"}, + {AV_CODEC_ID_HEVC, "starfish-h265"}, + {AV_CODEC_ID_VC1, "starfish-vc1"}, + {AV_CODEC_ID_AV1, "starfish-av1"}, + }); + + static constexpr auto ms_hdrInfoMap = make_map({ + {AVCOL_TRC_SMPTE2084, "HDR10"}, + {AVCOL_TRC_ARIB_STD_B67, "HLG"}, + }); + static std::atomic ms_instanceGuard; }; diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/DVDFileInfo.cpp kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/DVDFileInfo.cpp --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/DVDFileInfo.cpp 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/DVDFileInfo.cpp 2013-05-12 08:41:54.000000000 +0000 @@ -32,8 +32,6 @@ #include "DVDDemuxers/DVDDemuxVobsub.h" #include "Process/ProcessInfo.h" -#include -#include #include "filesystem/File.h" #include "cores/FFmpeg.h" #include "TextureCache.h" @@ -44,7 +42,9 @@ #include extern "C" { +#include #include +#include } bool CDVDFileInfo::GetFileDuration(const std::string &path, int& duration) diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererStarfish.cpp kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererStarfish.cpp --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererStarfish.cpp 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/VideoRenderers/HwDecRender/RendererStarfish.cpp 2013-05-12 08:41:54.000000000 +0000 @@ -18,12 +18,10 @@ CRendererStarfish::CRendererStarfish() { - CLog::Log(LOGINFO, "Instancing CRendererStarfish"); + CLog::LogF(LOGINFO, "CRendererStarfish: Instanced"); } -CRendererStarfish::~CRendererStarfish() -{ -} +CRendererStarfish::~CRendererStarfish() = default; CBaseRenderer* CRendererStarfish::Create(CVideoBuffer* buffer) { @@ -57,8 +55,10 @@ { auto origRect = CRect{0, 0, static_cast(m_sourceWidth), static_cast(m_sourceHeight)}; - static_cast(CServiceBroker::GetWinSystem()) - ->SetExportedWindow(origRect, m_sourceRect, m_destRect); + using namespace KODI::WINDOWING::WAYLAND; + auto winSystem = static_cast(CServiceBroker::GetWinSystem()); + + winSystem->SetExportedWindow(origRect, m_sourceRect, m_destRect); m_exportedSourceRect = m_sourceRect; m_exportedDestRect = m_destRect; } diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererDXVA.h kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererDXVA.h --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererDXVA.h 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererDXVA.h 2013-05-12 08:41:54.000000000 +0000 @@ -13,7 +13,11 @@ #include #include + +extern "C" +{ #include +} enum RenderMethod; diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererShaders.h kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererShaders.h --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererShaders.h 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/cores/VideoPlayer/VideoRenderers/windows/RendererShaders.h 2013-05-12 08:41:54.000000000 +0000 @@ -13,7 +13,11 @@ #include #include + +extern "C" +{ #include +} #define PLANE_Y 0 #define PLANE_U 1 diff -Nru kodi-21.0+git20230501.0300-54e9471bc6/xbmc/windowing/wayland/WinSystemWaylandWebOS.cpp kodi-21.0+git20230503.0300-acaf1ae685/xbmc/windowing/wayland/WinSystemWaylandWebOS.cpp --- kodi-21.0+git20230501.0300-54e9471bc6/xbmc/windowing/wayland/WinSystemWaylandWebOS.cpp 2013-05-12 08:41:54.000000000 +0000 +++ kodi-21.0+git20230503.0300-acaf1ae685/xbmc/windowing/wayland/WinSystemWaylandWebOS.cpp 2013-05-12 08:41:54.000000000 +0000 @@ -23,7 +23,8 @@ bool CWinSystemWaylandWebOS::InitWindowSystem() { - auto ok = CWinSystemWayland::InitWindowSystem(); + if (!CWinSystemWayland::InitWindowSystem()) + return false; CDVDVideoCodecStarfish::Register(); CRendererStarfish::Register(); @@ -35,14 +36,15 @@ m_webosRegistry->RequestSingleton(m_webosForeign, 1, 2, false); m_webosRegistry->Bind(); - return ok; + return true; } bool CWinSystemWaylandWebOS::CreateNewWindow(const std::string& name, bool fullScreen, RESOLUTION_INFO& res) { - auto ok = CWinSystemWayland::CreateNewWindow(name, fullScreen, res); + if (!CWinSystemWayland::CreateNewWindow(name, fullScreen, res)) + return false; if (m_webosForeign) { @@ -51,12 +53,14 @@ static_cast(wayland::webos_foreign_webos_exported_type::video_object)); m_exportedSurface.on_window_id_assigned() = [this](std::string window_id, uint32_t exported_type) { - CLog::Log(LOGDEBUG, "Wayland foreign video surface exported {}", window_id); + CLog::Log(LOGDEBUG, + "CreateNewWindow:CDVDVideoCodecStarfish: Foreign video surface exported {}", + window_id); this->m_exportedWindowName = window_id; }; } - return ok; + return true; } CWinSystemWaylandWebOS::~CWinSystemWaylandWebOS() noexcept @@ -85,14 +89,13 @@ { if (m_webosForeign) { - CLog::Log(LOGINFO, - "CWinSystemWaylandWebOS::SetExportedWindow orig {} {} {} {} src {} {} {} {} -> dest " - "{} {} {} {}", - orig.x1, orig.y1, orig.x2, orig.y2, src.x1, src.y1, src.x2, src.y2, dest.x1, dest.y1, - dest.x2, dest.y2); - auto origRegion = m_compositor.create_region(); - auto srcRegion = m_compositor.create_region(); - auto dstRegion = m_compositor.create_region(); + CLog::LogF(LOGINFO, + "CWinSystemWaylandWebOS: orig {} {} {} {} src {} {} {} {} -> dest {} {} {} {}", + orig.x1, orig.y1, orig.x2, orig.y2, src.x1, src.y1, src.x2, src.y2, dest.x1, dest.y1, + dest.x2, dest.y2); + wayland::region_t origRegion = m_compositor.create_region(); + wayland::region_t srcRegion = m_compositor.create_region(); + wayland::region_t dstRegion = m_compositor.create_region(); origRegion.add(static_cast(orig.x1), static_cast(orig.y1), static_cast(orig.Width()), static_cast(orig.Height())); srcRegion.add(static_cast(src.x1), static_cast(src.y1), static_cast(src.Width()),