Commit Graph

7 Commits

Author SHA1 Message Date
Mark Thompson 7f4b8d2f5e ffmpeg: set extra_hw_frames to account for frames held in queues
Since e0da916b8f the ffmpeg utility has
held multiple frames output by the decoder in internal queues without
telling the decoder that it is going to do so.  When the decoder has a
fixed-size pool of frames (common in some hardware APIs where the output
frames must be stored as an array texture) this could lead to the pool
being exhausted and the decoder getting stuck.  Fix this by telling the
decoder to allocate additional frames according to the queue size.
2024-03-19 22:56:56 +00:00
Anton Khirnov efab83c156 fftools/ffmpeg_sched: allow connecting encoder output to decoders 2024-03-13 08:01:15 +01:00
Anton Khirnov 2ee9362419 fftools/ffmpeg: remove unncessary casts for *_thread() return values
These functions used to be passed directly to pthread_create(), which
required them to return void*. This is no longer the case, so they can
return a plain int.
2024-03-13 08:01:15 +01:00
Anton Khirnov e0da916b8f fftools/ffmpeg: optimize inter-thread queue sizes
Use 8 packets/frames by default rather than 1, which seems to provide
better throughput.

Allow -thread_queue_size to set the muxer queue size manually again.
2024-01-28 13:34:56 +01:00
Anton Khirnov 00013341df fftools/ffmpeg_sched: add filter API to signal EOF on input 2024-01-27 09:24:29 +01:00
Anton Khirnov 2305091a3a fftools/ffmpeg: update the reported timestamp at the end
Reported-by: microchip
2023-12-14 20:16:54 +01:00
Anton Khirnov 9b8cc36ce0 fftools/ffmpeg: add thread-aware transcode scheduling infrastructure
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 order to register the
  individual components (demuxers/decoders/filtergraphs/encoders/muxers)
  with the scheduler

The scheduler is not actually used as of this commit, so it should not
result in any change in behavior. That will change in future commits.
2023-12-12 08:24:18 +01:00