Skip to content

Add multi-threading support in OpenFX#1247

Merged
ddennedy merged 8 commits into
masterfrom
openfx-multithread
May 16, 2026
Merged

Add multi-threading support in OpenFX#1247
ddennedy merged 8 commits into
masterfrom
openfx-multithread

Conversation

@ddennedy
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds OpenFX host-side multi-threading support by wiring the OFX OfxMultiThreadSuiteV1 callbacks to MLT’s slice threading (mlt_slices_*) and implementing OFX mutex primitives using pthreads, with thread-local tracking for multiThreadIndex() / multiThreadIsSpawnedThread().

Changes:

  • Implemented multiThread() using mlt_slices_run_normal() and introduced TLS state for thread index/spawned-thread queries.
  • Implemented OFX mutex create/lock/unlock/trylock/destroy using pthread_mutex_t (recursive).
  • Updated multiThreadNumCPUs() to report MLT’s slice count.

Comment thread src/modules/openfx/mlt_openfx.c Outdated
Comment thread src/modules/openfx/mlt_openfx.c
Comment thread src/modules/openfx/mlt_openfx.c Outdated
Comment thread src/modules/openfx/mlt_openfx.c
Comment thread src/modules/openfx/mlt_openfx.c Outdated
Comment thread src/modules/openfx/mlt_openfx.c Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Comment thread src/modules/openfx/mlt_openfx.c
Comment thread src/modules/openfx/mlt_openfx.c Outdated
Comment thread src/modules/openfx/CMakeLists.txt Outdated
@ddennedy ddennedy added this to the v7.40.0 milestone May 16, 2026
@ddennedy ddennedy merged commit 96be24f into master May 16, 2026
25 checks passed
@ddennedy ddennedy deleted the openfx-multithread branch May 16, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants