Commit Graph
66 Commits
Author SHA1 Message Date
Mike-Solar 03d4087124 refactor: cut engine-to-UI include violations ahead of the liboakengine split
- slider DisplayType enums sink to node/sliderdisplaytype.h (canonical
  engine home); FloatSlider/RationalSlider alias them for compatibility
- DropWithoutSequenceBehavior enum sinks to common/dropworkflowbehavior.h
- Config errors now go through a registered ErrorHandler hook instead of
  QMessageBox with a MainWindow parent; the style default no longer
  depends on the UI style manager
- MainWindowLayoutInfo moves to node/project/serializer/ and its panel
  dependency is reduced to a plain std::map alias (PanelLayoutInfo),
  breaking the engine -> PanelWidget -> KDDockWidgets chain
- ProjectImportErrorDialog moves from task/ to dialog/projectimport/
- remove confirmed-redundant UI includes and give project.h/import.h/
  project.cpp the direct includes they were borrowing transitively
- project.h includes folder/sequence headers directly (it used both
  types in its own API all along)
2026-07-20 00:52:12 +08:00
Mike-Solar bb40b4923e style: unify identifier naming per updated conventions
Automated with clang-tidy readability-identifier-naming (config added to
.clang-tidy) plus scripted passes, per the updated rules now documented
in CONTRIBUTING.md:

- types (class/struct/enum/alias/template params): PascalCase
- functions, variables, members: snake_case (incl. rational -> Rational)
- private/protected members: trailing underscore; static member
  variables likewise (instance_, available_themes_)
- constants and enum values: snake_case (kLinear -> k_linear,
  F32P -> f32p); ALL_CAPS reserved for macros
- macros: OAK_ prefix (OLIVE_ADD_TEST/OLIVE_ASSERT/OLIVE_CONFIG ->
  OAK_ADD_TEST/OAK_ASSERT/OAK_CONFIG, GL_PREAMBLE -> OAK_GL_PREAMBLE,
  include guards -> OAK_*)
- file names: all lowercase (Current/Plugin/OliveHost/OliveClip/
  OlivePluginInstance -> current/plugin/olivehost/oliveclip/
  oliveplugininstance)
- getters share the member name sans underscore, setters set_foo()
- Qt and third-party (OpenFX) virtual overrides and framework callbacks
  keep their original names (exempt in .clang-tidy)

Manual follow-ups required where automation could not reach:
- string-based QMetaObject/SIGNAL/SLOT references updated to renamed
  methods (AddTask, CreatedFile, DeleteSpecificFile, moveSelectionUp, ...)
- macro bodies referencing renamed methods (OLIVE_CONFIG,
  NODE_DEFAULT_DESTRUCTOR, MANAGEDDISPLAYWIDGET_*)
- self-shadowing locals renamed where signals/methods became same-named
  (size_changed, worker_count, selected_items, import param, filters)
- third_party OFX member/namespace usages restored (OFX::Host::*,
  _created, _clipPrefsDirty, createInstance, clearPersistentMessage)
- STL protocol aliases restored (const_iterator) with .clang-tidy
  ignore rules; qHash overloads restored

Full build and test suite pass: ctest 4/4, ~1960 gtest cases green.
2026-07-19 16:10:54 +08:00
Mike-Solar 2aa921b215 fix: bug-fix sweep across node, audio, render, plugin subsystems
Node core:
- MathNode/TrigonometryNode combo strings realigned with Operation enums
- mathbase scalar/vector operand pick no longer uses bitwise type checks
- NodeSetPositionAndDependenciesRecursively moves dependencies again
- RemoveAllKeyframes undo actually restores keyframes
- NodeGroup GetInputName null-deref guard, passthrough ids use input id
- NodeValueTable::Has is an exact type match; tag fallback only for
  empty tags; kStrCombo/kPushButton get data type names
- delete_all_keyframes no longer loops forever on unparented keyframes;
  keyframe-load failures propagate; rational interpolation falls back to
  double; OpacityEffect no longer leaks its internal MathNode

Audio/footage:
- AudioVisualWaveform: GetSummaryFromTime underflow OOB read, TrimIn
  prepend length bookkeeping, OverwriteSums source channel indexing
- PanNode inserts the pan value into the sample job (keyframed pan
  works); OutputParamsChanged is emitted on device change; PortAudio
  device indices are validated before Pa_GetDeviceInfo
- Footage: AdjustTimeByLoopMode no longer hangs/UBs on degenerate
  lengths, GetStreamIndex bounds-checked, CheckFootage clears stale
  state on missing files, failed probes are not cached,
  FootageDescription::Load requires its own root element

