Re: [FFmpeg-devel] [PATCH 18/24] fftools/ffmpeg: add thread-aware transcode scheduling infrastructure

2023-11-09 Thread Anton Khirnov
Quoting Michael Niedermayer (2023-11-04 19:44:09) > On Sat, Nov 04, 2023 at 08:56:27AM +0100, Anton Khirnov wrote: > > See the comment block at the top of fftools/ffmpeg_sched.h for more > > details on what this scheduler is for. > > > > This commit adds the scheduling code itself, along with mini

Re: [FFmpeg-devel] [PATCH 18/24] fftools/ffmpeg: add thread-aware transcode scheduling infrastructure

2023-11-09 Thread Anton Khirnov
Quoting James Almer (2023-11-04 14:53:25) > On 11/4/2023 4:56 AM, Anton Khirnov wrote: > > +static void *task_wrapper(void *arg) > > +{ > > +SchTask *task = arg; > > +Scheduler *sch = task->parent; > > +int ret; > > +int err = 0; > > + > > +ret = (intptr_t)task->func(task->func

Re: [FFmpeg-devel] [PATCH 18/24] fftools/ffmpeg: add thread-aware transcode scheduling infrastructure

2023-11-04 Thread Michael Niedermayer
On Sat, Nov 04, 2023 at 08:56:27AM +0100, Anton Khirnov wrote: > See the comment block at the top of fftools/ffmpeg_sched.h for more > details on what this scheduler is for. > > This commit adds the scheduling code itself, along with minimal > integration with the rest of the program: > * allocati

Re: [FFmpeg-devel] [PATCH 18/24] fftools/ffmpeg: add thread-aware transcode scheduling infrastructure

2023-11-04 Thread James Almer
On 11/4/2023 4:56 AM, Anton Khirnov wrote: +static void *task_wrapper(void *arg) +{ +SchTask *task = arg; +Scheduler *sch = task->parent; +int ret; +int err = 0; + +ret = (intptr_t)task->func(task->func_arg); +if (ret < 0) +av_log(task->func_arg, AV_LOG_ERROR, +

[FFmpeg-devel] [PATCH 18/24] fftools/ffmpeg: add thread-aware transcode scheduling infrastructure

2023-11-04 Thread Anton Khirnov
See the comment block at the top of fftools/ffmpeg_sched.h for more details on what this scheduler is for. This commit adds the scheduling code itself, along with minimal integration with the rest of the program: * allocating and freeing the scheduler * passing it throughout the call stack in orde