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
+10 -3
View File
@@ -28,6 +28,8 @@
#include "common/qtutils.h"
#include "node/node.h"
#include "oakengine/display.h"
#include "widget/viewer/vieweroutpututils.h"
namespace olive
{
@@ -86,9 +88,14 @@ void HistogramScope::draw_scope(TexturePtr managed_tex, QVariant pipeline)
if (!texture_row_sums_ || texture_row_sums_->width() != this->width() ||
texture_row_sums_->height() != this->height()) {
texture_row_sums_ = renderer()->create_texture(
VideoParams(width(), height(), managed_tex->format(),
managed_tex->channel_count()));
oak_video_params pod = {};
pod.width = width();
pod.height = height();
pod.format = managed_tex->format();
const VideoParams row_sums_params = video_params_from_pod(pod);
oakengine_display_renderer_create_texture(renderer(),
&row_sums_params, nullptr, 0,
&texture_row_sums_);
}
// Draw managed texture to a sums texture
+37 -21
View File
@@ -21,8 +21,14 @@
#include "scopebase.h"
#include "config/config.h"
#include <QPainter>
#include "common/configwrapper.h"
#include "oakengine/display.h"
#include "oakengine/videoparams.h"
#include "render/job/colortransformjob.h"
#include "widget/viewer/vieweroutpututils.h"
#include "render/job/shaderjob.h"
namespace olive
{
@@ -76,14 +82,17 @@ void ScopeBase::update_software_image()
// it into this scope's renderer before we can sample it.
TexturePtr source_tex = texture_;
if (texture_->renderer() && texture_->renderer() != renderer()) {
FramePtr temp_frame = Frame::create();
temp_frame->set_video_params(texture_->params());
temp_frame->allocate();
texture_->download(temp_frame->data(), temp_frame->linesize_pixels());
FramePtr temp_frame;
oakengine_codec_frame_create(&temp_frame);
oakengine_codec_frame_set_video_params(temp_frame.get(),
&texture_->params());
oakengine_codec_frame_allocate(temp_frame.get());
oakengine_display_texture_download(texture_.get(), temp_frame->data(),
temp_frame->linesize_pixels());
local_texture_ = renderer()->create_texture(
temp_frame->video_params(), temp_frame->data(),
temp_frame->linesize_pixels());
oakengine_display_renderer_create_texture(
renderer(), &temp_frame->video_params(), temp_frame->data(),
temp_frame->linesize_pixels(), &local_texture_);
source_tex = local_texture_;
}
@@ -96,16 +105,20 @@ void ScopeBase::update_software_image()
const int texture_width = static_cast<int>(width() * devicePixelRatioF());
const int texture_height = static_cast<int>(height() * devicePixelRatioF());
const VideoParams offscreen_params(texture_width, texture_height,
PixelFormat::u8,
VideoParams::k_rgba_channel_count);
oak_video_params pod = {};
pod.width = texture_width;
pod.height = texture_height;
pod.format = PixelFormat::u8;
const VideoParams offscreen_params(video_params_from_pod(pod));
if (!software_tex_ || software_tex_->params() != offscreen_params) {
software_tex_ = renderer()->create_texture(offscreen_params);
oakengine_display_renderer_create_texture(renderer(),
&offscreen_params, nullptr, 0,
&software_tex_);
software_buffer_.resize(
texture_width * texture_height *
VideoParams::get_bytes_per_pixel(PixelFormat::u8,
VideoParams::k_rgba_channel_count));
oakengine_video_params_bytes_per_pixel(PixelFormat::u8,
4));
}
if (!software_tex_ || software_tex_->is_dummy()) {
@@ -115,13 +128,14 @@ void ScopeBase::update_software_image()
}
ColorTransformJob job;
job.set_color_processor(color_service());
oakengine_color_transform_job_set_processor(&job, color_service().get());
job.set_input_texture(source_tex);
job.set_input_alpha_association(k_alpha_none);
job.set_clear_destination_enabled(true);
job.set_force_opaque(true);
renderer()->blit_color_managed(job, software_tex_.get());
oakengine_display_renderer_blit_color_managed(renderer(), &job,
software_tex_.get(), nullptr);
renderer()->download_from_texture(software_tex_->id(),
software_tex_->params(),
software_buffer_.data(), 0);
@@ -129,8 +143,8 @@ void ScopeBase::update_software_image()
software_image_ = QImage(
reinterpret_cast<const uchar *>(software_buffer_.constData()),
texture_width, texture_height,
texture_width * VideoParams::get_bytes_per_pixel(
PixelFormat::u8, VideoParams::k_rgba_channel_count),
texture_width * oakengine_video_params_bytes_per_pixel(
PixelFormat::u8, 4),
QImage::Format_RGBA8888_Premultiplied);
software_image_.setDevicePixelRatio(devicePixelRatioF());
@@ -169,14 +183,16 @@ void ScopeBase::on_paint()
// Convert reference frame to display space
if (!managed_tex_ || !managed_tex_up_to_date_ ||
managed_tex_->params() != texture_->params()) {
managed_tex_ = renderer()->create_texture(texture_->params());
oakengine_display_renderer_create_texture(
renderer(), &texture_->params(), nullptr, 0, &managed_tex_);
ColorTransformJob job;
job.set_color_processor(color_service());
oakengine_color_transform_job_set_processor(&job, color_service().get());
job.set_input_texture(texture_);
job.set_input_alpha_association(k_alpha_none);
renderer()->blit_color_managed(job, managed_tex_.get());
oakengine_display_renderer_blit_color_managed(
renderer(), &job, managed_tex_.get(), nullptr);
managed_tex_up_to_date_ = true;
}
+2 -2
View File
@@ -60,7 +60,7 @@ void VectorscopeScope::draw_scope(TexturePtr managed_tex, QVariant pipeline)
NodeValue(NodeValue::k_vec2, QVector2D(width(), height())));
double luma_coeffs[3] = { 0.0f, 0.0f, 0.0f };
color_manager()->get_default_luma_coefs(luma_coeffs);
oakengine_color_manager_default_luma_coefs(color_manager(), luma_coeffs);
job.insert(
QStringLiteral("luma_coeffs"),
NodeValue(NodeValue::k_vec3,
@@ -139,7 +139,7 @@ void VectorscopeScope::draw_scope_software(QPainter &p, const QImage &image)
buf.fill(Qt::transparent);
double luma_coeffs[3] = { 0.0, 0.0, 0.0 };
color_manager()->get_default_luma_coefs(luma_coeffs);
oakengine_color_manager_default_luma_coefs(color_manager(), luma_coeffs);
const int src_w = image.width();
const int src_h = image.height();
+2 -2
View File
@@ -31,7 +31,7 @@
#include <QVector3D>
#include "common/qtutils.h"
#include "config/config.h"
#include "common/configwrapper.h"
#include "node/node.h"
namespace olive
@@ -82,7 +82,7 @@ void WaveformScope::draw_scope(TexturePtr managed_tex, QVariant pipeline)
// Set luma coefficients
double luma_coeffs[3] = { 0.0f, 0.0f, 0.0f };
color_manager()->get_default_luma_coefs(luma_coeffs);
oakengine_color_manager_default_luma_coefs(color_manager(), luma_coeffs);
job.insert(
QStringLiteral("luma_coeffs"),
NodeValue(NodeValue::k_vec3,