R8: finish app/ pure C ABI migration (P3-P9) and make OTIO required
- app/ no longer includes engine C++ headers nor holds engine C++ types: engine access goes through the oakengine C ABI plus C++ wrappers (oakutil/oaknode.h, oakutil/oakvideo.h) and app-local mirror types (tooltypes, trackreferencehandle, timelinecommonapp, keyframetypes, subtitleapp, serializedlayoutinfoapp, nodevaluehandle, sliderdisplaytypeapp) - engine: new C ABI functions for block/track/clip/transition navigation and predicates, links, caches, waveform/playback, disk folder, sequence_track_list, node_free, footage_is_valid, block_get_track, get_brush; loadotio/saveotio ported to the current engine API - OTIO is now a required dependency: CI and CD build it on every platform, FindOpenTimelineIO fixed for OTIO 0.16/0.19 (the old deps include requirement silently disabled OTIO everywhere), runtime libraries are bundled into packages and copied next to macOS binaries (oak_copy_otio_runtime) - fix ProjectViewModel drag&drop mime read/write size mismatch (segfault) - unify color label naming (k_olive -> "Oak") in the app-side mirror - docs: OTIO required, FFmpeg minimum corrected to 6.0 (en/zh) - gtest suite: 1925 passed, 0 failed
This commit is contained in:
@@ -29,11 +29,16 @@
|
||||
#include <oakengine/color.h>
|
||||
#include <olive/core/core.h>
|
||||
|
||||
#include "render/colortransform.h"
|
||||
#include "oakutil/oakvideo.h"
|
||||
#include "oakutil/qtutils.h"
|
||||
|
||||
namespace olive
|
||||
{
|
||||
|
||||
// Same namespace bridge the engine headers used to provide (unqualified
|
||||
// Color/Rational/... inside namespace olive).
|
||||
using namespace core;
|
||||
|
||||
class ColorManager;
|
||||
|
||||
/**
|
||||
@@ -72,11 +77,11 @@ public:
|
||||
color_input_ = color_input;
|
||||
}
|
||||
|
||||
const ColorTransform &color_output() const
|
||||
const oak::ColorTransform &color_output() const
|
||||
{
|
||||
return color_transform_;
|
||||
}
|
||||
void set_color_output(const ColorTransform &color_output)
|
||||
void set_color_output(const oak::ColorTransform &color_output)
|
||||
{
|
||||
color_transform_ = color_output;
|
||||
}
|
||||
@@ -84,7 +89,7 @@ public:
|
||||
private:
|
||||
QString color_input_;
|
||||
|
||||
ColorTransform color_transform_;
|
||||
oak::ColorTransform color_transform_;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -149,10 +154,10 @@ QStringList oak_query_string_list(CountFn &&count_fn, AtFn &&at_fn)
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Convert an olive::ColorTransform to the facade POD. The QByteArray
|
||||
* @brief Convert an oak::ColorTransform to the facade POD. The QByteArray
|
||||
* outputs back the POD's pointers and must outlive its use.
|
||||
*/
|
||||
inline oak_color_transform oak_to_transform(const ColorTransform &t,
|
||||
inline oak_color_transform oak_to_transform(const oak::ColorTransform &t,
|
||||
QByteArray *output,
|
||||
QByteArray *view,
|
||||
QByteArray *look)
|
||||
@@ -172,8 +177,8 @@ inline oak_color_transform oak_to_transform(const ColorTransform &t,
|
||||
* @brief ColorManager::get_compliant_color_space(ColorTransform) through
|
||||
* the facade.
|
||||
*/
|
||||
inline ColorTransform oak_compliant_transform(ColorManager *mgr,
|
||||
const ColorTransform &in,
|
||||
inline oak::ColorTransform oak_compliant_transform(ColorManager *mgr,
|
||||
const oak::ColorTransform &in,
|
||||
bool force_display = false)
|
||||
{
|
||||
QByteArray o, v, l;
|
||||
@@ -187,10 +192,11 @@ inline ColorTransform oak_compliant_transform(ColorManager *mgr,
|
||||
return in;
|
||||
}
|
||||
if (is_display) {
|
||||
return ColorTransform(QString::fromUtf8(out), QString::fromUtf8(view),
|
||||
QString::fromUtf8(look));
|
||||
return oak::ColorTransform(QString::fromUtf8(out),
|
||||
QString::fromUtf8(view),
|
||||
QString::fromUtf8(look));
|
||||
}
|
||||
return ColorTransform(QString::fromUtf8(out));
|
||||
return oak::ColorTransform(QString::fromUtf8(out));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,7 +218,7 @@ inline QString oak_compliant_color_space(ColorManager *mgr, const QString &s)
|
||||
*/
|
||||
inline ColorProcessorHandlePtr
|
||||
oak_make_color_processor(ColorManager *mgr, const QString &input,
|
||||
const ColorTransform &dest,
|
||||
const oak::ColorTransform &dest,
|
||||
int direction = OAKENGINE_COLOR_PROCESSOR_NORMAL)
|
||||
{
|
||||
QByteArray o, v, l;
|
||||
|
||||
@@ -169,7 +169,7 @@ void ManagedDisplayWidget::disconnect_color_manager()
|
||||
connect_color_manager(nullptr);
|
||||
}
|
||||
|
||||
const ColorTransform &ManagedDisplayWidget::get_color_transform() const
|
||||
const oak::ColorTransform &ManagedDisplayWidget::get_color_transform() const
|
||||
{
|
||||
return color_transform_;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ void ManagedDisplayWidget::color_config_changed()
|
||||
});
|
||||
set_color_transform(oak_compliant_transform(
|
||||
reinterpret_cast<olive::ColorManager *>(color_manager_),
|
||||
ColorTransform(display, view, QString()), true));
|
||||
oak::ColorTransform(display, view, QString()), true));
|
||||
} else {
|
||||
set_color_transform(oak_compliant_transform(
|
||||
reinterpret_cast<olive::ColorManager *>(color_manager_),
|
||||
@@ -260,11 +260,11 @@ void ManagedDisplayWidget::show_default_context_menu()
|
||||
|
||||
void ManagedDisplayWidget::menu_display_select(QAction *action)
|
||||
{
|
||||
const ColorTransform &old_transform = get_color_transform();
|
||||
const oak::ColorTransform &old_transform = get_color_transform();
|
||||
|
||||
ColorTransform new_transform = oak_compliant_transform(
|
||||
oak::ColorTransform new_transform = oak_compliant_transform(
|
||||
reinterpret_cast<olive::ColorManager *>(color_manager_),
|
||||
ColorTransform(action->data().toString(), old_transform.view(),
|
||||
oak::ColorTransform(action->data().toString(), old_transform.view(),
|
||||
old_transform.look()));
|
||||
|
||||
set_color_transform(new_transform);
|
||||
@@ -272,11 +272,11 @@ void ManagedDisplayWidget::menu_display_select(QAction *action)
|
||||
|
||||
void ManagedDisplayWidget::menu_view_select(QAction *action)
|
||||
{
|
||||
const ColorTransform &old_transform = get_color_transform();
|
||||
const oak::ColorTransform &old_transform = get_color_transform();
|
||||
|
||||
ColorTransform new_transform = oak_compliant_transform(
|
||||
oak::ColorTransform new_transform = oak_compliant_transform(
|
||||
reinterpret_cast<olive::ColorManager *>(color_manager_),
|
||||
ColorTransform(old_transform.display(), action->data().toString(),
|
||||
oak::ColorTransform(old_transform.display(), action->data().toString(),
|
||||
old_transform.look()));
|
||||
|
||||
set_color_transform(new_transform);
|
||||
@@ -284,11 +284,11 @@ void ManagedDisplayWidget::menu_view_select(QAction *action)
|
||||
|
||||
void ManagedDisplayWidget::menu_look_select(QAction *action)
|
||||
{
|
||||
const ColorTransform &old_transform = get_color_transform();
|
||||
const oak::ColorTransform &old_transform = get_color_transform();
|
||||
|
||||
ColorTransform new_transform = oak_compliant_transform(
|
||||
oak::ColorTransform new_transform = oak_compliant_transform(
|
||||
reinterpret_cast<olive::ColorManager *>(color_manager_),
|
||||
ColorTransform(old_transform.display(), old_transform.view(),
|
||||
oak::ColorTransform(old_transform.display(), old_transform.view(),
|
||||
action->data().toString()));
|
||||
|
||||
set_color_transform(new_transform);
|
||||
@@ -298,7 +298,7 @@ void ManagedDisplayWidget::menu_colorspace_select(QAction *action)
|
||||
{
|
||||
set_color_transform(oak_compliant_transform(
|
||||
reinterpret_cast<olive::ColorManager *>(color_manager_),
|
||||
ColorTransform(action->data().toString())));
|
||||
oak::ColorTransform(action->data().toString())));
|
||||
}
|
||||
|
||||
void ManagedDisplayWidget::on_destroy()
|
||||
@@ -306,7 +306,7 @@ void ManagedDisplayWidget::on_destroy()
|
||||
oakengine_display_renderer_destroy(attached_renderer_);
|
||||
}
|
||||
|
||||
void ManagedDisplayWidget::set_color_transform(const ColorTransform &transform)
|
||||
void ManagedDisplayWidget::set_color_transform(const oak::ColorTransform &transform)
|
||||
{
|
||||
color_transform_ = transform;
|
||||
|
||||
|
||||
@@ -35,8 +35,6 @@
|
||||
#include "oakengine/color.h"
|
||||
#include "oakengine/display.h"
|
||||
#include "oakengine/events.h"
|
||||
#include "render/colorprocessor.h"
|
||||
#include "render/colortransform.h"
|
||||
#include "widget/manageddisplay/colorprocessorhandle.h"
|
||||
#include "widget/menu/menu.h"
|
||||
|
||||
@@ -151,7 +149,7 @@ public:
|
||||
/**
|
||||
* @brief Get current color transform
|
||||
*/
|
||||
const ColorTransform &get_color_transform() const;
|
||||
const oak::ColorTransform &get_color_transform() const;
|
||||
|
||||
/**
|
||||
* @brief Get menu that can be used to select the colorspace
|
||||
@@ -184,7 +182,7 @@ public slots:
|
||||
/**
|
||||
* @brief Replaces the color transform with a new one
|
||||
*/
|
||||
void set_color_transform(const ColorTransform &transform);
|
||||
void set_color_transform(const oak::ColorTransform &transform);
|
||||
|
||||
/**
|
||||
* @brief Connect a ColorManager (ColorManagers usually belong to the Project)
|
||||
@@ -318,7 +316,7 @@ private:
|
||||
/**
|
||||
* @brief Internal color transform storage
|
||||
*/
|
||||
ColorTransform color_transform_;
|
||||
oak::ColorTransform color_transform_;
|
||||
|
||||
bool is_backend_neutral_ = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user