Where / how does the Android MediaPlayer cache load

I need to know where / how MediaPlayer caches audio / video content when it is "streamed" through progressive download by default.

We are evaluating app settings for Android Android players. One of the problems is preventing content from being copied (as much as possible). Progressive downloads have many advantages, but we need to make sure that we take reasonable steps to protect the media. I have to do the wrong searches in the wrong places because I could not find any details about this. I looked through the file system of our test device, trying to find any cached files from our test download application - to no avail (which is potentially useful for our purposes).

+4
source share
1 answer

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

+5
source

All Articles