M8 (part 2): tsc-media integration tests and docs

- tests/codec_roundtrip.rs: synthetic pattern -> VP8 / VP9 -> decode
  (PSNR, rectangle and background colours, forced keyframes, bitrate
  change) and capture thread -> encoder -> decoder
- tests/x11_capture.rs: draws windows on a real X server ($DISPLAY, e.g.
  Xvfb), checks MIT-SHM and GetImage pixels, window listing, window
  capture -> VP8 -> decode colours, and cursor drawing; skipped without
  DISPLAY
- tests/openh264.rs: missing-library errors; with TSC_OPENH264_LIB a full
  H.264 roundtrip incl. SPS profile checks (High 100, Baseline 66); an
  ignored test downloads Cisco's binary and runs the roundtrip
- OpenH264: allow frame skipping so rate control holds the bitrate, no
  adaptive quantisation / background detection for screen content
- docs/media.md: API, backends, features, build requirements, licenses
  (OpenH264 runtime download and attribution), verification status

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJvYyRmTjKcb9i8eyYXK5G
This commit is contained in:
Claude committed 2026-09-26 05:02:38 +00:00
1 parent 9e9cb8895e
commit e3269e3cc7
5 files changed
+626 -1

No files matched your search

+5 -1
View File
@@ -217,7 +217,11 @@ impl OpenH264Encoder {
.rate_control_mode(RateControlMode::Bitrate)
.usage_type(usage)
.profile(profile)
.skip_frames(false)
// Rate control only holds the bitrate if it may skip frames.
.skip_frames(true)
// Not supported for screen content; OpenH264 would warn and drop them.
.adaptive_quantization(self.config.content == ContentHint::Motion)
.background_detection(self.config.content == ContentHint::Motion)
.intra_frame_period(IntraFramePeriod::from_num_frames(
self.config.keyframe_interval.unwrap_or(0),
))