2018-07-22 03:22:00 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "decoder.h"
|
|
|
|
|
|
|
|
#include <SLVideo.h>
|
|
|
|
|
|
|
|
class SLVideoDecoder : public IVideoDecoder
|
|
|
|
{
|
|
|
|
public:
|
2019-02-13 02:42:53 +00:00
|
|
|
SLVideoDecoder(bool testOnly);
|
2018-07-22 03:22:00 +00:00
|
|
|
virtual ~SLVideoDecoder();
|
2022-01-29 06:59:04 +00:00
|
|
|
virtual bool initialize(PDECODER_PARAMETERS params) override;
|
|
|
|
virtual bool isHardwareAccelerated() override;
|
|
|
|
virtual bool isAlwaysFullScreen() override;
|
|
|
|
virtual int getDecoderCapabilities() override;
|
|
|
|
virtual int getDecoderColorspace() override;
|
|
|
|
virtual QSize getDecoderMaxResolution() override;
|
|
|
|
virtual int submitDecodeUnit(PDECODE_UNIT du) override;
|
2018-07-22 03:22:00 +00:00
|
|
|
|
|
|
|
// Unused since rendering is done directly from the decode thread
|
2022-01-29 06:59:04 +00:00
|
|
|
virtual void renderFrameOnMainThread() override {}
|
2018-07-22 03:22:00 +00:00
|
|
|
|
2022-01-29 04:10:50 +00:00
|
|
|
// HDR is not supported by SLVideo
|
2022-01-29 06:59:04 +00:00
|
|
|
virtual void setHdrMode(bool) override {}
|
|
|
|
virtual bool isHdrSupported() override {
|
|
|
|
return false;
|
|
|
|
}
|
2022-01-29 04:10:50 +00:00
|
|
|
|
2018-07-22 03:22:00 +00:00
|
|
|
private:
|
2019-04-28 18:01:54 +00:00
|
|
|
static void slLogCallback(void* context, ESLVideoLog logLevel, const char* message);
|
|
|
|
|
2018-07-22 03:22:00 +00:00
|
|
|
CSLVideoContext* m_VideoContext;
|
|
|
|
CSLVideoStream* m_VideoStream;
|
|
|
|
};
|