Render/track:
- ViewerOutput pushes the tagged samples value; TrackList disconnects
  the track-height lambda; GetTrackFromReference validity check
- RenderManager dummy backend: null-initialized threads, guarded
  decoder-cache/timer paths; Renderer::Destroy releases color cache
  shaders/textures; unknown dynamic backends no longer alias to oakgl
- SharedMemoryRegion POSIX attach validates segment size; ReadMessage
  skips blank lines instead of failing; GC counter clamped;
  IsRenderingCustomRange implemented; TimeOffsetNode gets a true
  inverse OutputTimeAdjustment; zero-speed clips return the held frame

Plugin/nodes:
- OliveClip: stored default region of definition is honored, on-demand
  images are cached; OliveHost sets host identity properties and logs
  instead of showing modal dialogs offscreen; Plugin.h dead decls gone
- DespillNode guards graph-less use with Rec.709 fallback; description
  typos fixed (despill, swirl); mosaic applies when only one axis
  matches; Windows-only Project filename separator test fixed
2026-07-17 08:26:48 +08:00
Mike-Solar 3a3ead6fc0 app: route all FFmpeg access through the ffmpeg_bridge C API
Replace every direct FFmpeg call in the editor and the render worker
with the pure C ffmpeg_bridge API, wrapped in thin C++ adapters that
preserve the original interfaces:

- avframeptr.h: olive::AVFrame adapter around FBFrame handles
- ffmpegutils: format conversion helpers on FB_* constants; the int
  overload is renamed GetCompatibleBridgePixelFormat to avoid a silent
  overload-resolution trap with the PixelFormat enum
- ffmpegdecoder/ffmpegencoder: rewritten as handle-based adapters over
  FBDecoder/FBProbe/FBEncoder/FBScaler/FBResampler
- audioprocessor: FBAudioGraph push/pull adapter
- pluginrenderer/OliveClip: sws/pixdesc usage converted to FBScaler and
  fb_pix_fmt_* queries
- AudioParams/channel layouts are plain uint64_t masks everywhere

Build integration: the root project no longer links FFMPEG directly;
only ffmpeg_bridge does. Binaries resolve the bridge library at runtime
via @loader_path inside the macOS app bundle (copied there post-build)
and via $ORIGIN/../ffmpeg_bridge/bin on Linux; on Windows the DLL is
installed next to the executables, so packages on all three platforms
ship the bridge library.

ffmpeg_bridge gains the extra API the adapters need:
fb_frame_make_writable, fb_decoder_get_format_duration,
fb_resampler_convert_frame, FB_PIX_FMT_YUV440P, SRT validation in
fb_probe_read_subtitle_stream, packed/planar fixes in
fb_encoder_write_audio, and a component-size fix in
fb_pix_fmt_component_size.
2026-07-15 23:00:06 +08:00
Mike-Solar e5eeaddf2f format: reformatting files 2026-07-13 15:30:43 +08:00
Mike-Solar 5a5ad3bc14 render: add diagnostics for worker graph load failures
- Report QFile::errorString() when ProjectSerializer::Load() fails to open
  the graph file, so the worker log shows why instead of an empty detail.
- In olive-render-worker LoadGraph(), check file existence, size and
  readability before delegating to the serializer and log the attempt.
