Commit Graph
100 Commits
Author SHA1 Message Date
Mike-Solar 6229381426 version: derive from git tag/commit hash; drop audio playback debug logs
Version is no longer hardcoded: at configure time CMake uses the tag
name when HEAD is exactly on a tag (leading "v" stripped), otherwise
the first 8 hex digits of the commit hash. When git is unavailable
(e.g. source tarball) it falls back to the contents of version.txt,
which is now the single place to bump the release version.

Also remove the temporary qDebug() flood in the audio playback path
(ViewerWidget::QueueNextAudioBuffer / ReceivedAudioBufferForPlayback,
AudioManager::PushToOutput).
2026-07-17 21:10:13 +08:00
Mike-Solar 016341ea7c fix: honor DirectoryIsValid create flag; unbreak Windows CI tests
DirectoryIsValid() ignored try_to_create_if_not_exists and always
called mkpath(). On the Windows CI runner (which may create dirs at
the drive root) PathWidget validation both created bogus directories
and never flagged invalid paths; on Linux the mkpath just failed.

- filefunctions: only mkpath when try_to_create_if_not_exists is set
- TaskProjectLoadTest: Project::set_filename() stores native
  separators on Windows, normalize before comparing paths
- DialogProjectProperties: use a nonexistent file inside a temp dir
  instead of a fixed /definitely/... path that prior tests may have
  partially created on a writable drive
2026-07-17 20:35:25 +08:00
Mike-Solar c734ecdba1 tests: make unknown-icon check robust across Qt builds
QIcon::addFile() differs between Qt versions in whether entries for
nonexistent files keep the icon non-null (Ubuntu CI failure). Assert
on what matters: no usable pixmap or size is produced.
2026-07-17 18:28:38 +08:00
Mike-Solar ff95ffa216 fix: initialize default OCIO config on first use
ColorManager::Init() (run by every Project construction) dereferenced
GetDefaultConfig() unconditionally. Any Project created before
SetUpDefaultConfig() crashed inside OCIO getCanonicalName on a null
config — the Windows CI SEGFAULT, where the suite order runs a
Project-creating test first. Reproduced locally by running
MainWindowLayoutInfo.AccessorsStoreAndRetrieve as the first suite.
2026-07-17 18:28:38 +08:00
Mike-Solar 9ca2b0e716 tests: skip MainWindow construction test where OpenGL is unavailable
The test forces GraphicsBackend=opengl and builds a full MainWindow
with QOpenGLWidget-based viewer panels. On headless platforms whose
QPA cannot provide a GL context (Ubuntu/Windows CI on offscreen), the
app's GL calls crash on a non-current context (SEGFAULT in CI on
both). Probe with QOpenGLContext+QOffscreenSurface and GTEST_SKIP when
GL is unusable; the test still runs on platforms with real GL.
2026-07-17 17:38:15 +08:00
Mike-Solar bbf3b2ca38 tests: include <cstring> for std::memset in oiio utils test
Only compiled on macOS via transitive includes; breaks on Linux/MSVC.
2026-07-17 17:26:52 +08:00
Mike-Solar 004e942cf9 fix: remaining issues recorded during test coverage work
- RenderManager: GPU-side members (context_, decoder_cache_,
  shader_cache_, auto_cacher_, worker_pool_, decoder_clear_timer_) were
  left uninitialized when the configured graphics backend is unknown
  (e.g. dummy); ViewerWidget then dereferenced garbage and crashed.
  Initialize them at declaration
- CurveView::SelectKeyframesOfInput ignored its reference parameter and
  selected keyframes of every connected track; select only the
  requested track's keyframes
- SeekableWidget::SeekToScenePoint dereferenced GetViewerNode()
  unconditionally; skip the playhead update when no viewer is connected
- LoadOTIOTask: unknown root schema leaked the freshly allocated
  project_ (delete + reset; OTIO is not enabled in local builds so this
  file is compile-verified by inspection only)

Locked by new tests: RenderManagerDummyBackend,
TimeRuler.SeekToScenePointWithoutViewerIsNoOp,
CurveViewTest.SelectKeyframesOfInputSelectsOnlyRequestedTrack
2026-07-17 17:20:50 +08:00
Mike-Solar 7223900b6d fix: initialize EncodingParams enum members
format_, video_codec_, audio_codec_, subtitle_sidecar_fmt_ and
subtitles_codec_ were left indeterminate by the constructor; reading
them before the corresponding Enable* call was UB. Initialize to the
kFormatCount/kCodecCount invalid sentinels.
2026-07-17 17:04:39 +08:00
Mike-Solar ba55123b13 tests: coverage for panels, main window, ratio dialog (44 cases)
- all 19 panel classes: construction, titles, context/signal wiring,
  save/load data round-trips
- MainWindowLayoutInfo XML round-trip, MainStatusBar, offscreen
  MainWindow construction with standard panels and menus
- RatioDialog parsing (decimal and : / ; separators), validation
2026-07-17 16:53:13 +08:00
Mike-Solar c812f6ea28 fix: panel/window bugs surfaced by new gtest coverage
- MainWindowLayoutInfo: toXml() iterated open_sequences_ for the
  <viewers> section and fromXml() never parsed it, so open footage
  viewers were lost on layout save/load
- PanelWidget never set QObject::objectName, so
  PanelManager::GetPanelWithName() always returned nullptr and every
  caller (layout restore, NodeView param panel lookup) was dead code
- PanelManager::DestroyInstance() left instance_ dangling (UAF on any
  later RegisterPanel), unlike the other singletons
2026-07-17 16:53:13 +08:00
Mike-Solar 0dae545cba tests: coverage for large widgets (61 cases)
- curve/keyframe views: connections, selection, undo commands
- time ruler / playback controls: time<->scene math, buttons, seek
- project explorer: view model hierarchy, MIME drag&drop, rename undo,
  folder heuristics, toolbar signals
- node table/tree/param views, task view, history, multicam play queue,
  timeline selections, node view scene
2026-07-17 15:48:03 +08:00
Mike-Solar b4db6ebc88 fix: define TimeRuler::SetCenteredText (declared but never defined)
Any caller would hit a link error; there were none, so the bug was
latent until the new widget tests called it.
2026-07-17 15:48:03 +08:00
Mike-Solar e9488904b3 tests: coverage for small utility widgets (66 cases)
- slider: SliderBase/FloatSlider/IntegerSlider mapping, clamping,
  display transforms, drag math, tristate, label substitution
