| 978 | namespace { |
| 979 | |
| 980 | bool ProbeH264Encoder(H264Profile profile, PixelFormat pixel_format = PixelFormat::kYuv420p) { |
| 981 | VideoEncoderConfig config; |
| 982 | config.width = 256; |
| 983 | config.height = 256; |
| 984 | config.bitrate_bps = 500'000; |
| 985 | config.framerate = 30; |
| 986 | config.codec = VideoCodec::kH264; |
| 987 | config.h264_profile = profile; |
| 988 | config.input_format = pixel_format; |
| 989 | |
| 990 | FfmpegH264VideoEncoder encoder; |
| 991 | std::string error; |
| 992 | return encoder.Open(config, &error); |
| 993 | } |
| 994 | |
| 995 | // One-shot encoder capability probe. H.264 uses the same candidate-open path |
| 996 | // as the WebRTC encoder so hardware wrappers do not count as usable unless the |