In Android, MediaPlayer
is a top-level class which abstracts the underlying player engine(s). In the MediaPlayer
, the overall processing is divided as 3 major components as
MediaTrack ==> OMXCodec / ACodec ==> Sink
Where MediaTrack
is a track specific implementation which is based out of MediaExtractor
which is the parser engine.
MediaExtractor
is initialized with a DataSource
which abstracts the input source. For your progressive download, the implementation of DataSource
will be the main focus as this will provide the buffers to the downstream components. Since Android platform works on pull model, DataSource
will control the rate of providing the data.
In AOSP, you could refer to a sample implementation as in http://androidxref.com/4.2.2_r1/xref/frameworks/base/media/java/android/media/MediaPlayer.java#2132 . Some further information on the HTTPSource
implementation could be referred at http://androidxref.com/4.2.2_r1/xref/frameworks/av/media/libstagefright/HTTPBase.cpp#47