CodecProbeChild

Runs the codec probe's live-fire in a child process, for both tiers (video-codec-catalogue §VCC-3).

In the namespace media::encoder. Declared in src/libs/libmediacore/mediacore/encoder/CodecProbeChild.hpp.

Detailed description

The probe opens an encoder for each codec, and Qt's media backend picks a hardware encoder where it can. A hardware encoder that fails on the probe's frames can leave a backend thread that never stops: on an NVIDIA host, h264_nvenc failed, and Qt 6.10's `VideoEncoder::cleanup()` looped on `avcodec_send_frame` for as long as the process lived, one core at 100 % (2026-10-20). So no tier probes in the process that asks. The child is this program again, started with PROBE_FLAG. It probes, prints one JSON object on stdout and ends at once, its threads with it.

The child answers before the program starts itself: this translation unit registers the answer with app::registerChildInvocation(), and AppStartup::begin() and libtest's mains call app::answerChildInvocation() first. A program that links the probe links that registration too.

Tier Default probes in the inherited environment, as an export runs. Tier Cautious clears one variable of the child's environment, the FFmpeg-backend handle that makes Qt's media plugin skip hardware encoders. All FFmpeg-backend constants of the code base live in this translation unit: that variable's name and the flags.

In this section