mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 14:40:56 +00:00
Support HEVC software decoding and forcing HEVC without GPU support
This commit is contained in:
@@ -338,7 +338,7 @@ bool Session::validateLaunch()
|
|||||||
QStringList warningList;
|
QStringList warningList;
|
||||||
|
|
||||||
if (m_Preferences.videoDecoderSelection == StreamingPreferences::VDS_FORCE_SOFTWARE) {
|
if (m_Preferences.videoDecoderSelection == StreamingPreferences::VDS_FORCE_SOFTWARE) {
|
||||||
emitLaunchWarning("Your settings selection to force software decoding may cause streaming performance problems.");
|
emitLaunchWarning("Your settings selection to force software decoding may cause poor streaming performance.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_StreamConfig.supportsHevc) {
|
if (m_StreamConfig.supportsHevc) {
|
||||||
@@ -349,15 +349,14 @@ bool Session::validateLaunch()
|
|||||||
VIDEO_FORMAT_H265,
|
VIDEO_FORMAT_H265,
|
||||||
m_StreamConfig.width,
|
m_StreamConfig.width,
|
||||||
m_StreamConfig.height,
|
m_StreamConfig.height,
|
||||||
m_StreamConfig.fps)) {
|
m_StreamConfig.fps) &&
|
||||||
// NOTE: HEVC currently uses only 1 slice regardless of what
|
m_Preferences.videoDecoderSelection != StreamingPreferences::VDS_FORCE_SOFTWARE) {
|
||||||
// we provide in CAPABILITY_SLICES_PER_FRAME(), so we should
|
|
||||||
// never use it for software decoding (unless common-c starts
|
|
||||||
// respecting it for HEVC).
|
|
||||||
m_StreamConfig.supportsHevc = false;
|
|
||||||
|
|
||||||
if (hevcForced) {
|
if (hevcForced) {
|
||||||
|
emitLaunchWarning("Using software decoding due to your selection to force HEVC. This may cause poor streaming performance.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
emitLaunchWarning("This PC's GPU doesn't support HEVC decoding.");
|
emitLaunchWarning("This PC's GPU doesn't support HEVC decoding.");
|
||||||
|
m_StreamConfig.supportsHevc = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,18 +31,10 @@ bool SdlRenderer::prepareDecoderContext(AVCodecContext*)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool SdlRenderer::initialize(SDL_Window* window,
|
bool SdlRenderer::initialize(SDL_Window* window,
|
||||||
int videoFormat,
|
int,
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
// NOTE: HEVC currently uses only 1 slice regardless of what
|
|
||||||
// we provide in CAPABILITY_SLICES_PER_FRAME(), so we should
|
|
||||||
// never use it for software decoding (unless common-c starts
|
|
||||||
// respecting it for HEVC).
|
|
||||||
if (videoFormat != VIDEO_FORMAT_H264) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_Renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
|
m_Renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
|
||||||
if (!m_Renderer) {
|
if (!m_Renderer) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
|||||||
Submodule moonlight-common-c/moonlight-common-c updated: 679f6e83bb...fc124b60ce
Reference in New Issue
Block a user