In Android, MediaPlayer is a top-level class that abstracts the core player engine. In MediaPlayer general processing is divided into 3 main components as
MediaTrack ==> OMXCodec / ACodec ==> Sink
Where MediaTrack is a track-specific implementation based on MediaExtractor , which is the analyzer engine.
MediaExtractor initialized with a DataSource that abstracts the input source. For your progressive download, the DataSource implementation will be the main one, as it will provide buffers for downstream components. Since the Android platform works with the pull model, the DataSource will control the speed of data delivery.
In AOSP, you can refer to an example implementation, as in http://androidxref.com/4.2.2_r1/xref/frameworks/base/media/java/android/media/MediaPlayer.java#2132 . Some additional information about the implementation of HTTPSource can be attributed to http://androidxref.com/4.2.2_r1/xref/frameworks/av/media/libstagefright/HTTPBase.cpp#47
source share