Add support for mapping hwframes

This commit is contained in:
Cameron Gutman
2022-01-02 13:41:36 -06:00
parent a26ced04ff
commit 17d1ced07c
2 changed files with 95 additions and 48 deletions
@@ -19,12 +19,14 @@ public:
private:
void renderOverlay(Overlay::OverlayType type);
enum AVPixelFormat getReadBackFormat(AVBufferRef* hwFrameCtxRef);
bool initializeReadBackFormat(AVBufferRef* hwFrameCtxRef, AVFrame* testFrame);
AVFrame* getSwFrameFromHwFrame(AVFrame* hwFrame);
int m_VideoFormat;
SDL_Renderer* m_Renderer;
SDL_Texture* m_Texture;
enum AVPixelFormat m_SwPixelFormat;
bool m_MapFrame;
SDL_Texture* m_OverlayTextures[Overlay::OverlayMax];
SDL_Rect m_OverlayRects[Overlay::OverlayMax];