136 Commits
Author SHA1 Message Date
Mike-Solar 7b6042168a fix(widget): harden TimelineAndTrackView teardown and TimeScaledObject limits
- TimelineAndTrackView: disconnect the scrollbar sync connections in the
  destructor. Child views reset their scene during destruction, which can
  re-emit QScrollBar::valueChanged into a half-destroyed object and trip
  Qt's assertObjectType abort.
- TimeScaledObject: keep minimum <= maximum when setting scale limits so
  set_scale()'s std::clamp is never called with inverted limits (UB).
  Setting the maximum below the minimum now pulls the minimum down, and
  vice versa, matching QAbstractSlider conventions.
2026-08-05 14:53:04 +08:00
Mike-Solar a030f2da20 app: migrate playhead/undo/modified events off EventBridge (issues 5-8)
- issue 5 (#53): ExportDialog playhead via PlaybackController
- issue 6 (#54): timebasedwidget/timelinewidget playhead via PlaybackController
- issue 7 (#55): historywidget via app-internal Core::undo_index_changed
- issue 8 (#33): PROJECT_MODIFIED_CHANGED re-broadcast as Core::project_modified_changed
2026-08-05 00:52:37 +08:00
Mike-Solar b77344b506 app: PlaybackController + playhead subscription migration (issues 0c, 1-4)
New app/playback/playbackcontroller.{h,cpp}: a lazily created
process-wide singleton whose set_playhead() forwards to
oakengine_viewer_set_playhead and re-broadcasts playhead_changed as a
plain Qt signal. Every app-side oakengine_viewer_set_playhead call site
(17 across viewer, timelinewidget, timelineview, import tool,
timebasedwidget, keyframecontrol, export dialog, mainwindow) now goes
through it.

Migrate the first four playhead subscribers off the raw C event
subscription / EngineEventBridge to the controller signal:
- TimeBasedView (issue 1)
- NodeParamViewWidgetBridge (issue 2)
- NodeParamViewKeyframeControl (issue 3)
- NodeParamViewConnectedLabel (issue 4)

Each stores a QMetaObject::Connection filtered on its viewer node and
disconnects on teardown; the viewer_sub_ members are gone. Plan docs
mark issues 0c and 1-4 as done.

Closes #30, closes #31, closes #32, closes #51, closes #52.
2026-08-05 00:01:12 +08:00
Mike-Solar 712badbaa7 build/ci: green builds and tests on all three platforms
Compiler hygiene (all platforms):
- Silence warnings across the tree: missing override, -Wreorder ctor
  init, -Wshadow, -Wsign-compare, missing switch cases, unused
  functions/captures, Qt 6.11 deprecations (QMouseEvent/QDropEvent
  accessors, qAsConst, Q_FOREACH over non-shared containers,
  AA_UseHighDpiPixmaps) and the .bak/ backup tree removal.
- Fix regressions from the cleanup: missing clip decls in
  capi/timeline.cpp, plugin.cpp rename fallout, panel setFocus
  ambiguity, QGraphicsItem::pos vs event->position(), duplicate
  k_push_button case, boolean test variable.

Windows:
- Qt portability: CommandLineParser is_set/add_option, QTimeZone
  systemTimeZone (QTimeZone::LocalTime is 6.11-only), k_progress_* enum.
- Linking: stop adding oakengine to OLIVE_LIBRARIES (import lib plus
  oakengine-obj caused multiple definitions); add OAKENGINE_STATIC so
  internal consumers no longer reference __imp_* stubs.
- oakengine.ver: export olive::Renderer typeinfo so liboakgl.so can be
  dlopened (Linux), DynamicRenderer no longer dlcloses backend libraries
  (crash in RenderManager's dtor calling into unmapped memory).
- OTIO runtime: copy DLLs next to every binary on Windows instead of
  relying on PATH (0xc0000135 in gtest discovery).
- Headless GL: the runner only has GDI OpenGL 1.1, killing every render
  worker. Deploy Mesa llvmpipe as opengl32sw.dll (Qt's software-GL
  channel) with QT_OPENGL=software, and let QT_OPENGL override the
  AA_UseDesktopOpenGL default. ExportTask fails fast after 8 consecutive
  undelivered frames instead of segfaulting or grinding forever;
  FFmpegEncoder::write_frame tolerates null frames.
- Tests: GetTempPathA+PID temp dirs, GetLongPathNameA for 8.3 names,
  forward-slash normalization when comparing project filenames.

Linux:
- Install libshaderc-dev so oakvulkan compiles GLSL (Vulkan tests).
- Accept UNORM floor-or-round (63/64) in the blit ping-pong test.
- Skip MainWindow construction test on the offscreen QPA (cannot paint
  QOpenGLWidget).

Also: oak_cli_transcode gets a 300s ctest timeout, worker logs GL
context version and LoadGraph/render_frame stages, and
docs/plans/eliminate-event-bridge-issues.md (English translation).
2026-08-04 21:34:31 +08:00
Mike-Solar 66d761b4b7 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
2026-07-31 22:46:52 +08:00
Mike-Solar c0dcd33de0 R8 phase 1: extract app/engine shared utilities into shared/include/oakutil
Move the pure-header utilities shared by app/ and engine/ out of
engine/common/ into a new shared/include/oakutil/ layer (define, lerp,
decibel, digit, range, crashpadutils, autoscroll, qtutils, filefunctions
declarations, and a trimmed xmlutils exposing a CancelAtom-free void*
overload). engine/common/ keeps forwarding headers so internal include
paths are unchanged; app/ now includes oakutil/* directly.

engine/node/project.h gains an explicit NodeGroup forward declaration
previously obtained transitively through the old xmlutils.h.
2026-07-27 17:14:56 +08:00
Mike-Solar a84e75ef47 change: UI and migrate to gtest 2026-07-27 05:27:32 +08:00
Mike-Solar 0aa5879f35 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.
2026-07-26 22:43:21 +08:00
Mike-Solar 2aa7eec016 engine: timeline panel core edit commands migrate to the facade (part 1)
- new batch primitives: split_clips (link-preserving, single undo
  command), delete_clips (gap replace + optional ripple with explicit
  region support), ripple_delete_range, marker_add_ex with color
- razor/split-at-playhead, clip delete, ripple-to-point, track delete,
  and the non-dialog marker path now issue facade commands instead of
  the app's own undo command classes
- batch operations deliberately produce one undo command per user
  action (deleting twenty clips is one entry, not twenty); selection
  and transition removal stay UI-side as documented leftovers
2026-07-20 13:17:07 +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 e5eeaddf2f format: reformatting files 2026-07-13 15:30:43 +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 cdc66d1a02 fix no video shown 2026-01-05 13:52:02 +08:00
Mike Solar 22fd521951 Merge branch 'refs/heads/dev' into plugin
# Conflicts:
#	.gitmodules
#	CMakeLists.txt
#	ext/core
2025-12-13 21:45:46 +08:00
Mike-Solar f317e0e173 Add null checks for timebase in TimeScaledObject and fix background color assignment in ViewerDisplayWidget 2025-11-24 10:33:38 +08:00
Mike-Solar c71b20bb95 add: add 3 functions. Provide the way to get current audio and video params. 2025-09-14 20:43:56 +08:00
Mike Solar 6fdfd03ffd update: update copyright 2025-08-05 17:12:49 +08:00
Mike Solar 74f73ab3be change: change code style to Linux style except indent. 2025-08-03 03:09:40 +08:00
itsmattkc 2c2df99963 name every undo command 2023-03-12 00:49:03 -08:00
itsmattkc 3e47da7009 timebasedviewselectionmanager: scale/unscale when dragging too 2023-03-11 13:49:41 -08:00
itsmattkc 9f4124beb3 timebasedviewselectionmanager: fixed bug detecting single click selections 2023-03-11 13:39:00 -08:00
itsmattkc 9824760ce1 Merge branch 'master' into move-serialization 2023-02-28 20:40:40 -08:00
itsmattkc d0f16ef88e timeline: vastly improve behavior when scrolling and zooming 2023-02-28 20:39:02 -08:00
itsmattkc 9ff6e689d6 vastly improved rubberband selection behavior with selection manager widgets 2023-02-28 20:21:38 -08:00
itsmattkc 7ec8a4dd7e serializer: ensure backwards compatibility 2023-02-26 15:42:54 -08:00
itsmattkc 764d9ada36 timebasedview: assert y scale > 0 2023-02-21 23:03:37 -08:00
itsmattkc 11e4e051c3 move undo files around for better organization 2023-02-20 16:09:22 -08:00
itsmattkc 41559576e0 timebasedwidget: null check on connected node
Fixes #2156
2023-02-13 11:28:59 -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 b33260dce8 timebased: only snap to workarea if enabled
Fixes #2106
2022-11-18 10:30:18 -08:00
itsmattkc 2d3ce55fd7 timebasedview: fix playhead dragging regression 2022-11-16 13:14:37 -08:00
itsmattkc 451de7030b Merge branch 'move-time-to-viewer' 2022-11-01 18:20:22 -07:00
itsmattkc bdbfb56879 shift timelineview scroll code into base classes
Fixes #2060
2022-10-24 12:01:47 -07:00
itsmattkc f81445527f timebasedwidget: automatically connect scale and scrollbars 2022-10-24 11:18:42 -07:00
itsmattkc d1545745d8 various: moved time from viewer UI to viewer node 2022-10-23 20:56:04 -07:00
itsmattkc 5096278e60 nodes: use much smarter time transform function
Fixes #2042
2022-10-23 12:15:36 -07:00
itsmattkc bc9f8c2e3b Merge branch 'master' into cache-update 2022-08-27 10:54:20 -07:00
itsmattkc af6cb35cde timeline: use better system of identifying ruler focus 2022-08-27 09:26:07 -07:00
itsmattkc 54d0a94a20 Merge branch 'master' into cache-update 2022-08-18 08:12:46 -07:00
itsmattkc dd32f81da8 timebasedviewselectionmanager: only start drags if primary button pressed
Fixes #1981
2022-07-23 09:50:21 -07:00
itsmattkc 925d63d707 timebased: transform keyframe times to global for snapping 2022-07-22 17:57:19 -07:00
itsmattkc 24ae3a25d3 timeline: use scroll cooldown when dragging playhead 2022-07-16 17:12:35 -07:00
itsmattkc e4fd2d5d2c timebasedwidget: rewrote scroll catchup code
Code is much better. Less hacky queuing, implements cooldowns to improve navigation, and introduces a framework so that subclasses can make use of catchup/cooldown code too with any scrollbar they want
2022-07-15 10:59:51 -07:00
itsmattkc 4b8febd10d timebasedview: cache scroll value before scale change on ctrl zoom
Fixes bug where scroll would be calculated incorrectly due to range limitation from scale change
2022-07-15 09:47:58 -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 e9404ba869 added second frame cache for thumbnails 2022-05-27 19:16:08 -07:00
itsmattkc 4b4e0a496c timebasedview: use clamped values when setting scroll 2022-05-22 16:58:05 -07:00