Reduce code duplication in renderers
This commit is contained in:
parent
25e5175c54
commit
ada2270bd1
10 changed files with 31 additions and 105 deletions
|
|
@ -20,10 +20,26 @@ public:
|
|||
virtual bool initialize(PDECODER_PARAMETERS params) = 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;
|
||||
virtual bool isRenderThreadSupported() = 0;
|
||||
|
||||
virtual bool needsTestFrame() {
|
||||
// No test frame required by default
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual int getDecoderCapabilities() {
|
||||
// No special capabilities by default
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual FramePacingConstraint getFramePacingConstraint() {
|
||||
// No pacing preference
|
||||
return PACING_ANY;
|
||||
}
|
||||
|
||||
virtual bool isRenderThreadSupported() {
|
||||
// Render thread is supported by default
|
||||
return true;
|
||||
}
|
||||
|
||||
// IOverlayRenderer
|
||||
virtual void notifyOverlayUpdated(Overlay::OverlayType) override {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue