Possible to use FLAG_ALLOW_NON_IDR_KEYFRAMES with DefaultMediaSourceFactory for HLS?
- Dominant language
- Java
- Stars
- 21.9k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
I'm porting code from 2.11, which used to set `FLAG_ALLOW_NON_IDR_KEYFRAMES` flag for both HLS and progressive media sources. I'm trying to translate that into the new `MediaItem` system. In particular, whether it's possible to use `DefaultMediaSourceFactory`.
AFAIK, I could provide a reconfigured `DefaultExtractorsFactory` to `DefaultMediaSourceFactory` constructor to cover the progress media. But I don't see a way to set the flag `FLAG_ALLOW_NON_IDR_KEYFRAMES` for HLS streams. Is this possible?
Note, the equivalent code in 2.11 looked like the following:
```
DefaultHlsExtractorFactory hlsExtractorFactory = new DefaultHlsExtractorFactory(
DefaultTsPayloadReaderFactory.FLAG_ALLOW_NON_IDR_KEYFRAMES, true);
return new HlsMediaSource.Factory(dataSourceFactory)
.setExtractorFactory(hlsExtractorFactory)
.setDrmSessionManager(drmSessionManager)
.createMediaSource(uri);
```
Contributor guide
Assessment
This issue has not been assessed yet.