From da051803f59dab6aa31bef0a2f4f22eaf1679402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Fri, 1 Jan 2021 21:19:52 +0100 Subject: [PATCH] Fall back to H264 on Pi --- gui/src/streamsession.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gui/src/streamsession.cpp b/gui/src/streamsession.cpp index b1cbb47..01008a8 100644 --- a/gui/src/streamsession.cpp +++ b/gui/src/streamsession.cpp @@ -108,6 +108,14 @@ StreamSession::StreamSession(const StreamSessionConnectInfo &connect_info, QObje chiaki_connect_info.video_profile = connect_info.video_profile; chiaki_connect_info.video_profile_auto_downgrade = true; +#if CHIAKI_LIB_ENABLE_PI_DECODER + if(connect_info.decoder == Decoder::Pi && chiaki_connect_info.video_profile.codec != CHIAKI_CODEC_H264) + { + CHIAKI_LOGW(GetChiakiLog(), "A codec other than H264 was requested for Pi Decoder. Falling back to it."); + chiaki_connect_info.video_profile.codec = CHIAKI_CODEC_H264; + } +#endif + if(connect_info.regist_key.size() != sizeof(chiaki_connect_info.regist_key)) throw ChiakiException("RegistKey invalid"); memcpy(chiaki_connect_info.regist_key, connect_info.regist_key.constData(), sizeof(chiaki_connect_info.regist_key));