KEMBAR78
Flag to use MP3 index seeking only if no other seeker applicable · Issue #2839 · androidx/media · GitHub
Skip to content

Flag to use MP3 index seeking only if no other seeker applicable #2839

@nift4

Description

@nift4

[REQUIRED] Use case description

I'm working on a MP3 player app and sometimes these MP3 files don't really have seek frames or metadata. In those cases, slow seeking is better than no seeking, so I want to enable FLAG_ENABLE_INDEX_SEEKING. However, that flag overrides Xing or Metadata seek tables. In the interest of performance, for the wide variety of good VBR MP3 files that have seek metadata, or CBR MP3 files with Info header, I wish to use that metadata and only fall back to index seeking if there's no metadata.

Proposed solution

Alternative version of the flag that prefers seekFrameSeeker and metadataSeeker over IndexSeeker.
So specifically,

  • if metadata is present, use that seeker
  • if Xing or Vbri present, use those seekers
  • if Info present, use CBR seeker
  • (if new flag enabled) otherwise use index seeker
  • otherwise use existing CBR fallbacks

Alternatives considered

N/A

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions