Move hw->sw frame mapping into a separate class

This commit is contained in:
Cameron Gutman committed 2023-03-26 14:41:02 -05:00
1 parent 5639bcc0f5
commit ba507d8046
5 files changed
+181 -152

No files matched your search

@@ -1,6 +1,7 @@
#pragma once
#include "renderer.h"
#include "swframemapper.h"
#ifdef HAVE_CUDA
#include "cuda.h"
@@ -19,18 +20,16 @@ public:
private:
void renderOverlay(Overlay::OverlayType type);
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;
int m_ColorSpace;
bool m_MapFrame;
SDL_Texture* m_OverlayTextures[Overlay::OverlayMax];
SDL_Rect m_OverlayRects[Overlay::OverlayMax];
SwFrameMapper m_SwFrameMapper;
#ifdef HAVE_CUDA
CUDAGLInteropHelper* m_CudaGLHelper;
#endif