Cap resolution options at 1080p on Steam Link and Raspberry Pi due to hardware limitations
This commit is contained in:
parent
46bcbda972
commit
979de190dc
12 changed files with 42 additions and 5 deletions
|
|
@ -46,6 +46,7 @@ public:
|
|||
virtual bool isAlwaysFullScreen() = 0;
|
||||
virtual int getDecoderCapabilities() = 0;
|
||||
virtual int getDecoderColorspace() = 0;
|
||||
virtual QSize getDecoderMaxResolution() = 0;
|
||||
virtual int submitDecodeUnit(PDECODE_UNIT du) = 0;
|
||||
virtual void renderFrameOnMainThread() = 0;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -134,8 +134,8 @@ enum AVPixelFormat MmalRenderer::getPreferredPixelFormat(int videoFormat)
|
|||
|
||||
int MmalRenderer::getRendererAttributes()
|
||||
{
|
||||
// This renderer can only draw in full-screen
|
||||
return RENDERER_ATTRIBUTE_FULLSCREEN_ONLY;
|
||||
// This renderer can only draw in full-screen and maxes out at 1080p
|
||||
return RENDERER_ATTRIBUTE_FULLSCREEN_ONLY | RENDERER_ATTRIBUTE_1080P_MAX;
|
||||
}
|
||||
|
||||
bool MmalRenderer::needsTestFrame()
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ extern "C" {
|
|||
}
|
||||
|
||||
#define RENDERER_ATTRIBUTE_FULLSCREEN_ONLY 0x01
|
||||
#define RENDERER_ATTRIBUTE_1080P_MAX 0x02
|
||||
|
||||
class IFFmpegRenderer : public Overlay::IOverlayRenderer {
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -71,6 +71,17 @@ int FFmpegVideoDecoder::getDecoderColorspace()
|
|||
return m_FrontendRenderer->getDecoderColorspace();
|
||||
}
|
||||
|
||||
QSize FFmpegVideoDecoder::getDecoderMaxResolution()
|
||||
{
|
||||
if (m_BackendRenderer->getRendererAttributes() & RENDERER_ATTRIBUTE_1080P_MAX) {
|
||||
return QSize(1920, 1080);
|
||||
}
|
||||
else {
|
||||
// No known maximum
|
||||
return QSize(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
enum AVPixelFormat FFmpegVideoDecoder::ffGetFormat(AVCodecContext* context,
|
||||
const enum AVPixelFormat* pixFmts)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ public:
|
|||
virtual bool isAlwaysFullScreen() override;
|
||||
virtual int getDecoderCapabilities() override;
|
||||
virtual int getDecoderColorspace() override;
|
||||
virtual QSize getDecoderMaxResolution() override;
|
||||
virtual int submitDecodeUnit(PDECODE_UNIT du) override;
|
||||
virtual void renderFrameOnMainThread() override;
|
||||
|
||||
|
|
|
|||
|
|
@ -42,6 +42,11 @@ SLVideoDecoder::getDecoderColorspace()
|
|||
return COLORSPACE_REC_709;
|
||||
}
|
||||
|
||||
QSize SLVideoDecoder::getDecoderMaxResolution()
|
||||
{
|
||||
return QSize(1920, 1080);
|
||||
}
|
||||
|
||||
bool
|
||||
SLVideoDecoder::initialize(PDECODER_PARAMETERS params)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ public:
|
|||
virtual bool isAlwaysFullScreen();
|
||||
virtual int getDecoderCapabilities();
|
||||
virtual int getDecoderColorspace();
|
||||
virtual QSize getDecoderMaxResolution();
|
||||
virtual int submitDecodeUnit(PDECODE_UNIT du);
|
||||
|
||||
// Unused since rendering is done directly from the decode thread
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue