Add H265 Streaming to GUI

This commit is contained in:
Florian Märkl 2020-12-28 17:27:10 +01:00
commit e6d18155af
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
8 changed files with 57 additions and 4 deletions

View file

@ -85,9 +85,10 @@ CHIAKI_EXPORT ChiakiErrorCode chiaki_lib_init();
typedef enum
{
// values must not change
CHIAKI_CODEC_H264 = 0,
CHIAKI_CODEC_H265,
CHIAKI_CODEC_H265_HDR
CHIAKI_CODEC_H265 = 1,
CHIAKI_CODEC_H265_HDR = 2
} ChiakiCodec;
static inline bool chiaki_codec_is_h265(ChiakiCodec codec)

View file

@ -971,6 +971,7 @@ static ChiakiErrorCode ctrl_connect(ChiakiCtrl *ctrl)
&& session->connect_info.video_profile_auto_downgrade
&& session->connect_info.video_profile.height == 1080)
{
// regular PS4 doesn't support >= 1080p
CHIAKI_LOGI(session->log, "1080p was selected but server would not support it. Downgrading.");
chiaki_connect_video_profile_preset(
&session->connect_info.video_profile,
@ -979,6 +980,13 @@ static ChiakiErrorCode ctrl_connect(ChiakiCtrl *ctrl)
? CHIAKI_VIDEO_FPS_PRESET_60
: CHIAKI_VIDEO_FPS_PRESET_30);
}
if((server_type == 0 || server_type == 1)
&& session->connect_info.video_profile.codec != CHIAKI_CODEC_H264)
{
// PS4 doesn't support anything except h264
CHIAKI_LOGI(session->log, "A codec other than H264 was selected but server would not support it. Downgrading.");
session->connect_info.video_profile.codec = CHIAKI_CODEC_H264;
}
}
else
CHIAKI_LOGE(session->log, "No valid Server Type in ctrl response");

View file

@ -88,6 +88,7 @@ CHIAKI_EXPORT ChiakiTarget chiaki_rp_version_parse(const char *rp_version_str, b
CHIAKI_EXPORT void chiaki_connect_video_profile_preset(ChiakiConnectVideoProfile *profile, ChiakiVideoResolutionPreset resolution, ChiakiVideoFPSPreset fps)
{
profile->codec = CHIAKI_CODEC_H264;
switch(resolution)
{
case CHIAKI_VIDEO_RESOLUTION_PRESET_360p: