Commit Graph
41 Commits
Author SHA1 Message Date
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 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 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 74f73ab3be change: change code style to Linux style except indent. 2025-08-03 03:09:40 +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 73fa930f02 ffmpegencoder: use avfilter instead of swscale for pixel format conversions 2022-08-07 14:00:12 -07:00
itsmattkc 5ea97f7a64 render: remove alpha request option 2022-07-20 23:14:16 -07:00
itsmattkc 4b366a9b73 update copyright year to 2022 2022-05-10 10:38:56 -07:00
itsmattkc bb0fedabba simplified and optimized samplebuffer 2022-05-09 14:55:51 -07:00
itsmattkc b290c4d007 audio: extended support for planar/packed formats 2022-05-03 13:41:27 -07:00
itsmattkc ef515579df completed audio recording implementation 2022-05-02 17:05:11 -07:00
itsmattkc 9101f5dc49 implemented core audio recording support 2022-05-02 14:00:03 -07:00
itsmattkc 03f0ec9f64 ffmpeg: updated for 5.0 2022-02-17 14:53:12 -08:00
itsmattkc 222c62fa80 ffmpeg: find x264 specifically 2021-10-24 13:29:50 -07:00
itsmattkc a561daf071 ffmpegencoder: minor code improvement 2021-05-18 13:11:18 +10:00
itsmattkc cc21ed37a7 implemented core subtitle support 2021-05-18 12:42:47 +10:00
itsmattkc 15556c64ae encoder: write audio in segments
I'll be honest, this probably makes no noticeable difference at all. It should be faster and more efficient, but whether that translates into any tangible improvement is yet to be seen.
2021-05-10 00:44:08 +10:00
itsmattkc 4942970c02 export: fixed many export formats including still image and image sequence export
Still incomplete, but does a lot towards #1345
2021-05-05 19:03:03 +10:00
itsmattkc 2416891c76 encoder: minor improvements 2021-04-28 23:12:14 +10:00
itsmattkc 77d4b18a60 updated copyright year for 2021 [skip ci] 2021-04-17 18:56:50 +10:00
itsmattkc 75d4cd899b use hardcoded namespace
The macro defined namespaces confused the hell out of lupdate and more or less broke translations permanently. Looks like the only way we can do it is to have a hardcoded namespace, which goes against my instinct, but honestly how likely is it that we'll change the namespace anyway (I guess forks might want to do it, but that's their problem ;) )
2020-11-17 20:24:42 +11:00
itsmattkc d241090a9f finally updated the copyright year 2020-11-17 20:13:22 +11:00
itsmattkc 0d0766e4fb improved render channel count system 2020-11-15 22:16:40 +11:00
itsmattkc c9a8b96c89 reimplemented export process 2020-11-13 22:05:43 +11:00
itsmattkc f7ab0bb640 audio: rewrote audio cache to write to contiguous segments rather than one long file
Fixes issues with PCM file placement, optimizes some audio-based timeline
and cache operations, just generally a better approach.
2020-10-11 23:27:40 +11:00
itsmattkc 430561e2ac sequence: made divider a sequence parameter rather than a viewer parameter
Doing this makes the preview resolution an explicit project setting rather
than a temporary UI setting. This will allow more consistency when caching.
2020-06-08 14:41:35 +10:00
itsmattkc 0cf6c9a1f6 export: use codec IDs rather than strings
Vastly improves portability between library versions.
2020-05-21 03:04:38 +10:00
itsmattkc d5766489e4 export: fixed audio exporting with new renderer system 2020-05-21 02:18:52 +10:00
itsmattkc 87e7564222 cache: heavily reworked exporting for new system
Also cleans up cache in general and moves it to the Task infrastructure.
2020-05-19 23:35:17 +10:00
itsmattkc 61e3641bcc export: fixed bug where null frames never got signalled and hung exporting 2020-04-23 03:02:04 +10:00
itsmattkc 1aa87cbda6 various: encapsulate all code in the olive namespace to avoid name collisions
Large-scale code cleanup. Also adds a license to the top of all files that were
missing it.
2020-04-06 15:29:53 +10:00
itsmattkc fb1cf1edaf ffmpegencoder: improvements to resampling
Updates the AVFrame's nb_samples field to the amount of samples retrieved from
swresample so it doesn't encode more or less samples than it has.
2020-04-05 00:12:23 +11:00
itsmattkc 9603f90072 ffmpegencoder: added range support to audio encoding
There isn't UI for this yet, but sending a time range to the encoder will now
encode just that range of audio.
2020-03-31 13:55:57 +11:00
itsmattkc 7328a813f9 ffmpegencoder: fixed bug that failed to flush the audio encoder
For some reason, when the encoder closed it only flushed the video encoder and
not the audio encoder. Now it does both.
2020-03-31 12:09:43 +11:00
itsmattkc 9e8a384f14 encoder/exportdialog: add compression options for H264 exporting 2020-03-03 01:47:04 +11:00
itsmattkc 61c60e00d6 various small code cleanups and improvements
Largely refactoring work to make the code somewhat nicer to work with.
2019-12-26 19:00:08 +11:00
itsmattkc 3a7b3ffac6 implemented audio exporting
The encoder was moved to its own thread and will transcode the PCM from the
audio renderer into the chosen codec while the video frames are still
received. The implementation isn't perfect and could use some cleaning up, but
it is functional at the moment.
2019-12-23 01:45:27 +11:00
itsmattkc ee31da9e71 merged encoder and decoder code into one folder since they can share quite a bit of code 2019-12-21 20:03:25 +11:00