app: migrate all engine access to the C ABI facade (nm U _ZN5olive = 0)

Every app module now reaches liboakengine exclusively through
oakengine_* C calls, EngineEventBridge subscriptions and app-side
handle headers (cliphandle/keyframehandle/nodevaluehandle/oakvaluehelper).
Direct C++ command construction, engine signal connect()s, and engine
type usage in MOC-visible signatures are gone: 557 -> 0 undefined
olive:: symbols in oak-editor.
This commit is contained in:
2026-07-26 22:43:21 +08:00
parent f95590e924
commit 0aa5879f35
256 changed files with 12357 additions and 4044 deletions
+22 -7
View File
@@ -28,7 +28,7 @@
#include <QInputDialog>
#include <QMessageBox>
#include "render/videoparams.h"
#include "oakengine/videoparams.h"
namespace olive
{
@@ -164,17 +164,32 @@ private:
inner_->clear();
foreach (const Rational &fr, VideoParams::k_supported_frame_rates) {
inner_->addItem(VideoParams::frame_rate_to_string(fr),
QVariant::fromValue(fr));
{
const int n = oakengine_video_params_supported_frame_rate_count();
for (int i = 0; i < n; i++) {
int num, den;
oakengine_video_params_supported_frame_rate_at(i, &num, &den);
char buf[64];
oakengine_video_params_frame_rate_to_string(num, den, buf,
sizeof(buf));
Rational fr(num, den);
inner_->addItem(QString::fromUtf8(buf),
QVariant::fromValue(fr));
}
}
if (custom_rate_.isNull()) {
inner_->addItem(tr("Custom..."));
} else {
inner_->addItem(
tr("Custom (%1)")
.arg(VideoParams::frame_rate_to_string(custom_rate_)));
{
char buf[64];
oakengine_video_params_frame_rate_to_string(
custom_rate_.numerator(), custom_rate_.denominator(), buf,
sizeof(buf));
inner_->addItem(
tr("Custom (%1)")
.arg(QString::fromUtf8(buf)));
}
}
// On the first populate there is no current index (-1); select the
@@ -24,7 +24,7 @@
#include <QComboBox>
#include "render/videoparams.h"
#include "oakengine/videoparams.h"
namespace olive
{
@@ -41,12 +41,12 @@ public:
this->addItem(tr("Bottom-Field First"));
}
VideoParams::Interlacing get_interlace_mode() const
int get_interlace_mode() const
{
return static_cast<VideoParams::Interlacing>(this->currentIndex());
return this->currentIndex();
}
void set_interlace_mode(VideoParams::Interlacing mode)
void set_interlace_mode(int mode)
{
this->setCurrentIndex(mode);
}
@@ -25,7 +25,7 @@
#include <QComboBox>
#include "dialog/ratiodialog.h"
#include "render/videoparams.h"
#include "oakengine/videoparams.h"
namespace olive
{
@@ -37,11 +37,16 @@ public:
: QComboBox(parent)
, dont_prompt_custom_par_(false)
{
QStringList par_names = VideoParams::get_standard_pixel_aspect_ratio_names();
for (int i = 0; i < VideoParams::k_standard_pixel_aspects.size(); i++) {
const Rational &ratio = VideoParams::k_standard_pixel_aspects.at(i);
this->addItem(par_names.at(i), QVariant::fromValue(ratio));
const int n = oakengine_video_params_standard_pixel_aspect_count();
for (int i = 0; i < n; i++) {
int num, den;
oakengine_video_params_standard_pixel_aspect_at(i, &num, &den);
char name_buf[256];
oakengine_video_params_standard_pixel_aspect_name(i, name_buf,
sizeof(name_buf));
Rational ratio(num, den);
this->addItem(QString::fromUtf8(name_buf),
QVariant::fromValue(ratio));
}
// Always add custom item last, much of the logic relies on this. Set this to the current AR so
@@ -110,9 +115,13 @@ private:
// Use 1:1 to prevent any real chance of the PAR being set to 0
this->setItemData(custom_index, QVariant::fromValue(Rational(1)));
} else {
this->setItemText(custom_index,
VideoParams::format_pixel_aspect_ratio_string(
tr("Custom (%1)"), ratio));
char buf[256];
oakengine_video_params_format_pixel_aspect_ratio_string(
"%1", ratio.numerator(), ratio.denominator(), buf,
sizeof(buf));
this->setItemText(
custom_index,
tr("Custom (%1)").arg(QString::fromUtf8(buf)));
this->setItemData(custom_index, QVariant::fromValue(ratio));
}
}
@@ -24,7 +24,7 @@
#include <QComboBox>
#include "render/videoparams.h"
#include "oakengine/videoparams.h"
namespace olive
{
@@ -35,13 +35,13 @@ public:
PixelFormatComboBox(bool float_only, QWidget *parent = nullptr)
: QComboBox(parent)
{
// Set up preview formats
for (int i = 0; i < PixelFormat::count; i++) {
PixelFormat pix_fmt = static_cast<PixelFormat::Format>(i);
if (!float_only || pix_fmt.is_float()) {
this->addItem(VideoParams::get_format_name(pix_fmt),
static_cast<PixelFormat::Format>(pix_fmt));
// Set up preview formats (PixelFormat::u8=0 .. f32=4)
for (int i = 0; i < 5; i++) {
if (!float_only || oakengine_video_params_format_is_float(i)) {
char name_buf[64];
oakengine_video_params_pixel_format_name(i, name_buf,
sizeof(name_buf));
this->addItem(QString::fromUtf8(name_buf), i);
}
}
}
@@ -24,7 +24,7 @@
#include <QComboBox>
#include "render/videoparams.h"
#include "oakengine/videoparams.h"
namespace olive
{
@@ -35,8 +35,12 @@ public:
VideoDividerComboBox(QWidget *parent = nullptr)
: QComboBox(parent)
{
foreach (int d, VideoParams::k_supported_dividers) {
this->addItem(VideoParams::get_name_for_divider(d), d);
const int n = oakengine_video_params_supported_divider_count();
for (int i = 0; i < n; i++) {
int d = oakengine_video_params_supported_divider_at(i);
char name_buf[64];
oakengine_video_params_divider_name(d, name_buf, sizeof(name_buf));
this->addItem(QString::fromUtf8(name_buf), d);
}
}