mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-04 23:06:13 +00:00
Request a test frame for MMAL decoder
This commit is contained in:
@@ -125,6 +125,13 @@ enum AVPixelFormat MmalRenderer::getPreferredPixelFormat(int videoFormat)
|
||||
return AV_PIX_FMT_MMAL;
|
||||
}
|
||||
|
||||
bool MmalRenderer::needsTestFrame()
|
||||
{
|
||||
// We won't be able to decode if the GPU memory is 64 MB or lower,
|
||||
// so we must test before allowing the decoder to be used.
|
||||
return true;
|
||||
}
|
||||
|
||||
void MmalRenderer::renderFrame(AVFrame* frame)
|
||||
{
|
||||
MMAL_BUFFER_HEADER_T* buffer = (MMAL_BUFFER_HEADER_T*)frame->data[3];
|
||||
|
||||
@@ -15,6 +15,7 @@ public:
|
||||
virtual bool prepareDecoderContext(AVCodecContext* context) override;
|
||||
virtual void renderFrame(AVFrame* frame) override;
|
||||
virtual enum AVPixelFormat getPreferredPixelFormat(int videoFormat) override;
|
||||
virtual bool needsTestFrame() override;
|
||||
|
||||
private:
|
||||
static void InputPortCallback(MMAL_PORT_T* port, MMAL_BUFFER_HEADER_T* buffer);
|
||||
|
||||
Reference in New Issue
Block a user