diff --git a/src/app/stream/session.c b/src/app/stream/session.c index 0571ba80..b1dd38ef 100644 --- a/src/app/stream/session.c +++ b/src/app/stream/session.c @@ -205,12 +205,13 @@ void streaming_set_hdr(session_t *session, bool hdr) { populate_hdr_info_vui(&info, &session->config.stream); SS4S_PlayerVideoSetHDRInfo(session->player, &info); } else { + // Magic numbers from Stadia SS4S_VideoHDRInfo info = { .displayPrimariesX = {34000, 13250, 7500}, .displayPrimariesY = {16000, 34500, 3000}, .whitePointX = 15635, .whitePointY = 16450, - .maxDisplayMasteringLuminance = 1000 * LUMINANCE_SCALE, + .maxDisplayMasteringLuminance = 1000, .minDisplayMasteringLuminance = 50, .maxContentLightLevel = 1000, .maxPicAverageLightLevel = 400, diff --git a/src/app/stream/video/session_video.c b/src/app/stream/video/session_video.c index 7a66b0fa..e7118bb9 100644 --- a/src/app/stream/video/session_video.c +++ b/src/app/stream/video/session_video.c @@ -104,12 +104,13 @@ int vdec_delegate_setup(int videoFormat, int width, int height, int redrawRate, } switch (SS4S_PlayerVideoOpen(player, &info)) { - case SS4S_VIDEO_OPEN_ERROR: - return CALLBACKS_SESSION_ERROR_VDEC_ERROR; + case SS4S_VIDEO_OPEN_OK: { + return 0; + } case SS4S_VIDEO_OPEN_UNSUPPORTED_CODEC: return CALLBACKS_SESSION_ERROR_VDEC_UNSUPPORTED; default: - return 0; + return CALLBACKS_SESSION_ERROR_VDEC_ERROR; } } @@ -169,8 +170,11 @@ int vdec_delegate_submit(PDECODE_UNIT decodeUnit) { } else if (result == SS4S_VIDEO_FEED_ERROR) { session_interrupt(session, false, STREAMING_INTERRUPT_DECODER); return DR_OK; - } else { + } else if (result == SS4S_VIDEO_FEED_REQUEST_KEYFRAME) { return DR_NEED_IDR; + } else { + commons_log_debug("Session", "Ignoring frame %d, feed result %d", decodeUnit->frameNumber, result); + return DR_OK; } } diff --git a/third_party/ss4s b/third_party/ss4s index 92b0e99e..3d78a3f2 160000 --- a/third_party/ss4s +++ b/third_party/ss4s @@ -1 +1 @@ -Subproject commit 92b0e99e764e83c47ac8e1af088abc4a0e9099b1 +Subproject commit 3d78a3f236bb27ab92c40c2de6e8b86d3d6a7409