tests: migrate gtest suite to the ffmpeg_bridge API and add bridge coverage

- Replace direct FFmpeg usage in the test suite (channel layout masks,
  pixel/sample format constants, AVFrame field access, sws_scale) with
  the bridge equivalents and the olive::AVFrame adapter
- Drop CoreRational.ToAVRational (API removed with core's FFmpeg
  dependency) and the GetSwsColorspaceFromAVColorSpace tests (helper
  moved inside the bridge)
- New ffmpeg_bridge_test.cpp exercises the C API directly: constants vs
  core, error strings, pixel format utilities, frames/packets, scaler,
  resampler, audio graph tempo processing, probe/decoder round-trip on
  tests/demo.mp4 (including hw-frame transfer), SRT subtitle reading,
  and encoder end-to-end tests (PNG video and PCM audio probed back)
This commit is contained in:
2026-07-15 23:00:13 +08:00
parent 3a3ead6fc0
commit e1d3019659
18 changed files with 1074 additions and 272 deletions
+1 -5
View File
@@ -5,16 +5,12 @@
#include "olive/core/render/samplebuffer.h"
#include "olive/core/render/sampleformat.h"
extern "C" {
#include <libavutil/channel_layout.h>
}
namespace
{
olive::core::AudioParams MakeMonoParams()
{
return olive::core::AudioParams(48000, AV_CH_LAYOUT_MONO,
return olive::core::AudioParams(48000, olive::core::kChannelLayoutMono,
olive::core::SampleFormat::F32P);
}