Use Pacer to drive all rendering

This commit is contained in:
Cameron Gutman
2018-08-15 23:57:03 -07:00
parent f6a451d6e7
commit 7d61acb2a8
13 changed files with 65 additions and 75 deletions
+5 -2
View File
@@ -2,6 +2,7 @@
#include "decoder.h"
#include "ffmpeg-renderers/renderer.h"
#include "ffmpeg-renderers/pacer/pacer.h"
extern "C" {
#include <libavcodec/avcodec.h>
@@ -25,8 +26,9 @@ public:
virtual IFFmpegRenderer* getRenderer();
private:
bool completeInitialization(AVCodec* decoder, int videoFormat,
int width, int height, bool testOnly);
bool completeInitialization(AVCodec* decoder, SDL_Window* window,
int videoFormat, int width, int height,
int maxFps, bool testOnly);
IFFmpegRenderer* createAcceleratedRenderer(const AVCodecHWConfig* hwDecodeCfg);
@@ -43,6 +45,7 @@ private:
IFFmpegRenderer* m_Renderer;
SDL_atomic_t m_QueuedFrames;
int m_ConsecutiveFailedDecodes;
Pacer* m_Pacer;
static const uint8_t k_H264TestFrame[];
static const uint8_t k_HEVCTestFrame[];