Support HEVC software decoding and forcing HEVC without GPU support

This commit is contained in:
Cameron Gutman 2018-08-04 16:45:31 -07:00
parent 723e815546
commit b076744f00
3 changed files with 9 additions and 18 deletions

View File

@ -338,7 +338,7 @@ bool Session::validateLaunch()
QStringList warningList;
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) {
@ -349,15 +349,14 @@ bool Session::validateLaunch()
VIDEO_FORMAT_H265,
m_StreamConfig.width,
m_StreamConfig.height,
m_StreamConfig.fps)) {
// 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).
m_StreamConfig.supportsHevc = false;
m_StreamConfig.fps) &&
m_Preferences.videoDecoderSelection != StreamingPreferences::VDS_FORCE_SOFTWARE) {
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.");
m_StreamConfig.supportsHevc = false;
}
}

View File

@ -31,18 +31,10 @@ bool SdlRenderer::prepareDecoderContext(AVCodecContext*)
}
bool SdlRenderer::initialize(SDL_Window* window,
int videoFormat,
int,
int width,
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);
if (!m_Renderer) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,

@ -1 +1 @@
Subproject commit 679f6e83bb66a39eee1933aeab312f1764b7b540
Subproject commit fc124b60cecf677ac6bd73633c20fda514b23ebd