Provide a renderer callback when the overlay data changes

This commit is contained in:
Cameron Gutman
2019-02-12 18:43:38 -08:00
parent 947970e07b
commit 6ed512e762
7 changed files with 80 additions and 26 deletions
@@ -2,11 +2,13 @@
#include <SDL.h>
#include "streaming/video/overlaymanager.h"
extern "C" {
#include <libavcodec/avcodec.h>
}
class IFFmpegRenderer {
class IFFmpegRenderer : public Overlay::IOverlayRenderer {
public:
enum FramePacingConstraint {
PACING_FORCE_OFF,
@@ -14,7 +16,6 @@ public:
PACING_ANY
};
virtual ~IFFmpegRenderer() {}
virtual bool initialize(SDL_Window* window,
int videoFormat,
int width,
@@ -26,6 +27,11 @@ public:
virtual bool needsTestFrame() = 0;
virtual int getDecoderCapabilities() = 0;
virtual FramePacingConstraint getFramePacingConstraint() = 0;
// IOverlayRenderer
virtual void notifyOverlayUpdated(Overlay::OverlayType) override {
// Nothing
}
};
class SdlRenderer : public IFFmpegRenderer {