add: add 2 functions.

This commit is contained in:
2025-09-14 20:52:25 +08:00
parent c71b20bb95
commit 9ae018341c
2 changed files with 29 additions and 1 deletions
+11
View File
@@ -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();
}
}
}
+18 -1
View File
@@ -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> persistentErrors_;