ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Why ExoPlayer2 don't use MediaExtractor?

Open cauchywei opened this issue 9 years ago • 2 comments

When I try to learn ExoPlayer2 source code, I found that it do not using MediaExtractor + MediaCodec as usual rather than implement Mp4Extractor itself. There any problem with MediaExtractor ?

cauchywei avatar Mar 20 '17 13:03 cauchywei

There are a few reasons:

  • MediaExtractor uses a threading model that's not well suited to ExoPlayer.
  • It also doesn't provide as much control over buffering as we'd like.
  • Implementation of the extractors under MediaExtractor varies between versions of Android.
  • Extractors under MediaExtractor lack some functionality that we're able to support in ExoPlayer extractors.

Implementing our own extractors avoids all of the above. It also means that we can add new features to the extractors and have them work on all versions of Android, rather than adding them into the platform and have them work on new versions of Android only.

ojw28 avatar Mar 20 '17 13:03 ojw28

@ojw28 Thank your for your reply in time.

cauchywei avatar Mar 20 '17 14:03 cauchywei