mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

When working with SSAI ads, we need to easily convert positions between the underlying stream and the media model that exposes ad groups. To simplify this, we can add util methods (that are testable on their own). In addition, we need an easy way to build AdPlaybackStates for SSAI inserted ads. The metadata is obtained out-of-band and usually has the ad group start and end times in the underlying stream only. Hence, we also add a util method to add a new ad group based on this information. PiperOrigin-RevId: 374369360