moonlight-qt/app/streaming/video/ffmpeg-renderers/renderer.h

36 lines
967 B
C
Raw Normal View History

2018-07-13 09:28:10 +00:00
#pragma once
#include <SDL.h>
#include "streaming/video/overlaymanager.h"
2018-07-13 09:28:10 +00:00
extern "C" {
#include <libavcodec/avcodec.h>
}
class IFFmpegRenderer : public Overlay::IOverlayRenderer {
2018-07-13 09:28:10 +00:00
public:
2018-12-25 20:57:00 +00:00
enum FramePacingConstraint {
PACING_FORCE_OFF,
PACING_FORCE_ON,
PACING_ANY
};
2018-07-13 09:28:10 +00:00
virtual bool initialize(SDL_Window* window,
int videoFormat,
int width,
int height,
int maxFps,
bool enableVsync) = 0;
2018-07-13 09:28:10 +00:00
virtual bool prepareDecoderContext(AVCodecContext* context) = 0;
2018-08-16 06:57:03 +00:00
virtual void renderFrameAtVsync(AVFrame* frame) = 0;
virtual bool needsTestFrame() = 0;
virtual int getDecoderCapabilities() = 0;
2018-12-25 20:57:00 +00:00
virtual FramePacingConstraint getFramePacingConstraint() = 0;
// IOverlayRenderer
virtual void notifyOverlayUpdated(Overlay::OverlayType) override {
// Nothing
}
2018-07-13 09:28:10 +00:00
};