Also move out of the mediacodec package into the util package. PiperOrigin-RevId: 356949401
Common code used by other ExoPlayer modules.