Allow renderers to apply size and display changes seamlessly

This commit is contained in:
Cameron Gutman 2022-04-24 15:42:08 -05:00
commit c989133d27
8 changed files with 106 additions and 15 deletions

View file

@ -58,6 +58,11 @@ typedef struct _DECODER_PARAMETERS {
HDR_MASTERING_METADATA hdrMetadata;
} DECODER_PARAMETERS, *PDECODER_PARAMETERS;
// Flags for applyWindowChange()
#define WINDOW_SIZE_CHANGED 0x01
#define WINDOW_DISPLAY_CHANGED 0x02
class IVideoDecoder {
public:
virtual ~IVideoDecoder() {}
@ -71,4 +76,5 @@ public:
virtual int submitDecodeUnit(PDECODE_UNIT du) = 0;
virtual void renderFrameOnMainThread() = 0;
virtual void setHdrMode(bool enabled) = 0;
virtual bool applyWindowChange(int width, int height, int flags) = 0;
};