Reputation: 16189
I'm using AndroidStudio profiler to view the app heap. And I saw many HashMap with MediaCodecInfo
, like the below picture:
I global search MediaCodecInfo
in my project, there's no results.
I checked Android document https://developer.android.com/reference/android/media/MediaCodec
MediaCodec class can be used to access low-level media codecs, i.e. encoder/decoder components. It is part of the Android low-level multimedia support infrastructure (normally used together with MediaExtractor, MediaSync, MediaMuxer, MediaCrypto, MediaDrm, Image, Surface, and AudioTrack.)
I just used SoundPool in my project which should nothing to do with this.
Any way to find out what's it used for in my project? Not sure if it's something relative to system and should leave it there.
Thanks!
EDIT
I removed SoundPool
and still get this.
Upvotes: 0
Views: 260
Reputation: 1113
Here the quote from SoundPool
documentation:
The SoundPool library uses the MediaCodec service to decode the audio into raw 16-bit PCM. This allows applications to ship with compressed streams without having to suffer the CPU load and latency of decompressing during playback.
So as you can see SoundPool
uses MediaCodec
api under the hood, so that's why you see MediaCodecInfo
objects in the heap.
Also maybe there is some library that your project depends on and it uses MediaCodec
api too.
Upvotes: 0