refactor(task): de-Qt oaktask base + project tasks, wire codec task submitter

- Task base: Qt signals become lifecycle listeners (the async-command
  callback exception), cancellation uses oakrender's OakCancelAtom C
  handle; TaskManager runs std::thread workers, no signals
- ConformTask/ProxyTask implement oakcodec's submit-callback contract
  (synchronous interim); register_codec_task_submitter() closes the
  conform/proxy loop - conform of demo.mp4 produces pcm caches in tests
- ProjectImportTask/ProjectLoadTask/ProjectSaveTask over the oaknode
  C ABI; image-sequence confirmation becomes a facade callback
  (default: not a sequence)
- C API additions needed by oaktask: oaknode serializer file-level
  save/load (auto-initializing), footage video-params/cancel-atom/
  as-node, folder add-child command factory; oakcodec decoder
  conform_audio + image-sequence helpers; oakrender cancelatom
  get_native
- fix double-ownership: submitting a task to the manager transfers
  ownership, freeing its handle only releases the wrapper
- C ABI in include/task (task/manager/project, OakTaskTask opaque
  handle + lifecycle subscribe), every function tested (103 cases in
  build-oaktask incl. regressions)
- RenderTask family and OTIO tasks follow in separate commits
This commit is contained in:
2026-08-07 14:01:23 +08:00
parent 66831a870e
commit 6ded1d2d63
54 changed files with 5937 additions and 1 deletions
+33
View File
@@ -25,6 +25,7 @@
#include "error.h"
#include "frame.h"
#include "render/cancelatom.h"
#ifdef __cplusplus
extern "C" {
@@ -199,6 +200,38 @@ OAKCODEC_API int oakcodec_decoder_decode_audio(OakDecoder decoder, int in_num, i
uint64_t channel_layout, float *buf,
int buf_frames);
/**
* @brief Conform the open stream's audio into per-channel pcm cache files
* (Decoder::conform_audio()).
*
* `output_filenames` is an array of `filename_count` final per-channel
* paths. `sample_format` is olive::core::SampleFormat::Format as int.
* `cancelled` may be an empty OakCancelAtom (ctx == NULL).
*
* @return OAKCODEC_OK on success, OAKCODEC_E_STATE when no stream is
* open, OAKCODEC_E_CANCELLED when cancelled, OAKCODEC_E_FAILED
* otherwise.
*/
OAKCODEC_API int oakcodec_decoder_conform_audio(OakDecoder decoder,
const char *const *output_filenames, int filename_count,
int sample_rate, uint64_t channel_layout, int sample_format,
OakCancelAtom cancelled);
/**
* @brief Image-sequence filename heuristics (Decoder::get_image_sequence_*).
*
* digit_count: number of trailing digits in the filename stem (0 = not an
* image sequence filename). index: the numeric value of those digits (-1
* when none). transform: substitute `number` into the digit field,
* two-stage string getter.
*/
OAKCODEC_API int oakcodec_decoder_get_image_sequence_digit_count(
const char *filename);
OAKCODEC_API int64_t oakcodec_decoder_get_image_sequence_index(
const char *filename);
OAKCODEC_API int oakcodec_decoder_transform_image_sequence_file_name(
const char *filename, int64_t number, char *buf, int buf_size);
/**
* @brief Human-readable detail of the last error on this decoder
* (buf/size string getter convention).