- layouts: FlowLayout wrap math, ColumnedGridLayout placement
- combos: all standard combos, node combo box, color label combo
- misc: menu, file/path fields, toolbar, color button/wheel widgets,
  bezier, resizable scrollbar, hand-movable view, node value tree,
  pixel sampler, collapse button, clickable/focusable labels
2026-07-17 14:13:09 +08:00
Mike-Solar ecc66e3e2a fix: widget bugs surfaced by new gtest coverage
- FrameRateComboBox: RepopulateList() left current index at -1 on first
  fill, so GetFrameRate() returned 0/1 instead of the displayed first
  entry until something called SetFrameRate()
- HandMovableView: default_drag_mode_ was never initialized; an early
  Core::ToolChanged signal would setDragMode() with it (UB)
2026-07-17 14:13:09 +08:00
Mike-Solar 26d158146a tests: coverage for dialogs (56 cases)
- editing: speedduration, keyframeproperties, markerproperties, sequence
  presets/parameters, footage properties/relink, project properties
- misc: about, action search, autorecovery scan, config base, disk cache,
  text, progress, render cancel, task, color, key sequence editor,
  remaining preferences tabs
- export: format combo box, audio/video/subtitles tabs, H.264 sections,
  advanced video and save-preset dialogs
2026-07-17 13:20:51 +08:00
Mike-Solar 1475525eb2 fix: dialog bugs surfaced by new gtest coverage
- SequencePreset::Save() wrote element "interlacing_" while Load() read
  "interlacing", losing the interlacing mode on preset round-trips;
  Save() now writes "interlacing" and Load() accepts both for backward
  compatibility with existing preset files
- ExportFormatComboBox: current_ was never initialized (UB on GetFormat
  before first user selection)
- ExportSubtitlesTab::SetSidecarEnabled() called setEnabled instead of
  setChecked, so restored export params could never re-enable sidecar
  subtitles
- h264section.h: static const int constants were odr-use unsafe (link
  error when referenced); changed to static constexpr
2026-07-17 13:20:51 +08:00
Mike-Solar 807e02614b tests: coverage for common utils, cli, timeline undo, tasks, codec, ui
- common: Html doc<->HTML conversion (17), OIIOUtils (6)
- cli: CLIProgressDialog rendering and CLITaskDialog (8)
- timeline: undo commands for pointer/ripple/split/track/workarea (43)
  and general commands (22)
- task: project import/load, import error dialog, cache tasks (13)
- codec: OIIO decoder/encoder, planar file device, FFmpeg encoder (15)
- ui: HumanStrings (6), icons (4), StyleManager (4)
2026-07-17 13:07:56 +08:00
Mike-Solar dd7427f51a fix: bugs surfaced by new gtest coverage
- html.cpp: rgba() colors parsed with setRedF/GreenF/BlueF (0-1) while the
  writer emits 0-255 integers, so semi-transparent text colors lost their
  RGB on round-trip; parse with integer setters instead
- CLIProgressDialog: percentage padding compared normalized progress
  (0.0-1.0) against 10/100, so padding was always fully applied; compute
  the percentage first
- TimelineUndoPointer BlockTrimCommand: remove_block_from_graph_ was
  never initialized (UB on redo)
- TimelineUndoGeneral TransitionRemoveCommand: track_ was never
  initialized; GetRelevantProject() could dereference it before redo()
- ProjectLoadTask::Run(): failure path deleted project_ without
  resetting it, leaving GetLoadedProject() dangling
2026-07-17 13:07:43 +08:00
Mike-Solar a9afb2fac5 Fix FFmpegBridgeDecoder.DecodeFirstFrame failed. 2026-07-17 09:22:34 +08:00
Mike-Solar b103697662 Fix Windows CI crash due to execute order. 2026-07-17 09:11:03 +08:00
Mike-Solar bec52b46b3 nodes: fix serialized ID typos with backward compatibility
- ChromaKey tolerance inputs are now spelled "upper/lower_tolerance_in";
  old projects with the misspelled "tolerence" IDs keep loading (values
  and connections) via a new Node::GetInputIDForLegacyID() hook applied
  in LoadInput and connection deserialization
- flip/ripple/swirl/tile/wave node IDs moved to the consistent
  org.olivevideoeditor.Olive.* domain; NodeFactory::CreateFromID maps
  the old org.oliveeditor.* IDs so old projects still resolve
- Regression tests: legacy ChromaKey IDs (values + connections) and
  legacy factory IDs
2026-07-17 08:38:25 +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 d9a4e27045 tests: coverage round 8 (serialization, folder, text/polygon, probe, render tail)
- node_save_load_test: Node Save/Load round trips for values, keyframes,
  hints, caches, connections, positions
- node_polygon_folder_test: Folder child management, PolygonGenerator
  rasterization/gizmos, TextGeneratorV1/V2
- footage_probe_test: real FFmpeg/OIIO probing of demo.mp4/img.png,
  metadata cache, footage state transitions
- render_tail_test: DynamicRenderer, color-context shader plumbing,
  PreviewAutoCacher pause/clear paths, DiskManager edges,
  AudioPlaybackCache segment I/O

Also fixes AudioPlaybackCache::WritePartOfSampleBuffer, found by the new
tests: zero padding was written via QFile::write(const char*) which
treats the buffer as a NUL-terminated string, so no padding bytes were
ever written; the write length was also computed from the segment end
instead of the range end, making WriteSilence() spin forever on an
empty buffer
2026-07-17 07:48:18 +08:00
Mike-Solar 4302a0aca2 tests: coverage round 7 (audio, distort, filter/keying, math/transition nodes)
- node_audio_test: PanNode/VolumeNode sample math, TimeInput, ValueNode
- node_distort_test: transform/crop/flip/cornerpin/mask/ripple/swirl/
  tile/wave inputs, shader code, value jobs, resolution autoscale math
- node_filter_keying_test: opacity/blur/dropshadow/mosaic/stroke jobs,
  chroma/color-difference key and despill value composition
- node_math_transition_test: TrigonometryNode ops, MergeNode,
  TransitionBlock offsets/progress/crossfade math, SubtitleBlock,
  traverser globals and table caching
2026-07-17 06:24:35 +08:00
Mike-Solar b98c5bd0c0 tests: coverage round 6 (sequence, generators, renderer misc, multicam/serializer)
- sequence_test: Sequence/TrackList track wiring, length propagation,
  context/cache indexing, signals
- node_generator_test: MatrixGenerator transform math, Shape/Solid/
  Noise/Polygon shader jobs, TextGeneratorV3 formatting
- render_misc_test: DynamicRenderer paths, Renderer texture/shader
  caches via stub renderer, color-management blit plumbing,
  PreviewAutoCacher scheduling
- multicam_serializer_test: MultiCamNode sources/angles/grids,
  FootageDescription round trips, ProjectSerializer file and version
  handling
2026-07-17 05:57:30 +08:00
Mike-Solar 734481f732 tests: coverage round 5 (render processor/manager, time nodes, color nodes, OFX host)
- render_processor_test: RenderProcessor audio-ticket pipeline without
  GL, RenderManager params, RenderJobTracker range algebra,
  SubtitleParams ASS/XML, ManagedColor, Texture dummy/job paths
- node_time_test: GapBlock, TimeOffsetNode, TimeRemapNode,
  TimeFormatNode time math and retranslation
- node_color_test: OCIOBaseNode passthrough, DisplayTransformNode,
  ThreeWayColorNode shader/job, OCIOGradingTransformLinearNode clamps
- plugin_node_test: OliveHost plugin scanning/descriptors/suites/error
  paths
2026-07-17 05:22:22 +08:00
Mike-Solar 7e55bd049b tests: coverage round 4 (footage, IPC, input immediate, project/factory)
- footage_test: static describe/loop-mode helpers, stream mapping,
  Value() job generation incl. proxy attachment, data roles, reprobe
  via seeded metadata cache
- render_workerpool_ipc_test: SharedMemoryRegion, FrameSlotPool
  cross-mapping handoff, IpcMessage NDJSON round trips, RenderWorkerPool
  rejection paths
- node_inputimmediate_test: NodeInputImmediate raw API, SetValueAtTime,
  interpolation (linear/hold/bezier) for float/vec/color/rational
- project_factory_test: Project settings/cache modes/save-load/signals,
  NodeFactory creation and menus

Also fixes Project::cache_path() returning the default cache instead of
a configured custom cache path (inverted branch, found by the tests)
2026-07-17 04:55:37 +08:00
Mike-Solar 576a843e4d tests: major coverage round for node/render/audio/plugin subsystems
Add 12 gtest files (~400 tests) covering previously untested or
under-tested areas:
- node_math_test: MathNode operations across number/rational/vector/
  matrix/color/sample pairings, shader code generation
- node_undo_test: all nodeundo command classes redo/undo
- track_test: Track block management, lookup, references, Value()
- render_diskcache_test: FrameHashCache EXR/JPEG round trips,
  DiskManager LRU eviction, state persistence
- node_group_test: NodeGroup passthrough registration and serialization
- plugin_paraminstance_test: OFX param instances and clip image logic
- audio_waveform_test: AudioVisualWaveform + AudioProcessor
- node_value_extended_test: NodeValue conversions, NodeValueTable ops,
  NodeKeyframe/bezier behavior
- render_projectcopier_test: ProjectCopier sync, PlaybackCache,
  AudioPlaybackCache PCM segments
- node_core_test: Node input arrays, flags, contexts, links, keyframe
  events, CopyInputs
- clip_traverser_test: ClipBlock speed/reverse/loop time mapping,
  traverser time propagation
- audio_manager_viewer_test: AudioManager device API, ViewerOutput
  params/streams/signals

Also fixes two real bugs found by the new tests:
- MathNode vec-vec divide crashed (debug) or produced NaN (release) on
  the zero padding components of vec2/vec3 operands
- NodeKeyframe's default constructor left previous_/next_ and the
  bezier handles uninitialized
2026-07-17 04:17:51 +08:00
Mike-Solar e1228f6663 cmake: bump version to 0.4.1-alpha, quote CMAKE_C_FLAGS
The unquoted set() turned any user-supplied C flags into a broken
semicolon list in generated compile rules (mirroring the quoted CXX
line); this also made --coverage configure fail.
2026-07-17 00:36:21 +08:00
Mike-Solar ac10bf83a3 packaging: ship render worker on Linux, ffmpeg_bridge.dll on Windows
- Linux: olive-render-worker had no install rule, so it was missing
  from the AppImage, deb, rpm and Arch packages even though
  RenderWorkerPool spawns it from applicationDirPath(); install it next
  to oak-editor (verified: RPATH resolution of libffmpeg_bridge works
  for editor, worker and liboakgl from the installed layout)
- Windows: ffmpeg_bridge.dll is built outside app/ and is invisible to
  the ntldd dependency walk, so the NSIS installer shipped without it
  (and without the av*.dll it pulls in); copy it explicitly and include
  it in the dependency loop
- AppImage verification now also checks oak-render-worker, liboakgl.so,
  libffmpeg_bridge.so and ldd resolution of all shipped binaries
2026-07-17 00:13:33 +08:00
Mike-Solar 4a4dcae580 lut: pick from the global LUT library in node params; i18n; doc
- File inputs marked with the 'lut_library' property (currently the
  OCIO LUT node) now show a combo box populated from the global LUT
  library above the path field: pick a library LUT directly, or use
  'Other (Custom File)...' with the regular path field; selections go
  through the standard undoable input-change path
- Refresh zh_CN translations with lupdate and translate all strings
  introduced by the proxy dialog, LUT library, LUT picker, waveform
  sync and footage start time work
- Document the new per-footage custom <proxy> attributes and the
  'manual' source-start-time origin in the project file reference
- Add LutFileField UI tests
2026-07-16 23:49:59 +08:00
Mike-Solar caafac4203 sync: masked waveform correlation, stretch sync, manual start time
- Waveform sync no longer treats uncached waveform regions as silence:
  the envelope extraction now reports a per-window validity mask and the
  correlation skips invalid windows on either side, improving accuracy
  for partially cached clips
- Add stretch/speed sync: AudioWaveformSync::EstimateStretchAndOffset
  searches a playback-rate range plus offset, and a new timeline
  context action 'Synchronize by Waveform (Adjust Speed)' applies the
  estimated rate as a clip speed change (with undo) when plain offset
  alignment is inconclusive
- Footage properties dialog gains a Source Start Time field so the
  value used by source-time sync can be viewed and edited manually
  instead of relying solely on auto-detected metadata; applied via an
  undo command, with Footage::ClearSourceStartTime() for removal
- Regression tests for masked correlation, stretch estimation, the
  envelope validity mask, and source-start-time set/clear
2026-07-16 23:09:12 +08:00
Mike-Solar 547c2480e0 color: global LUT library, LUT error reporting, clamp + display fixes
- Add a global LUT library: user-configurable directories (new
  Preferences > LUT tab) scanned recursively for .cube/.3dl files; LUT
  node file pickers offer the library dirs as sidebar shortcuts via a
  'lut_library' input property handled by the param view bridge
- OCIOLutNode no longer fails silently: missing files, unsupported
  extensions and OCIO load errors are recorded in last_error() and
  surfaced in the status bar (input still passes through for rendering
  safety)
- ColorDialog: re-enable the display -> reference conversion using
  ColorProcessor::kInverse with a validity guard, and re-enable the
  Display tab in ColorValuesWidget; covered by a round-trip regression
  test proving the old OCIO inverse crash no longer occurs
- OCIOGradingTransformLinearNode: enforce the OCIO clampWhite >
  clampBlack invariant per frame in Value() so keyframed/connected
  values cannot produce invalid grading transforms, and constrain the
  white clamp UI minimum whenever the black clamp is static
- Regression tests for LUT extension checks, direction switching, node
  error reporting, LUT library scanning, display inverse round-trip and
  clamp enforcement
2026-07-16 22:53:33 +08:00
Mike-Solar ddca6a5e01 proxy: add dedicated Proxy dialog and preferences fields
- New ProxyDialog (Tools > Proxy Settings..., plus 'Proxy Settings...'
  in the project panel and timeline Proxy submenus) unifying global
  proxy settings, per-footage custom presets, generation and deletion
  in one place instead of three scattered entry points; this also fixes
  the Tools menu action opening the wrong preferences tab
- Preferences Disk tab gains an 'include audio in proxies' checkbox and
  an ffmpeg executable path field (blank = auto-detect)
- Add ProxyDialog smoke tests
2026-07-16 22:53:13 +08:00
Mike-Solar 6aaf37e2e5 proxy: per-footage presets, audio in proxies, configurable ffmpeg path
- Footage can store custom proxy parameters (width/height/crf/preset/
  extension/audio) that override the global settings; they are
  serialized with the project and used by every generation entry point
  via Footage::GetEffectiveProxyParams()
- Proxies now include the source audio streams (AAC) unless disabled;
  the proxy filename records the audio flag and offline audio rendering
  decodes from the proxy when present
- ProxyTask resolves ffmpeg from the new FFmpegPath config key first,
  then PATH, then common install locations (e.g. Homebrew on macOS),
  instead of relying on PATH only; the error message points at the
  preferences when no executable is found
- ProxyTask::BuildArguments() is extracted for testability
- Add ProxyIncludeAudio and FFmpegPath config defaults
- Add regression tests for the filename audio marker, config-backed
  params, ffmpeg resolution, argument building, and custom-param
  persistence
2026-07-16 22:31:37 +08:00
Mike-Solar 15525528c9 mainwindow: keep Preferences in the Tools menu on macOS
On macOS Qt's text-heuristic menu role relocates any action whose text
starts with "Preferences" into the application menu. With the English
translation the Tools > Preferences action matched the heuristic and
disappeared from the Tools menu. Pin the action to QAction::NoRole so it
stays in the Tools menu on every platform and language.
2026-07-16 22:31:21 +08:00
Mike-Solar 2b118836a7 tests: skip viewer display repro tests when the render backend is unusable
The CI runner has no Vulkan runtime (liboakvulkan.so fails to load) and
no display (offscreen QOpenGLWidget cannot create a context). The
viewer display tests only checked that the parameter was "vulkan", so
they ran on the OpenGL fallback and segfaulted with no usable GL
context. Probe the backend the same way the other render test fixtures
do (load, verify the backend kind actually matches the request, init)
and skip when it is unavailable. Also replace the stale "temporary
scratch test" file header now that this is a committed regression test.
2026-07-16 17:31:48 +08:00
Mike-Solar cb7e911c35 Fix CI crash 2026-07-16 16:21:18 +08:00
Mike-Solar 9957577cb9 ffmpeg_bridge: fix cross-platform CI failures (Ubuntu/macOS/Windows)
Ubuntu (FFmpeg 7.0) build failure: the public FB_PIX_FMT_* values were
hardcoded to AVPixelFormat enum values, but those shift between FFmpeg
releases (new formats are inserted mid-enum: X2RGB10 in 7.0,
RGBF16/GRAYF16 later), so the static_asserts in internal.h failed and
RGBF16LE/GRAYF16LE did not exist at all.

The FB pixel format values are now fixed identifiers translated inside
the library by pixel format name (stable across releases):
- fb::PixFmtToAV/PixFmtFromAV resolve the static table by name;
  formats a decoder produces that have no static identifier (hardware
  downloads like nv12/p010le/p210le) receive process-local dynamic ids
  >= 1000 so they keep round-tripping through the API (scaler etc.)
  instead of collapsing to NONE and crashing sws.
- All crossing points translated: scaler, frame get/set format,
  decoder/probe stream info, encoder config and write_video_frame,
  fb_pix_fmt_* utilities, fb_find_best_pix_fmt_of_list (which also
  reinterpret_cast the caller's list; now translated element-wise and
  properly NONE-terminated).
- nv12 and p010le get static identifiers as the common hardware
  download formats.
- Hardware frame detection no longer compares pixel formats (breaks
  across format spaces); it uses the existing fb_frame_is_hw().

macOS test failures (FFmpegBridgeEncoder.WritePngVideoAndProbeBack,
WritePcmAudioAndProbeBack): config.filename held a dangling pointer to
a temporary QByteArray (UB; happened to work on Linux). Keep the
QByteArray alive for the encoder's lifetime.

Windows (MSYS2 UCRT64) build failure: timecodefunctions.h used int64_t
without including <cstdint> (previously pulled in transitively).

Full gtest suite: 584 passed.
2026-07-16 08:35:19 +08:00
Mike-Solar c203ce1dbf fix: black preview when footage connects directly to a clip
ClipBlock::kBufferIn is declared as NodeValue::kNone with no value
hint, so when a footage node is connected straight to a clip's buffer
input (no effect node in between), the traverser has no type to look
up in the footage's value table and falls back to its last entry. A
footage pushes its video texture first and its audio samples last, so
a video clip ended up fed with audio samples, produced no texture and
the preview went silently black. With any node in between, the table
only carries the passthrough texture, which is why the bug only showed
on direct connections.

Make Node::GetValueHintForInput virtual and override it in ClipBlock
to prefer the value type matching the clip's track (kTexture on video
tracks, kSamples on audio tracks).

Regression tests cover the exact application render path
(PreviewAutoCacher -> RenderManager -> RenderWorkerPool ->
oak-render-worker) for both the direct and indirect cases, the hint
following the track type, and viewer display widgets. The direct-case
test reproduces the black frame without the fix and passes with it.
Full suite: 584 passed.
2026-07-16 01:06:24 +08:00
Mike-Solar e1d3019659 tests: migrate gtest suite to the ffmpeg_bridge API and add bridge coverage
- Replace direct FFmpeg usage in the test suite (channel layout masks,
  pixel/sample format constants, AVFrame field access, sws_scale) with
  the bridge equivalents and the olive::AVFrame adapter
- Drop CoreRational.ToAVRational (API removed with core's FFmpeg
  dependency) and the GetSwsColorspaceFromAVColorSpace tests (helper
  moved inside the bridge)
- New ffmpeg_bridge_test.cpp exercises the C API directly: constants vs
  core, error strings, pixel format utilities, frames/packets, scaler,
  resampler, audio graph tempo processing, probe/decoder round-trip on
  tests/demo.mp4 (including hw-frame transfer), SRT subtitle reading,
  and encoder end-to-end tests (PNG video and PCM audio probed back)
2026-07-15 23:00:13 +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 ddb2b30cf4 ffmpeg_bridge: new shared library isolating all FFmpeg access behind a pure C API
The library lives outside of app/ and is the only component that includes
FFmpeg headers or links FFmpeg libraries. All objects (frames, packets,
decoder/encoder instances, scalers, resamplers, audio filter graphs) are
identified by opaque handles and never leave the library.

Public surface (include/ffmpeg_bridge/ffmpeg_bridge.h):
- FBFrame/FBPacket: AVFrame/AVPacket wrappers with field accessors
- FBDecoder: demux+decode instance with hwaccel fallback logic
- FBProbe: file probing, per-stream details, subtitle reading
- FBScaler/FBResampler/FBAudioGraph: swscale/swresample/avfilter wrappers
- FBEncoder: full export encoder (video filter graph, audio resampling,
  subtitles) ported from FFmpegEncoder
- FB_* constants mirror AV_* values, verified by static_asserts against
  the real FFmpeg headers inside the library

Two small bugs in the ported encoder were fixed: the resampler is now
properly freed with swr_free() (was re-initialized with swr_init() and
leaked), and codec option dictionaries are freed after avcodec_open2().
2026-07-15 22:07:57 +08:00
Mike-Solar 0f41620a0b core: remove direct FFmpeg dependency from libolivecore
- rational: store num/den natively instead of AVRational; math operators
  re-implemented natively (ported av_reduce/av_d2q/av_cmp_q semantics,
  verified bit-exact against FFmpeg)
- AudioParams: replace AVChannelLayout member with a plain uint64_t mask
  (new render/channellayout.h constants mirror AV_CH_LAYOUT_* values)
- Timecode: native rescale (av_rescale_q/av_rescale_q_rnd equivalents)
  with 128-bit intermediate precision
- core no longer finds or links FFMPEG::avutil

Part of the FFmpeg isolation effort: all FFmpeg access is being moved
behind a dedicated shared library (ffmpeg_bridge).
2026-07-15 21:55:11 +08:00
Mike-Solar 3be4294e15 Fix Linux audio backend preference and worker footage render crash
- On Linux, automatically prefer PipeWire/JACK/PulseAudio over ALSA
  even when a saved ALSA device name exists in config.
- Restore Footage length after deserialization so worker snapshots
  have valid stream lengths and video playback can advance.
- Guard ResolveDecoderFromInput and ProcessAudioFootage against a
  null decoder cache to prevent worker crashes on direct Footage ->
  ViewerOutput connections.
- Keep Linux signal backtrace handler in the render worker.
- Add Oak project SVG logos.
2026-07-14 22:33:30 +08:00
Mike-Solar 5c8ce17c7e submodule: change core into nomarl folder, and move KDockWidgets into third_party. 2026-07-14 15:14:29 +08:00
Mike-Solar e37a87be67 docs: Update test plan. 2026-07-13 22:01:13 +08:00
Mike-Solar 93d92c93db Merge remote-tracking branch 'origin/main' 2026-07-13 18:47:33 +08:00
Mike-Solar 8b431c941e docs: Update README.md download link 2026-07-13 18:46:54 +08:00
Mike-Solar b4b52abbd4 Remove noisy graph-snapshot logs and add waveform-sync diagnostics
- Strip the dense RenderWorkerPool debug messages about cached/stale graph
  snapshots and cleanup to reduce log spam.
- Add qDebug logging and status-bar feedback to
  TimelineWidget::SynchronizeSelectedClipsByWaveform() so we can see why the
  sync action does nothing (e.g. not enough cached clips or no usable offset).
2026-07-13 18:05:02 +08:00
Mike-Solar 7cde0b0f1a Fix invalid channel layout (0x0) in audio processor and add playback diagnostics
- Add FixChannelLayout() helper to AudioProcessor::Open() to fall back to a
  default native channel layout when the input/output layout is unspecified,
  custom, or has a zero mask. This prevents FFmpeg's abuffer/aformat filters
  from rejecting 'channel_layouts=0x0' on Linux.
- Log audio processor open parameters, viewer audio queue state, and
  AudioManager::PushToOutput device/stream status to help diagnose silent
  playback on Linux.
2026-07-13 17:46:15 +08:00
Mike-Solar c6310d104d Prefer PipeWire/PulseAudio over raw ALSA/JACK default on Linux audio devices 2026-07-13 17:24:26 +08:00
Mike-Solar e484af9a1b Merge remote-tracking branch 'origin/main' 2026-07-13 17:05:22 +08:00
Mike-Solar 536d664cbb ui+ci: style KDDockWidgets tabs and add Applications symlink to DMG
- Add explicit QTabBar::tab styles to olive-dark/style.css so inactive
  KDDockWidgets tabs render with a dark background and white text instead
  of falling back to the native macOS light tab appearance.
- Update macOS CD to stage Oak.app alongside an Applications symlink
  before creating the DMG, matching standard macOS installer disk images.
