Forked from https://android.googlesource.com/platform/frameworks/av