diff --git a/app/pluginSupport/OliveInstance.cpp b/app/pluginSupport/OliveInstance.cpp index 2737e2f3a..8a8fba951 100644 --- a/app/pluginSupport/OliveInstance.cpp +++ b/app/pluginSupport/OliveInstance.cpp @@ -115,6 +115,17 @@ void OliveInstance::getProjectExtent(double &xSize, double &ySize) const ySize = Current::getInstance().currentVideoParams().height(); // TODO: Ensure this project does not support this. } +double OliveInstance::getProjectPixelAspectRatio() const +{ + return Current::getInstance() + .currentVideoParams() + .pixel_aspect_ratio() + .toDouble(); +} +double OliveInstance::getFrameRate() const +{ + return Current::getInstance().currentVideoParams().frame_rate().toDouble(); +} } } diff --git a/app/pluginSupport/OliveInstance.h b/app/pluginSupport/OliveInstance.h index d2dc4ed9f..30265f56c 100644 --- a/app/pluginSupport/OliveInstance.h +++ b/app/pluginSupport/OliveInstance.h @@ -45,7 +45,7 @@ public: { } ~OliveInstance() override = default; - virtual const std::string &getDefaultOutputFielding() const{ + const std::string &getDefaultOutputFielding() const{ return kOfxImageFieldNone; }; @@ -69,7 +69,24 @@ public: void getProjectSize(double& xSize, double& ySize) const override; void getProjectOffset(double& xOffset, double& yOffset) const override; void getProjectExtent(double& xSize, double& ySize) const override; + // The pixel aspect ratio of the current project + double getProjectPixelAspectRatio() const override; + // The duration of the effect + // This contains the duration of the plug-in effect, in frames. + double getEffectDuration() const override; + + // For an instance, this is the frame rate of the project the effect is in. + double getFrameRate() const override; + + /// This is called whenever a param is changed by the plugin so that + /// the recursive instanceChangedAction will be fed the correct frame + double getFrameRecursive() const override; + + /// This is called whenever a param is changed by the plugin so that + /// the recursive instanceChangedAction will be fed the correct + /// renderScale + void getRenderScaleRecursive(double &x, double &y) const override; private: QList persistentErrors_;