2026-07-13 16:39:49 +08:00
Mike-Solar 36f48a6a4b ci(macos): skip Qt libs in custom bundler and process all binaries
The custom Python bundling script was copying Qt framework binaries as
flat dylibs (e.g. Contents/Frameworks/QtCore) on top of the frameworks
already deployed by macdeployqt (Contents/Frameworks/QtCore.framework).
This caused duplicate Objective-C class definitions and crashes in
QAction construction.

- Skip any dependency whose basename starts with 'Qt' or 'libQt'.
- Process every binary in Contents/MacOS (main app, worker, backends).
- Fix YAML duplicate 'run:' key from the previous commit.
2026-07-13 16:17:02 +08:00
Mike-Solar 035b460c2d ci(macos): make macdeployqt verbose and verify platform plugins
- Add -verbose=2 to macdeployqt so deployment issues are visible in CI logs.
- Pass -executable for oak-render-worker so its rpaths are also fixed.
- Add a verification step that fails the build if platform plugins are missing.
- Print otool -L for both main binary and worker to aid debugging.
2026-07-13 16:12:54 +08:00
Mike-Solar a4a932238c fix(macOS): disable KDDockWidgets QtQuick frontend to resolve launch crash
Oak only uses KDDockWidgets' QtWidgets frontend. Building the QtQuick
frontend caused duplicate QML module registration when QtQuick.framework
initialized, resulting in a SIGABRT in QQmlMetaType::qmlInsertModuleRegistration.

- Set KDDockWidgets_FRONTENDS to qtwidgets in ext/CMakeLists.txt.
- Remove the -qmldir flags from macOS CD deploy since QML plugins are no
  longer needed.
2026-07-13 15:54:55 +08:00
Mike-Solar e16facf123 fix: restore Qt translation files to valid XML
The .ts files had been corrupted by an earlier formatting run that
inserted spaces into XML tags (e.g. '<?xml version = "1.0" ... ?>'),
breaking lrelease parsing. Restore all files under app/ts/ from the last
good revision before the corruption.
2026-07-13 15:35:36 +08:00
Mike-Solar f03b6b58ff style: reformat C/C++ sources and headers with clang-format
Run clang-format over all project C/C++ source and header files
(.c, .cpp, .cc, .h, .hpp, .hh, .m, .mm) under app/ and tests/.
Non-source files (svg, qm, qrc, etc.) were not touched.
2026-07-13 15:34:11 +08:00
Mike-Solar 6a696bc234 Revert "docs: update README binary link to v0.4.0-alpha"
This reverts commit 7522543c48.
2026-07-13 15:31:35 +08:00
Mike-Solar e5eeaddf2f format: reformatting files 2026-07-13 15:30:43 +08:00
Mike-Solar 7522543c48 docs: update README binary link to v0.4.0-alpha 2026-07-13 15:29:13 +08:00
Mike-Solar 64abc9cc76 docs: update CONTRIBUTING.md to Linux Kernel Coding Style
- Reference Linux Kernel Coding Style instead of Google C++ Style Guide.
- Require tabs for indentation.
- Keep Javadoc-style documentation comments.
- Preserve the original naming rules section.
- Update project name to Oak Video Editor.
2026-07-13 15:27:57 +08:00
Mike-Solar f0d41eae52 build: rebrand output artifacts to Oak and fix macOS QML deployment
- Rename macOS bundle output from Olive.app to Oak.app.
- Rename editor binary to oak-editor and render worker to oak-render-worker.
- Rename crash handler output to oak-crashhandler.
- Update worker lookup, NSIS installer, Linux desktop/AppRun, crashhandler
  symbol paths, and documentation for the new binary names.
- Update CD workflow paths and add -qmldir flags to macdeployqt so QtQuick
  / QML plugins required by KDDockWidgets are bundled, fixing the launch
  crash on macOS.
- Update user-facing GitHub URLs to OakVideoEditorCommunity/oak.
2026-07-13 15:26:15 +08:00
Mike-Solar a4a2903e49 ci: Update CI/CD to use 32x runner for Windows. 2026-07-13 15:10:48 +08:00
Mike-Solar c31415e847 build: drop lib prefix from oakgl/oakvulkan DLLs on Windows
MinGW CMake defaults to prefixing shared libraries with 'lib', producing liboakgl.dll which the dynamic backend loader cannot find. Set PREFIX empty on Windows so the output names match the runtime names oakgl.dll / oakvulkan.dll.
2026-07-13 14:56:40 +08:00
Mike-Solar 8fa32f5df4 cd: switch RPM build back to job container with pre-checkout git install
Install git in the Fedora container before actions/checkout so the checkout step can clone the repository normally instead of falling back to the REST API.
2026-07-13 14:54:35 +08:00
Mike-Solar c786469a58 cd: fix Arch tarball creation and Fedora container checkout
- Arch: create the source tarball in /tmp to avoid file changed as we read it and exclude existing tarballs from the archive.

- RPM: run the Fedora build inside docker instead of a job container so actions/checkout is not hampered by a missing Git in the base image.
2026-07-13 14:52:19 +08:00
Mike-Solar 2f0beeb7da cd: add DEB, RPM and Arch Linux packages
- Add CPack configuration in CMakeLists.txt for .deb and .rpm generation
  with declared runtime dependencies.
- Add Arch Linux PKGBUILD template under app/packaging/arch/ and build it
  inside the official archlinux:base-devel Docker container.
- Extend CD workflow with deb, rpm and archlinux jobs and attach the
  resulting packages to the draft release.
2026-07-13 14:47:46 +08:00
Mike-Solar 847abbfd5c ci: Update CI/CD to use 32x runner for Windows. 2026-07-13 14:39:30 +08:00
Mike-Solar 2e1c40af63 test: use olive-render-worker.exe on Windows in render worker footage test
QFileInfo::exists() does not auto-append .exe on Windows, so the test
failed to locate the worker binary even though it was built.
2026-07-13 14:34:05 +08:00
Mike-Solar 2a11988b77 dpcs: Update build instructions 2026-07-13 14:32:17 +08:00
Mike-Solar 43773c430a docs: update build guides for official macOS support and sync Fedora deps
- English and Chinese build.md now list macOS as a fully supported
  platform and point to the dedicated macOS build guide.
- Chinese build.md Fedora dependency list synced with English: use
  ffmpeg-free-devel and add bzip2-devel.
2026-07-13 14:29:14 +08:00
Mike-Solar e797914c62 Edit README 2026-07-13 14:25:23 +08:00
Mike-Solar 8f3c06555f test: skip worker/backend tests when GPU backend unavailable and fix cross-platform path test
- RenderWorkerFootageTest: skip when the dynamic render backend is not
  built; we cannot verify backend availability without it, and the tests
  fail on headless/GPU-less CI runners.
- NodeProject.FilenameAndNameUpdate: use a plain filename instead of
  /tmp/... so the expected name does not depend on POSIX temp paths or
  Windows backslash normalization.
2026-07-13 14:25:02 +08:00
Mike-Solar a5c98e1297 Edit README 2026-07-13 14:23:05 +08:00
Mike-Solar 288e9050e1 fix: guard SIGPIPE ignore with #ifndef _WIN32
SIGPIPE is not available on Windows (MSYS2 UCRT64), causing a build
failure. The signal handling is only needed on POSIX systems.
2026-07-13 14:03:26 +08:00
Mike-Solar ea78558a31 render: reference-count graph snapshots to prevent premature deletion
Proxy generation modifies the project, causing graph snapshots to be
rewritten. The old implementation deleted the previous snapshot
immediately, even though queued render jobs still held its path. The
worker then failed to load the deleted file.

Add per-path reference counting:
- Increment when a job is created with a snapshot path.
- Decrement when the job is processed, cancelled or removed.
- Only delete a snapshot when its reference count reaches zero and it
  is no longer the cached snapshot for the project.

Also keep snapshots in the system temp directory as before, since the
location itself was not the bug.
2026-07-13 13:43:20 +08:00
Mike-Solar 8580542ac7 render: write graph snapshots to AppLocalData instead of system temp
The worker process on macOS could not see the graph snapshot when it
was placed in /var/folders/.../T (likely sandbox/working-directory
visibility). Write snapshots to a 'render-graphs' subdirectory of the
application's persistent data location instead, which both the editor
and the worker can access on all platforms.
2026-07-13 13:29:55 +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 3abb4ff75b docs: update README and remove obsolete documentation/files
- Update CI badge URL to OakVideoEditorCommunity in README.
- Remove outdated TODO files, vcpkg.json, patch file and stale log.
- Clean up obsolete docs and move ofx-pluginrenderer-functions-zh.md
  into docs/zh/.
2026-07-13 13:14:37 +08:00
Mike-Solar 182bfd0aad build: bundle render worker/backends and fix concurrent param test
- Make olive-editor depend on olive-render-worker on all platforms so the
  worker is always built with the main app.
- Copy olive-render-worker and dynamic render backends (oakgl, oakvulkan)
  into the macOS app bundle next to the executable.
- Include oakgl.dll and oakvulkan.dll in the Windows NSIS installer.
- Fix PluginSmokeThread.ConcurrentParamAccess CI failure by adding a mutex
  around IntegerInstance's no-node fallback storage and serializing the
  test's set/get pair.
- Hide the render worker's Dock icon on macOS via
  NSApplicationActivationPolicyProhibited.
2026-07-13 13:12:28 +08:00
Mike-Solar 4f23051b2b Fix waveform sync using stale selection and add Ctrl+Shift+W shortcut 2026-07-13 11:09:32 +08:00
Mike-Solar f3389fe6ba Allow waveform sync with partially cached audio and add regression tests 2026-07-13 10:54:12 +08:00
Mike-Solar 0410ff2fe7 Skip GPU-dependent tests when Vulkan/OpenGL backend is unavailable in CI 2026-07-13 10:44:27 +08:00
Mike-Solar e881bb049f Remove some logs 2026-07-13 10:29:02 +08:00
Mike-Solar 942ffd1635 test: extend coverage for file/qt/xml utilities and core audio/math
Add/extend tests for:
- FileFunctions: config/temp paths, autorecovery, directory overwrite/copy
- QtUtils: word wrap, formatted date/time, qHash for rational/TimeRange
- XMLUtils: cancel atom integration
- Core rational: construction, arithmetic, comparisons, NaN handling
- Core SampleBuffer: allocation, channel ops, volume/silence/reverse/speed

Coverage improvements:
- filefunctions.cpp: 74% -> 90%
- qtutils.cpp: 41% -> 73%
- xmlutils.cpp: 88% -> 100%
- rational.cpp: 74% -> 92%
- samplebuffer.cpp: 55% -> 96%
2026-07-13 10:19:30 +08:00
Mike-Solar c57608b8f8 test: expand gtest coverage for common/core utilities
Add unit tests for:
- CommandLineParser, Debug handler, Decibel, Digit, JobTime, FFmpegUtils
- Core StringUtils, Timecode, TimeRange, Bezier, Color
- Extend Frame tests to cover pixel access, interlace, conversion

Coverage improvements (app + ext/core):
- commandlineparser.cpp: 0% -> 93%
- debug.cpp: 0% -> 85%
- decibel.h: 25% -> 88%
- digit.h: 0% -> 100%
- ffmpegutils.cpp: 29% -> 90%
- frame.cpp: 53% -> 97%
- bezier.cpp: 16% -> 98%
- color.cpp: 13% -> 71%
- Overall line coverage: 17% -> 19%
2026-07-13 10:19:30 +08:00
Mike-Solar 748c53ac5c Expand Google Test coverage across core subsystems
Add and extend unit tests for:
- Task manager (failed tasks, progress signals, multiple tasks)
- Undo stack (multiple undo/redo, push-after-undo, clear, multi-command)
- Config defaults and graphics backend string conversion
- Node keyframe serialization and default state
- Node value string round-trips and table operations
- Node globals and project settings/serialization
- Timeline coordinate, workarea, and marker commands
- Color LUT processor and OCIO transform handling
- Common utilities (range, file functions, Qt helpers, XML utils)
- Render enums (loop mode, alpha association)
- Shader resource availability
- Module smoke tests for Tool and HumanStrings

All tests pass including RenderWorkerFootage GPU worker tests after
rebuilding the stale olive-render-worker binary.
2026-07-13 10:19:30 +08:00
Mike-Solar b7ff687220 Expand gtest coverage across recently changed modules
Adds ~60 new unit tests covering the modules touched in recent bug-fix
passes and UI refactors:

- RenderTicket: result/finish-count semantics, empty watcher defaults,
  ticket-reuse rejection
- Preferences tabs: behavior options migrated into General/Audio tabs,
  translation context helper, audio-tab initialization