2026-07-13 13:25:25 +08:00
Mike-Solar b23e01b916 Add render worker IPC loop 2026-06-04 13:57:36 +08:00
Mike-Solar c1b77ceec5 Merge branch 'plugin' 2026-01-17 17:03:39 +08:00
Mike-Solar bfb1b2fce4 update copyright back 2026-01-16 21:22:05 +08:00
Mike-Solar b8669f6a11 Change project name; 2026-01-05 16:22:26 +08:00
Mike Solar 6fdfd03ffd update: update copyright 2025-08-05 17:12:49 +08:00
Mike Solar c4f47b6217 change: change code style to Linux style except indent. 2025-08-03 22:50:34 +08:00
Mike Solar 11d8ea5e78 fix: compilation errors 2025-08-03 22:50:26 +08:00
Mike Solar 994ac94ed2 试图解决编译错误 2025-08-03 22:50:24 +08:00
Mike Solar 74f73ab3be change: change code style to Linux style except indent. 2025-08-03 03:09:40 +08:00
Mike Solar 203a280d8e fix: compilation errors 2025-07-13 14:37:53 +08:00
Mike Solar e18cf095f5 试图解决编译错误 2025-06-19 21:01:45 +08:00
itsmattkc 0beecfaaa6 projectserializer: if no project, add to loaded nodes vector 2023-03-11 14:05:48 -08:00
itsmattkc 936d75063f projectserializer: explicitly differentiate between node and clip pasting 2023-03-11 13:58:55 -08:00
itsmattkc d71359e914 track: fixed issues from recent rework 2023-03-02 00:06:35 -08:00
itsmattkc 066a10e6a0 timeline: avoid duplicate items or item dependencies when pasting
God damn this was a big oof. Pasting was inadvertently making duplicates of the footage node(s) every single time. Worst case was if the clip was connected to a nested sequence. Every time someone copy/pasted in my large-scale project, it would add another 1000 nodes to the project. It's about fucking time this was fixed.
2023-02-28 22:28:32 -08:00
itsmattkc b091ed8592 project: remove constant root node 2023-02-28 17:01:46 -08:00
itsmattkc b88b738071 project: moved color manager outside of node graph 2023-02-28 15:20:05 -08:00
itsmattkc f12c3b01d5 project: remove ProjectSettings 2023-02-28 11:59:05 -08:00
itsmattkc 7ec8a4dd7e serializer: ensure backwards compatibility 2023-02-26 15:42:54 -08:00
itsmattkc 46d15396a6 Merge branch 'track-redux' into move-serialization 2023-02-23 11:09:45 -08:00
itsmattkc aeac292ecb Merge branch 'master' into track-redux 2023-02-23 11:07:50 -08:00
itsmattkc 49fd809db7 serializer: clear existing clip name if duplicate of footage name 2023-02-21 19:49:52 -08:00
itsmattkc 028651f9fb moved serialization 2023-02-21 14:26:34 -08:00
itsmattkc a3b75a3a70 update for node-redux 2023-02-21 09:41:19 -08:00
itsmattkc bef8fd7b50 Merge branch 'node-rework' into track-redux 2023-02-21 09:33:52 -08:00
itsmattkc f9cd28a694 node: make convenient input flag setter 2023-02-20 19:13:50 -08:00
itsmattkc ffec819eef successfully transmit block map
Requires a binary data type, which requires a new project serializer
2023-02-20 14:56:04 -08:00
itsmattkc 9745b536f6 nodes: remove graph and merge into project 2023-02-17 14:13:03 -08:00
itsmattkc c1c6893713 various: moved more to core lib 2023-01-19 16:01:31 -08:00
itsmattkc dd9c52ab59 start moving core frameworks to external libraries 2023-01-19 09:51:47 -08:00
itsmattkc f234deb9ee core: allow saving uncompressed xml projects too 2022-12-04 22:35:58 -08:00
itsmattkc aff4f03307 serializer: compress project files
XML can seriously balloon out of control with larger projects, but since it's text, it can be compressed very heavily.

We should perhaps provide a project decompression function to allow people to continue editing the XML if they want.
2022-11-28 18:41:10 -08:00
itsmattkc 4d80044d6d upgrade to qt 6 compliance 2022-10-28 19:42:14 -07:00
itsmattkc 54d0a94a20 Merge branch 'master' into cache-update 2022-08-18 08:12:46 -07:00
itsmattkc 16bd15ad42 serializer: improved robustness of project saving... maybe?
This seems to address a bug where sometimes QXmlStreamWriter would insert nonsense null characters into a project. This is probably some real edge case like compiler optimization or some bullshit like that. I don't even know if it affects all platforms, but it definitely affected me.
2022-07-20 21:26:49 -07:00
itsmattkc 35bc52ee47 serializer: show context for XML load error 2022-07-19 11:20:45 -07:00
itsmattkc 7e1792cfea Merge branch 'master' into cache-update 2022-07-01 22:32:49 -05:00
itsmattkc 079d6beff2 timeline: separate markers and workarea 2022-06-27 23:39:31 -07:00
itsmattkc 046b1cc498 serializer: bypass bezier adj on keyframe type set 2022-06-10 09:55:56 -07:00
itsmattkc 25699ef05b cache: use disk states to share caches 2022-06-05 19:47:33 -07:00
itsmattkc 2f7dc3c98b implemented separate waveform cache 2022-05-29 17:52:35 -07:00
itsmattkc 826090b621 cache: save states to disk 2022-05-29 14:03:09 -07:00
itsmattkc fc68a123ba project: reprobe and merge params when file changes are found 2022-05-28 12:25:50 -07:00
itsmattkc a2ff3d607a serializer: skip overwriting subtitle params
Fixes #1934
2022-05-15 11:27:28 -07:00