Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d33e319f authored by Sungtak Lee's avatar Sungtak Lee
Browse files

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
parent 6413b8bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment