mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-15 05:42:28 +00:00
35 lines
960 B
C++
35 lines
960 B
C++
#pragma once
|
|
|
|
#include <SDL.h>
|
|
|
|
#include "streaming/video/overlaymanager.h"
|
|
|
|
extern "C" {
|
|
#include <libavcodec/avcodec.h>
|
|
}
|
|
|
|
class IFFmpegRenderer : public Overlay::IOverlayRenderer {
|
|
public:
|
|
enum FramePacingConstraint {
|
|
PACING_FORCE_OFF,
|
|
PACING_FORCE_ON,
|
|
PACING_ANY
|
|
};
|
|
|
|
virtual bool initialize(SDL_Window* window,
|
|
int videoFormat,
|
|
int width,
|
|
int height,
|
|
int maxFps,
|
|
bool enableVsync) = 0;
|
|
virtual bool prepareDecoderContext(AVCodecContext* context) = 0;
|
|
virtual void renderFrame(AVFrame* frame) = 0;
|
|
virtual bool needsTestFrame() = 0;
|
|
virtual int getDecoderCapabilities() = 0;
|
|
virtual FramePacingConstraint getFramePacingConstraint() = 0;
|
|
|
|
// IOverlayRenderer
|
|
virtual void notifyOverlayUpdated(Overlay::OverlayType) override {
|
|
// Nothing
|
|
}
|
|
};
|