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:
@@ -30,11 +30,12 @@
|
||||
#include <QSplitter>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "config/config.h"
|
||||
#include "common/configwrapper.h"
|
||||
#include "common/qtutils.h"
|
||||
#include "dialog/msgbox.h"
|
||||
#include "oakengine/node.h"
|
||||
#include "oakengine/timeline.h"
|
||||
#include "oakengine/videoparams.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
@@ -114,7 +115,7 @@ void SequenceDialog::accept()
|
||||
return;
|
||||
}
|
||||
|
||||
if (!VideoParams::format_is_float(
|
||||
if (!oakengine_video_params_format_is_float(
|
||||
parameter_tab_->get_selected_preview_format()) &&
|
||||
!OAK_CONFIG("PreviewNonFloatDontAskAgain").toBool()) {
|
||||
QMessageBox b(this);
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "oakengine/timeline.h"
|
||||
#include "oakengine/videoparams.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
@@ -122,8 +123,7 @@ SequenceDialogParameterTab::SequenceDialogParameterTab(Sequence *sequence,
|
||||
height_slider_->set_value(height);
|
||||
framerate_combo_->set_frame_rate(Rational(fps_num, fps_den));
|
||||
pixelaspect_combo_->set_pixel_aspect_ratio(Rational(par_num, par_den));
|
||||
interlacing_combo_->set_interlace_mode(
|
||||
static_cast<VideoParams::Interlacing>(interlacing));
|
||||
interlacing_combo_->set_interlace_mode(interlacing);
|
||||
preview_resolution_field_->set_divider(divider);
|
||||
preview_format_field_->set_pixel_format(
|
||||
static_cast<PixelFormat::Format>(format));
|
||||
@@ -173,15 +173,14 @@ void SequenceDialogParameterTab::save_preset_clicked()
|
||||
|
||||
void SequenceDialogParameterTab::update_preview_resolution_label()
|
||||
{
|
||||
VideoParams test_param(get_selected_video_width(), get_selected_video_height(),
|
||||
PixelFormat::invalid,
|
||||
VideoParams::k_internal_channel_count, Rational(1),
|
||||
VideoParams::k_interlace_none,
|
||||
preview_resolution_field_->currentData().toInt());
|
||||
int ew, eh;
|
||||
oakengine_video_params_effective_size(
|
||||
get_selected_video_width(), get_selected_video_height(),
|
||||
preview_resolution_field_->currentData().toInt(), &ew, &eh);
|
||||
|
||||
preview_resolution_label_->setText(
|
||||
tr("(%1x%2)").arg(QString::number(test_param.effective_width()),
|
||||
QString::number(test_param.effective_height())));
|
||||
tr("(%1x%2)").arg(QString::number(ew),
|
||||
QString::number(eh)));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
return pixelaspect_combo_->get_pixel_aspect_ratio();
|
||||
}
|
||||
|
||||
VideoParams::Interlacing get_selected_video_interlacing_mode() const
|
||||
int get_selected_video_interlacing_mode() const
|
||||
{
|
||||
return interlacing_combo_->get_interlace_mode();
|
||||
}
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#include <QTreeWidgetItem>
|
||||
#include <QXmlStreamWriter>
|
||||
|
||||
#include "config/config.h"
|
||||
#include "render/videoparams.h"
|
||||
#include "common/configwrapper.h"
|
||||
#include "oakengine/videoparams.h"
|
||||
#include "ui/icons/icons.h"
|
||||
#include "widget/menu/menu.h"
|
||||
|
||||
@@ -75,12 +75,12 @@ SequenceDialogPresetTab::SequenceDialogPresetTab(QWidget *parent)
|
||||
|
||||
preset_tree_->addTopLevelItem(
|
||||
create_sd_preset_folder(tr("NTSC"), 720, 480, Rational(30000, 1001),
|
||||
VideoParams::k_pixel_aspect_ntsc_standard,
|
||||
VideoParams::k_pixel_aspect_ntsc_widescreen, 1));
|
||||
Rational(8, 9),
|
||||
Rational(32, 27), 1));
|
||||
preset_tree_->addTopLevelItem(
|
||||
create_sd_preset_folder(tr("PAL"), 720, 576, Rational(25, 1),
|
||||
VideoParams::k_pixel_aspect_pal_standard,
|
||||
VideoParams::k_pixel_aspect_pal_widescreen, 1));
|
||||
Rational(16, 15),
|
||||
Rational(64, 45), 1));
|
||||
|
||||
// Load custom presets
|
||||
for (int i = 0; i < get_number_of_presets(); i++) {
|
||||
@@ -118,32 +118,42 @@ SequenceDialogPresetTab::create_hd_preset_folder(const QString &name, int width,
|
||||
add_standard_item(parent,
|
||||
std::make_shared<SequencePreset>(
|
||||
tr("%1 23.976 FPS").arg(name), width, height,
|
||||
Rational(24000, 1001), VideoParams::k_pixel_aspect_square,
|
||||
VideoParams::k_interlace_none, 48000, layout, divider,
|
||||
Rational(24000, 1001),
|
||||
Rational(1), // k_pixel_aspect_square
|
||||
0, // k_interlace_none
|
||||
48000, layout, divider,
|
||||
default_format, default_autocache));
|
||||
add_standard_item(parent,
|
||||
std::make_shared<SequencePreset>(
|
||||
tr("%1 25 FPS").arg(name), width, height,
|
||||
Rational(25, 1), VideoParams::k_pixel_aspect_square,
|
||||
VideoParams::k_interlace_none, 48000, layout, divider,
|
||||
Rational(25, 1),
|
||||
Rational(1), // k_pixel_aspect_square
|
||||
0, // k_interlace_none
|
||||
48000, layout, divider,
|
||||
default_format, default_autocache));
|
||||
add_standard_item(parent,
|
||||
std::make_shared<SequencePreset>(
|
||||
tr("%1 29.97 FPS").arg(name), width, height,
|
||||
Rational(30000, 1001), VideoParams::k_pixel_aspect_square,
|
||||
VideoParams::k_interlace_none, 48000, layout, divider,
|
||||
Rational(30000, 1001),
|
||||
Rational(1), // k_pixel_aspect_square
|
||||
0, // k_interlace_none
|
||||
48000, layout, divider,
|
||||
default_format, default_autocache));
|
||||
add_standard_item(parent,
|
||||
std::make_shared<SequencePreset>(
|
||||
tr("%1 50 FPS").arg(name), width, height,
|
||||
Rational(50, 1), VideoParams::k_pixel_aspect_square,
|
||||
VideoParams::k_interlace_none, 48000, layout, divider,
|
||||
Rational(50, 1),
|
||||
Rational(1), // k_pixel_aspect_square
|
||||
0, // k_interlace_none
|
||||
48000, layout, divider,
|
||||
default_format, default_autocache));
|
||||
add_standard_item(parent,
|
||||
std::make_shared<SequencePreset>(
|
||||
tr("%1 59.94 FPS").arg(name), width, height,
|
||||
Rational(60000, 1001), VideoParams::k_pixel_aspect_square,
|
||||
VideoParams::k_interlace_none, 48000, layout, divider,
|
||||
Rational(60000, 1001),
|
||||
Rational(1), // k_pixel_aspect_square
|
||||
0, // k_interlace_none
|
||||
48000, layout, divider,
|
||||
default_format, default_autocache));
|
||||
return parent;
|
||||
}
|
||||
@@ -161,12 +171,14 @@ QTreeWidgetItem *SequenceDialogPresetTab::create_sd_preset_folder(
|
||||
add_standard_item(
|
||||
parent, std::make_shared<SequencePreset>(
|
||||
tr("%1 Standard").arg(name), width, height, frame_rate,
|
||||
standard_par, VideoParams::k_interlaced_bottom_first, 48000,
|
||||
standard_par, 2, // k_interlaced_bottom_first
|
||||
48000,
|
||||
layout, divider, default_format, default_autocache));
|
||||
add_standard_item(
|
||||
parent, std::make_shared<SequencePreset>(
|
||||
tr("%1 Widescreen").arg(name), width, height, frame_rate,
|
||||
wide_par, VideoParams::k_interlaced_bottom_first, 48000,
|
||||
wide_par, 2, // k_interlaced_bottom_first
|
||||
48000,
|
||||
layout, divider, default_format, default_autocache));
|
||||
return parent;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ public:
|
||||
|
||||
SequencePreset(const QString &name, int width, int height,
|
||||
const Rational &frame_rate, const Rational &pixel_aspect,
|
||||
VideoParams::Interlacing interlacing, int sample_rate,
|
||||
int interlacing, int sample_rate,
|
||||
uint64_t channel_layout, int preview_divider,
|
||||
PixelFormat preview_format, bool preview_autocache)
|
||||
: width_(width)
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
reader->name() == QStringLiteral("interlacing_")) {
|
||||
// "interlacing_" is the element name mistakenly written by
|
||||
// older versions of Save(); accept it for backward compatibility
|
||||
interlacing_ = static_cast<VideoParams::Interlacing>(
|
||||
interlacing_ = static_cast<int>(
|
||||
reader->readElementText().toInt());
|
||||
} else if (reader->name() == QStringLiteral("samplerate")) {
|
||||
sample_rate_ = reader->readElementText().toInt();
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
return pixel_aspect_;
|
||||
}
|
||||
|
||||
VideoParams::Interlacing interlacing() const
|
||||
int interlacing() const
|
||||
{
|
||||
return interlacing_;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ private:
|
||||
int height_;
|
||||
Rational frame_rate_;
|
||||
Rational pixel_aspect_;
|
||||
VideoParams::Interlacing interlacing_;
|
||||
int interlacing_;
|
||||
int sample_rate_;
|
||||
uint64_t channel_layout_;
|
||||
int preview_divider_;
|
||||
|
||||
Reference in New Issue
Block a user