mirror of
https://github.com/androidx/media.git
synced 2025-05-17 04:29:55 +08:00

Issue: When running the Transformer related test cases, the tests are flaky because the order in which audio and video samples are interleaved seems to differ in few instances. Root cause: When running a transformation the sample producer (Asset loader) and sample consumer (Sample pipeline) both runs on different thread and theoretically there is no reason for behaviour to be deterministic because the number of samples produced/written depends on how fast individual thread works. So it is indeed surprising that test somehow worked deterministically in majority of instances (may be something to do with Robolectric environment). Solution: Since we don't expect the order of sample interleaving to be deterministic, make the dumping logic deterministic where all the video samples will be collected and then dumped together (similarly for audio). This would mean we won't be able to see the interleaving so for that we need to add separate test case verifying the interleaving logic only. Pending: Test case for interleaving. PiperOrigin-RevId: 540930871
Test data module
Provides sample data for media unit and instrumentation tests.