Move hw->sw frame mapping into a separate class
This commit is contained in:
parent
5639bcc0f5
commit
ba507d8046
5 changed files with 181 additions and 152 deletions
19
app/streaming/video/ffmpeg-renderers/swframemapper.h
Normal file
19
app/streaming/video/ffmpeg-renderers/swframemapper.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include "renderer.h"
|
||||
|
||||
class SwFrameMapper
|
||||
{
|
||||
public:
|
||||
explicit SwFrameMapper(IFFmpegRenderer* renderer);
|
||||
void setVideoFormat(int videoFormat);
|
||||
AVFrame* getSwFrameFromHwFrame(AVFrame* hwFrame);
|
||||
|
||||
private:
|
||||
bool initializeReadBackFormat(AVBufferRef* hwFrameCtxRef, AVFrame* testFrame);
|
||||
|
||||
IFFmpegRenderer* m_Renderer;
|
||||
int m_VideoFormat;
|
||||
enum AVPixelFormat m_SwPixelFormat;
|
||||
bool m_MapFrame;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue