Warn when no hardware decoding is available
This commit is contained in:
parent
42988e0dbf
commit
f5499be215
4 changed files with 38 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "streamingpreferences.h"
|
||||
#include "streaming/session.hpp"
|
||||
|
||||
#include <QSettings>
|
||||
|
||||
|
|
@ -57,6 +58,15 @@ void StreamingPreferences::save()
|
|||
settings.setValue(SER_VIDEODEC, static_cast<int>(videoDecoderSelection));
|
||||
}
|
||||
|
||||
bool StreamingPreferences::hasAnyHardwareAcceleration()
|
||||
{
|
||||
// Always use VDS_AUTO to avoid spamming the user with warnings
|
||||
// if they've forced software decoding.
|
||||
return Session::isHardwareDecodeAvailable(VDS_AUTO,
|
||||
VIDEO_FORMAT_H264,
|
||||
1920, 1080, 60);
|
||||
}
|
||||
|
||||
int StreamingPreferences::getDefaultBitrate(int width, int height, int fps)
|
||||
{
|
||||
if (width * height * fps <= 1280 * 720 * 30) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue