MediaMetadataRetriever: add static lock for image extraction
MediaMetadataRetriever binder service has a static lock in MetadataRetrieverClient. The static lock serializes getFrameAtTime(), getImageAtIndex(), getImageRectAtIndex() and getFrameAtIndex() regardless of where the transaction being originated. The static lock in the service side throttles image extraction not to consume too much memory. But the static lock can cause to consume all the binder thread pools and lead to starvation. By adding a static lock to the client side(MediaMetadataRetriever), image extraction from the same process will consume only one thread in the thread pool. Flag: EXEMPT bugfix Bug: 359802236 Test: presubmit Change-Id: I8476df2aac34506d7571b98e1c24aee8d74a7900
Loading
Please register or sign in to comment