- NodeView: context management, 'Show in Parameter Editor' action wiring
- PreviewAutoCacher: construction, pause toggles, single-frame render
  cancellation, force-cache range
- SeekableWidget/TimeBasedWidget: scroll, marker editing, context reset
- OCIOLutNode: empty/missing/unsupported LUT paths, string direction
  values, file-switching regression coverage
- ProxyManager: working filename, disabled state, empty proxy fields
- Frame/VideoParams/AudioParams/Timecode/ExportFormat/ExportCodec:
  additional edge-case and enumeration coverage

Also fixes the PreferencesAudioTab test crash by initializing
AudioManager in the offscreen test environment.

All tests pass: ctest --output-on-failure
2026-07-13 10:19:30 +08:00
Mike-Solar b47887e127 Defer parameter editor panel raise/focus to queued invocation
KDDockWidgets may need an event-loop iteration to finish opening or
tabifying a dock widget before raise() can switch to it. Defer raise(),
activateWindow(), and setFocus() via QMetaObject::invokeMethod with
Qt::QueuedConnection after show().
2026-07-13 10:19:30 +08:00
Mike-Solar 21ae1125f5 Activate parameter editor panel when jumping from node view
Call setAsCurrentTab() and activateWindow() on the ParamPanel dock widget
in ShowSelectedNodeInParamEditor so the parameter editor becomes the active
tab/window when invoked from the node view context menu or Shift+P shortcut.
2026-07-13 10:19:30 +08:00
Mike-Solar dba76ea9f2 Switch to the correct dock/tab when jumping to parameter editor
In NodeParamView::SetSelectedNodes, after locating the target node item,
expand and raise its containing NodeParamViewContext dock widget so the
active tab/folded section switches to the one that actually holds the node.
2026-07-13 10:19:30 +08:00
Mike-Solar a7fdab607d Fix node context-menu jump to parameter editor and drag-release crash
- Ensure right-clicking a node that isn't currently selected makes it the
  sole selection before showing the context menu, so 'Show in Parameter Editor'
  operates on the clicked node.
- Emit all selected node/context pairs when jumping to the parameter editor.
- Guard dragging_items_ iteration in mouseReleaseEvent against deleted items
  by snapshotting keys as QPointer and skipping null entries.
2026-07-13 10:19:30 +08:00
Mike-Solar 5c8f80480d UI: flatten preferences behavior tabs and add node parameter editor shortcut
- Move Behavior-General options (hover focus, slider ladder, scroll zooms)
  into the General preferences tab.
- Move Behavior-Audio option (audio scrubbing) into the Audio preferences tab.
- Promote remaining Behavior categories (Timeline, Playback, Project, Nodes,
  Rendering) to top-level sidebar entries without the 'Behavior - ' prefix.
- Update Chinese translations for the new sidebar titles and fill unfinished
  Behavior tab strings.

NodeView:
- Remove double-click jump-to-parameter-editor behavior; keep expand/collapse.
- Add right-click context menu item 'Show in Parameter Editor'.
- Add Shift+P shortcut bound to the same action.

Render:
- Fix crash in PreviewAutoCacher::ClearSingleFrameRenders when proxy playback
  causes a render ticket to finish synchronously before the watcher pointer is
  returned. Defer the watcher Finished signal via queued connection so the
  caller can safely register the watcher before it is deleted.
2026-07-13 10:19:30 +08:00
Mike-Solar f57ffa482f Flatten Behavior preferences into sidebar categories and scroll to node on double-click
Behavior preferences used a nested QTreeWidget with groups like General,
Audio, Timeline, etc. Replace it with one tab per group in the left sidebar
so users can jump directly to a category without expanding a secondary menu.

Also wire double-clicking a node in the node graph to emit a selection
signal with its context, causing the parameter panel to scroll to that
node's parameters (in addition to showing/raising the panel as before).
2026-07-13 10:19:30 +08:00
Mike-Solar 1f446f55b4 Cache color processors in render worker and canonicalize OCIO roles
ColorProcessor creation was done for every exported frame and the input
reference space was passed as a role string (e.g. "scene_linear"). If
getProcessor() rejected the role name the worker would crash, the pool
would retry the frame, and export throughput would drop to near zero with
minimal CPU/GPU usage.

- Canonicalize role names to colorspace names in ColorProcessor so
  "scene_linear" resolves to the config's actual colorspace.
- Wrap processor creation in a try/catch and initialize cpu_processor_ to
  nullptr on failure instead of dereferencing a null processor.
- Cache created ColorProcessor objects in the worker keyed by transform
  so OCIO processor/shader setup is only paid once per export.
2026-07-13 10:19:30 +08:00
Mike-Solar b3c124fe7a Default viewer display transform to config display/view instead of input colorspace
When no explicit color transform was set, ManagedDisplayWidget fell back to
the project's default input colorspace. For scene-referred reference spaces
like ACEScg / Linear this produced a raw, greenish image on the viewer
instead of a monitor-ready picture. Default to the OCIO config's default
display and view so the viewer looks correct out of the box, while still
honoring any Color Space / Display / View choice the user makes from the
context menu.
2026-07-13 10:19:30 +08:00
Mike-Solar 69cbe37f4f Update project file reference with bilingual Chinese/English docs
Expand docs/project-file-reference.md to cover the full .ove format
implemented in the current codebase, including:

- Root document and project container structure
- Project data: uuid, plugins, nodes, settings
- Detailed Node serialization (inputs, keyframes, connections, hints,
  context, caches)
- Node-specific custom data: Footage proxy/sourcestarttime, ViewerOutput
  workarea/markers, Track height, NodeGroup passthroughs
- VideoParams and AudioParams field lists
- MainWindowLayoutInfo layout block
- Partial documents (markers, keyframes, nodes/timeline)
- Versioning and OpenFX notes

All sections are provided in English with Chinese translations.
2026-07-13 10:19:30 +08:00
Mike-Solar d66779d281 Apply export color transform in render worker
The export color transform was passed to RenderTask as a ColorProcessor,
but the worker IPC render_frame message never carried it. The worker
always set the ticket's coloroutput to null, so frames were returned in
the project's reference space and encoded without the chosen output
transform (e.g. Rec.709 / sRGB), causing the exported video to look
wrongly tinted.

Serialize the ColorTransform through the render_frame control message
and reconstruct the ColorProcessor on the worker side before rendering.
Also expose ColorTransform as a Qt metatype so it can be stored in a
ticket QVariant.
2026-07-13 10:19:30 +08:00