mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 14:03:11 -07:00
Add H265 Streaming to GUI
This commit is contained in:
parent
c19c7869d5
commit
e6d18155af
8 changed files with 57 additions and 4 deletions
|
@ -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)
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue