multicam: finished usable implementation

This commit is contained in:
itsmattkc
2022-09-25 20:26:10 -07:00
parent e4c2f37adc
commit a6b8b7ccbc
13 changed files with 263 additions and 37 deletions
+23
View File
@@ -20,6 +20,8 @@ public:
virtual ActiveElements GetActiveElementsAtTime(const QString &input, const TimeRange &r) const override;
virtual ShaderCode GetShaderCode(const ShaderRequest &id) const override;
virtual void Value(const NodeValueRow& value, const NodeGlobals &globals, NodeValueTable *table) const override;
virtual void Retranslate() override;
@@ -27,6 +29,27 @@ public:
static const QString kCurrentInput;
static const QString kSourcesInput;
void SetMonitorMode(bool e) { monitor_ = e; }
int GetSourceCount() const
{
return InputArraySize(kSourcesInput);
}
static void GetRowsAndColumns(int sources, int *rows, int *cols);
void GetRowsAndColumns(int *rows, int *cols) const
{
return GetRowsAndColumns(GetSourceCount(), rows, cols);
}
static int RowsColsToIndex(int row, int col, int total_rows, int total_cols)
{
return col + row * total_cols;
}
private:
bool monitor_;
};
}